DAX Statistical - RANK.EQ function


Advertisements

Description

Returns the ranking of a number in a list of numbers.

Syntax

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

Parameters

Sr.No. Parameter & Description
1

value

Any DAX expression that returns a single scalar value whose rank is to be found.

The expression is to be evaluated exactly once, before the function is evaluated, and its value passed as a parameter.

2

columnName

The name of a column in a table against which ranks will be determined.

It cannot be an expression or a column created using these functions: ADDCOLUMNS, ROW or SUMMARIZE.

3

order

Optional.

Specifies how to rank value, low to high, or high to low.

ASC: Ranks in ascending order of columnName.

DESC: Ranks in descending order of columnName.

If omitted, default is DESC.

Return Value

A number indicating the rank of value among the numbers in columnName.

Remarks

  • If a value is not in columnName or a value is a blank, then RANK.EQ returns a blank value.

  • Duplicate values of a value receive the same rank value. The next rank value assigned will be the rank value plus the number of duplicate values. For example, if five (5) values receive a rank of 8, then the next value will receive a rank of 13 (8 + 5).

Example

= RANK.EQ (1025, Sales[Sales Amount],DESC) 
dax_functions_statistical.htm

Useful Video Courses


Video

Mastering DAX and Data Models in Power BI Desktop

53 Lectures 5.5 hours

Abhay Gadiya

Video

Mastering DAX Studio

Featured

24 Lectures 2 hours

Randy Minder

Video

DAX / Power BI - Customer and Sales Analysis Deep Dive

26 Lectures 4.5 hours

Randy Minder

Advertisements