Skip to main content
Announcements
See why Qlik was named a Leader in the 2025 Gartner® Magic Quadrant™ for Augmented Data Quality Solutions: GET THE REPORT
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!!!