Forum Discussion

diego-jd's avatar
diego-jd
Frequent Visitor
2 years ago
Solved

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...
  • ExcelMonke's avatar
    ExcelMonke
    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: