Rank from the bottom: smallest customers with RANKX ASC

Flip a ranking so the smallest customer is number 1, using the ASC order argument of RANKX.

You will learn to

  • Rank in ascending order with ASC
  • Skip an optional argument by leaving it empty

How it works

RANKX takes up to four arguments: `RANKX(table, expression, value, order)`. The third, **value**, is optional: when it is left out, RANKX ranks the current cell’s own result, which is what you want almost every time.

The fourth, **order**, is `DESC` by default, so the largest value gets 1. Write `ASC` to give 1 to the smallest value instead. That is the ranking you need for a “who needs attention?” list.

To reach the fourth argument without filling in the third, leave the third one empty: two commas in a row, like `RANKX(table, expression, , ASC)`. Putting ASC in the third position doesn’t work, because that slot expects a value.

Practice it hands-on with a real data model and a live report that updates as you type.

Cheapest Rank = RANKX(ALL(Product), CALCULATE(MAX(Product[Price])), , ASC)