Iterates over every row of a table, typically one wrapped in ALL, and reports where the current result of an expression falls among the results; by default largest is first and ties leave gaps, though Dense ranking is an option.
Read more: Microsoft Learn
In the Ultra Transcenders books
Each book explains RANKX in context, with comparison tables and the common traps.
Terms in this definition
- OVER
Gives a T-SQL window function its window: PARTITION BY, ORDER BY and, if wanted, a ROWS or RANGE frame. Rankings and running totals can then be worked out while every row is kept.
- Event
Table in Log Analytics where entries from Windows event logs are kept.
- ALL
A DAX function that ignores any filters and gives back every row of a table or every value of the named columns. Used within CALCULATE, it works as a modifier that clears filters, although REMOVEFILTERS states that intent more clearly where it is available.
- WHERE
Limits a SELECT, UPDATE or DELETE to just the rows meeting a condition. Omit it, and the statement hits every row.
- FIRST
A DAX function available only inside visual calculations. It fetches the value at the start of one axis of the visual's matrix, which makes it handy for comparing each point with the first; its opposite is LAST.
Related terms
- IEEE 754
The floating-point standard used by Power BI's Decimal number type. Because values are stored approximately, comparing for equality, ranking with RANKX or adding up large mixed numbers can behave oddly; Whole number or Fixed decimal number sidestep the problem.