Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Get period with max sales

Hi, I have a straight table with Period, Sum(Sales). I want to display the period with the maximum sales in a text box. If I use max(Aggr(sum(Sales),Period)) I get the maximum sales value so how can I get the period which that value belongs to?

Thank you

Hennie

1 Solution

Accepted Solutions
manideep78
Partner - Specialist
Partner - Specialist

Try this.

Only({<Sales={"$(=Max(Aggr(Sum(Sales),Period)))"}>}period)

View solution in original post

2 Replies
manideep78
Partner - Specialist
Partner - Specialist

Try this.

Only({<Sales={"$(=Max(Aggr(Sum(Sales),Period)))"}>}period)

Anonymous
Not applicable
Author

Hi Manideep

Thank you it works! Can you please explain to me how the function works (how the function gets to the answer) and also the reason for the use of the $ sign?