Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Srilu_V
Contributor II
Contributor II

Totals Value is not populating when Aggr is used in measure expression

Totals Value is not populating at top when Aggr is used in measure expression.

Srilu_V_0-1706011331937.png

Expression used in GBU Total -> Aggr(nodistinct Sum({<[Product Line]=>} [Total Value]), [Opportunity ID],GBU)
Row wise totals are correct. Totals value highlighted at top is not populating. It should be $17.6
Please help me with the correct expression. 

Labels (2)
4 Replies
Or
MVP
MVP

You would need an aggregation function outside of the aggr() if you want it to aggregate. Currently, at the Totals level, it will presumably return multiple values without being aware of how to aggregate them. This might be something like:

Sum(Aggr(nodistinct Sum({<[Product Line]=>} [Total Value]), [Opportunity ID],GBU))

Though the specifics may depend on your data model and the table's structure.

Srilu_V
Contributor II
Contributor II
Author

Thanks for your prompt reply. I tried with the expression which you shared. 
It's giving total as $52.7 but it's not correct. It should be $17.6. 
Total should be on the basis of aggregation of Opportunity ID & GBU.
If you see Opportunity Total Value, Even though at row level total value is $17.6, Totals value at top is also $17.6

Srilu_V_0-1706012769552.png

 

Anil_Babu_Samineni

@Srilu_V if i look it is fine what @Or shared? Could be needed outer analysis, 

Sum({<[Product Line]=>} Aggr(nodistinct Sum({<[Product Line]=>} [Total Value]), [Opportunity ID],GBU))

Anil_Babu_Samineni_0-1706020936899.png

 

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Srilu_V
Contributor II
Contributor II
Author

Thankyou for your reply !!
Still I am getting the same total $52.7 with this expression as mentioned in the previous screenshot.
Sum({<[Product Line]=>} Aggr(nodistinct Sum({<[Product Line]=>} [Total Value]), [Opportunity ID],GBU))