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

Announcements
AWS Degraded - You may experience Community slowness, timeouts, or trouble accessing: LATEST HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
Joaquin_Lazaro
Partner - Specialist II
Partner - Specialist II

Aggregation functions

Hello:

I have this expresion

= max(aggr(sum(Sales), YYYYMM)

and I get the bigger sales amount grouped by month (YYYYMM); now I need a second expression to get the asociated YYYYMM value.

Please, could you help me?

Thank you

Joaquín

1 Solution

Accepted Solutions
jerem1234
Specialist II
Specialist II

Maybe something like:

firstsortedvalue(YYYYMM, -aggr(sum(Sales), YYYYMM))

Hope this helps!

View solution in original post

2 Replies
jerem1234
Specialist II
Specialist II

Maybe something like:

firstsortedvalue(YYYYMM, -aggr(sum(Sales), YYYYMM))

Hope this helps!

Joaquin_Lazaro
Partner - Specialist II
Partner - Specialist II
Author

Hi jerem1234

This works fine.

Thank you