Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Retrieve a value based on its ranking (DAX Function RANKX)

Hello,

 

I created the following table in the “Report” view of Power BI, and used the RANKX function to determine the risk ranking:

Table

Measure

RANK = rankx(ALLSELECTED(TD[RISK]),[Q])

 

Then, I would like to have 1 card showing the risk with ranking 3, that is, the "alcohol" risk, like this:

How could I propose the measure to obtain this result?

 

Thank you

  • Hi,

    Try this measure

    =calculate(max(TD[Risk]),filter(values(TD[Risk]),[Rank]=3))