Forum Discussion

dsforman5's avatar
dsforman5
New Member
8 years ago
Solved

RANKX Returning False Ties

Having a bit of an issue with the RANKX feature.  I'm trying to rank a listing of customers by total revenue.  Effectively, the rank function is returning false ties and I can't figure out why/how th...
  • OwenAuger's avatar
    8 years ago

    dsforman5

    The problem appears to be that the Client Rank measure is using the rows of the 'Client Data' table as a basis for the ranking, rather than the distinct Customer Codes.

     

    The result is that any client whose [Total Client Rev] is at least as large as the largest [Total Client Rev] revenue evaluated in the row context of any individual row of 'Client Data' will be ranked 1, and so on.

     

    If you adjust your measure as follows, it should give you sensible ranks:

    Client Rank =
    RANKX ( ALL ( 'Client Data'[Customer Code] ), [Total Client Rev],, DESC )

    Regards,

    Owen