Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Talend Cloud AWS EU Scheduled Outage: Starting Tues 26 May 21:00 CEST with expected completion Wed 27 May 01:00 CEST
cancel
Showing results for 
Search instead for 
Did you mean: 
AdrianCittadini
Contributor II
Contributor II

How to get the sum of a Max Dim?

Hi! I'm trying to get the Sum of "SALES" but only for the MAX "AÑO".
AdrianCittadini_0-1672880149136.png

I have already tried this: = Sum(Aggr(Max(AÑO), SALES)) and the result is 10012 (wich means that is adding the AÑO column and not SALES.

Would you please tell me how to get the sum of Sales by max Año AND ALSO maybe explain why the expression above is not working?

Thanks!

Labels (3)
3 Replies
BrunPierre
Partner - Master II
Partner - Master II

What's your expected output?

MayilVahanan
MVP
MVP

Hi

Try like below

If you are using in KPI or text box, try like below

Sum({<AÑO = {$(=Max(AÑO))}>} SALES)

If you are using in straight table with AÑO as dimension, then store the max value in variable and use in the set analysis.

Reg: Sum(Aggr(Max(AÑO), SALES))
-- you are calculating the max AÑO per sales info, and summation of AÑO value.

Sales as Dimension and Max(AÑO) as Expression. 

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
AdrianCittadini
Contributor II
Contributor II
Author

6 (the SUM of Sales of 2003 (max AÑO))