DAX has a couple of functions that enable us to sort and rank data in a table. The first of these—the RANK.EQ function—will calculate a value for the rank of a number in a specified column of numbers.
Ranking your data
The RANK.EQ function
The syntax for the RANK.EQ function is as follows:
RANK.EQ ( <Value>, <ColumnName> [, <Order>] )
For the first parameter, we need to specify the value that is to be ranked. For the second parameter, we need to give the column against which the value will be ranked. Finally, we can specify an optional order over which the ranking is to be applied. This can be either ascending (ASC) or descending (DESC). If it is not specified, then the default order will be...