Every customer is ranked 1: RANKX is only looking at one row

Updated 2026-11-27 · 3 min read

Symptom

The ranking column shows 1 everywhere and a strange number on the total.

Cause

RANKX iterates the current filter context, i.e. one customer.

Fix

Rank over ALLSELECTED of the column and hide the total.

The problem

Every customer shows rank 1, or the total row shows a strange number.

The fix

RANKX must iterate over all customers, not only the current one: use ALL (or ALLSELECTED to respect slicers). Hide the result on the total row.

Customer rank =
IF (
    ISINSCOPE ( Customer[Customer] ),
    RANKX ( ALLSELECTED ( Customer[Customer] ), [Revenue], , DESC, DENSE )
)

DENSE gives 1, 2, 2, 3; the default SKIP gives 1, 2, 2, 4.

Keep learning

Generate a Power BI report for free