
Not applicable
2016-11-07
09:16 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 ID | Area | Date |
---|---|---|
1 | South | 01/01 |
2 | South | 01/01 |
3 | South | 02/02 |
4 | North | 03/03 |
5 | North | 01/02 |
6 | North | 03/03 |
Output
Area | Highest sales Date |
---|---|
South | 01/01 |
North | 03/03 |
I'm sure, it will appears obvious to some of you.
504 Views
1 Solution
Accepted Solutions

MVP
2016-11-08
04:33 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can try this for a calculated dimension:
=Aggr(FirstSortedValue(Date, -Aggr(Count([Sales ID]), Area, Date)), Area)
5 Replies

MVP
2016-11-07
09:23 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May be like this:
Dimension
Area
Expression
FirstSortedValue(Date, -Aggr(Count([Sales ID]), Area, Date))

Not applicable
2016-11-07
10:42 PM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You are perfect !!! you rock. thanks a lot
409 Views

Not applicable
2016-11-07
11:41 PM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ok,
what if I need to put it in the dimension... it's working as an expression but not as a dimension.
409 Views

MVP
2016-11-08
04:33 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can try this for a calculated dimension:
=Aggr(FirstSortedValue(Date, -Aggr(Count([Sales ID]), Area, Date)), Area)

Not applicable
2016-11-08
03:28 PM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thanks a lot!!!
409 Views
