# QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
cancel
Showing results for
Did you mean:
Creator III

## Subtotal not work on expression with Aggr

Hello

I have an expression which works and brings the correct numbers on a line-by-line basis but the totals do not agree to the lines above.  Why would this be and is there anyway to correct this?

+IF(

SUM(Aggr( sum({\$<period = {">=\$(vStartPeriod_CY)<=\$(vEndPeriod_CY)"},pl={"N01","L03","N02","N03","N04","N06"}>}IS_IFRS_GBP),entity_region,entity_description)) >0,

SUM(Aggr( sum({\$<period = {">=\$(vStartPeriod_CY)<=\$(vEndPeriod_CY)"},pl={"N01","L03","N02","N03","N04","N06"}>}IS_IFRS_GBP),entity_region,entity_description))

,0)

Many thanks

Paul

1 Solution

Accepted Solutions
MVP

May be this:

=Sum(Aggr(If(Sum({\$<period = {">=\$(vStartPeriod_CY)<=\$(vEndPeriod_CY)"},pl={"N01","L03","N02","N03","N04","N06"}>} IS_IFRS_GBP) > 0,

Sum({\$<period = {">=\$(vStartPeriod_CY)<=\$(vEndPeriod_CY)"},pl={"N01","L03","N02","N03","N04","N06"}>} IS_IFRS_GBP), 0), entity_region, entity_description))

2 Replies
MVP

May be this:

=Sum(Aggr(If(Sum({\$<period = {">=\$(vStartPeriod_CY)<=\$(vEndPeriod_CY)"},pl={"N01","L03","N02","N03","N04","N06"}>} IS_IFRS_GBP) > 0,

Sum({\$<period = {">=\$(vStartPeriod_CY)<=\$(vEndPeriod_CY)"},pl={"N01","L03","N02","N03","N04","N06"}>} IS_IFRS_GBP), 0), entity_region, entity_description))

Creator III
Author

Thanks so much for that, was very helpful

Paul