Forum Discussion

2019's avatar
2019
Helper II
2 years ago
Solved

Show 3 highest values based on condition

I have a big table in Power BI where I want to write a DAX Expression to create a new table for each location only to show the 3 highest “losses” values.   But sometimes some rows have the same “lo...
  • Ashish_Mathur's avatar
    2 years ago

    Hi,

    Try these measures

    L = SUM(Data[Losses])
    Measure = RANK(DENSE,ALL(Data[ID]),orderby([L],DESC,Data[ID],ASC))

    Expand the filter pane and select <=3 as the filter criteria.  Hope this helps.