Alpha Video Training
Results 1 to 4 of 4

Thread: Advance Math with Grid Grouping Subtotals

  1. #1
    Member
    Real Name
    Raymond Wang
    Join Date
    Nov 2010
    Posts
    19

    Default Advance Math with Grid Grouping Subtotals

    I'm having no problem creating and using groupSummaryMyField.total

    However, I would like to calculate Year over Year Variance at the groupSummary level.

    Alpha is complaining about using the same [groupSummary.FY19.total] twice with this formula:
    ([groupSummary.FY20.total]-[groupSummary.FY19.total])/[groupSummary.FY19.total]

    It shows up as groupSummary.Group_SUMMARY_FIELD_2?

    It was able to do the math on the numerator, but not the denominator.


    GroupSummary.jpg

  2. #2
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,724

    Default Re: Advance Math with Grid Grouping Subtotals

    I think you need to provide more information or a sample component.
    Last edited by Davidk; 10-15-2019 at 10:42 PM.

  3. #3
    Member
    Real Name
    Raymond Wang
    Join Date
    Nov 2010
    Posts
    19

    Default Re: Advance Math with Grid Grouping Subtotals

    Sure. I have a grid component called YoYSummary. I've enable GroupBreak and I have the following in the Group break footer.

    <tr >
    <td class="[class.gridSummaryData]" colspan="1" >&nbsp;</td>
    <td class="[class.gridSummaryData]" colspan="1" >&nbsp;</td>
    <td class="[class.gridSummaryData]" colspan="1" align="right"><b>Total:&nbsp;</b></td>
    <td class="[class.gridSummaryData]" colspan="1" align="right"><b>{alltrim(str( convert_type([[groupSummary.Total Tree.total]],"N") ,250,0,",B"))}</b></td>
    <td class="[class.gridSummaryData]" colspan="1" align="right"><b>{alltrim(str( convert_type([[groupSummary.FY19_Trees.total]],"N") ,250,0,",B"))}</b></td>
    <td class="[class.gridSummaryData]" colspan="1" align="right"><b>{alltrim(str( convert_type([[groupSummary.FY19_Budget.total]],"N") ,250,0,"$(B"))}</b></td>
    <td class="[class.gridSummaryData]" colspan="1" align="right"><b>{alltrim(str( convert_type([[groupSummary.FY20_Trees.total]],"N") ,250,0,",B"))}</b></td>
    <td class="[class.gridSummaryData]" colspan="1" align="right"><b>{alltrim(str( convert_type([[groupSummary.FY20_Budget.total]],"N") ,250,0,"$(B"))}</b></td>
    <td class="[class.gridSummaryData]" colspan="1" align="right"><b>{([[groupSummary.FY20_Trees.total]]-[[groupSummary.FY19_Trees.total]])}/[[groupSummary.FY19_Trees.total]]</b></td>

    </tr>

    I'm not worried about the convert_type yet. I just need to have the formula worked out.

    Thanks!

  4. #4
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,724

    Default Re: Advance Math with Grid Grouping Subtotals

    You have to examine what Alpha is doing... and then duplicate it's format. Essentially what you've messed up are the "do something here" tags that Alpha uses... {}.

    Your html should be something like...

    Code:
    <td class="[class.gridSummaryData]" colspan="1" align="right"><b>{([[groupSummary.FY20_Trees.total]]-[[groupSummary.FY19_Trees.total]]) / [[groupSummary.FY19_Trees.total]]}</b></td>
    Your html was allowing the subtraction to be interpreted, but then you left the division out in right field. Move the closing } to the end of the expression.

    This is why an example was needed. Your original post showed nothing that could be worked with.

Similar Threads

  1. Group break with group footer in grid - need to show subtotals on one line
    By clankford in forum Mobile & Browser Applications
    Replies: 5
    Last Post: 10-14-2019, 08:45 PM
  2. Using the grouping feature on a grid in V11
    By lgrupido in forum Application Server Version 11 - Web/Browser Applications
    Replies: 2
    Last Post: 08-12-2012, 11:54 PM
  3. Dynamic Grouping in Grid
    By MarionT in forum Application Server Version 11 - Web/Browser Applications
    Replies: 5
    Last Post: 02-02-2012, 12:47 PM
  4. Grid doesn't advance records...
    By CharlieIT in forum Application Server Version 10 - Web/Browser Applications
    Replies: 2
    Last Post: 11-02-2010, 06:18 PM
  5. Grouping a Grid
    By Steve Workings in forum Application Server Version 8
    Replies: 8
    Last Post: 10-10-2007, 10:11 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •