1 Attachment(s)

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.

Attachment 46297

Re: Advance Math with Grid Grouping Subtotals

I think you need to provide more information or a sample component.

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" > </td>

<td class="[class.gridSummaryData]" colspan="1" > </td>

<td class="[class.gridSummaryData]" colspan="1" align="right"><b>Total: </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!

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.