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.