Cheat Sheets/Power BI/RANK.EQ
DAX function

RANK.EQDAX function reference

Rank a value within a column.

Syntax

dax
RANK.EQ(<value>, <column>, [<order>])

Examples

dax
RANK.EQ([Sales], ALL(Sales[Amount]))
A rank
dax
RANK.EQ(Sales[Amount], ALL(Sales[Amount]), 1)
Ascending rank (1 = smallest) via the optional order argument, in a calculated column

More flexible than RANK.EQ for use inside CALCULATE-driven measures rather than a calculated column.

dax
RANKX(ALL(Sales), Sales[Amount])
The measure/iterator equivalent of RANK.EQ

Common mistakes & gotchas

Related DAX functions

From Math & statistics

← Back to the Power BI (DAX) cheat sheet