Forum Discussion
diego-jd
2 years agoFrequent Visitor
Top 3 table with date filter
Hello, I've been trying to get a table with top 3 Dealer with most sales at the latest date but can't make it work. My data is like this Dealer Name Sales upload_datetime And I've b...
- 2 years ago
No problem! Much easier to do that 🙂 you can ignore the previous DAX suggestions.
One option to consider (you will still have to use the visual level filter "trick" to get your top 3):Measure = VAR _MaxDate = CALCULATE(MAX('Table'[Date]),ALLEXCEPT('Table','Table'[Date])) RETURN CALCULATE(SUM('Table'[Sales]),FILTER('Table','Table'[Date]=_MaxDate))This is my result:
diego-jd
2 years agoFrequent Visitor
Sorry for the confusion, by aggregated date I meant get the latest date in the entire dataset and use that as the filter, like this:
thanks!!
ExcelMonke
2 years agoImpactful Individual
No problem! Much easier to do that 🙂 you can ignore the previous DAX suggestions.
One option to consider (you will still have to use the visual level filter "trick" to get your top 3):
Measure =
VAR _MaxDate = CALCULATE(MAX('Table'[Date]),ALLEXCEPT('Table','Table'[Date]))
RETURN
CALCULATE(SUM('Table'[Sales]),FILTER('Table','Table'[Date]=_MaxDate))
This is my result: