Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
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
Partner - Master

What's your expected output?

MayilVahanan

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))