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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Get the date with the max of my metric

Hi,

ok, I'm confused today... I need to get the day where there is the max no of sales by Areas

Data

Sales IDAreaDate
1South01/01
2South01/01
3South02/02

4

North03/03
5North01/02
6North03/03

Output

AreaHighest sales Date
South01/01
North03/03

I'm sure, it will appears obvious to some of you.

1 Solution

Accepted Solutions
sunny_talwar

You can try this for a calculated dimension:

=Aggr(FirstSortedValue(Date, -Aggr(Count([Sales ID]), Area, Date)), Area)

Capture.PNG

View solution in original post

5 Replies
sunny_talwar

May be like this:

Dimension

Area

Expression

FirstSortedValue(Date, -Aggr(Count([Sales ID]), Area, Date))

Capture.PNG

Not applicable
Author

You are perfect !!! you rock. thanks a lot

Not applicable
Author

ok,

what if I need to put it in the dimension... it's working as an expression but not as a dimension.

sunny_talwar

You can try this for a calculated dimension:

=Aggr(FirstSortedValue(Date, -Aggr(Count([Sales ID]), Area, Date)), Area)

Capture.PNG

Not applicable
Author

thanks a lot!!!