Forum Discussion

PaulBethancourt's avatar
PaulBethancourt
Frequent Visitor
3 years ago
Solved

Rankx is Incorrect when similar ranked column added to table

I'm using RANKX to rank the number of "Monthly Lines" based on a column called "Parent and TC City".

The above rank work fine.
If I add the field "Parent Org" to the table, then the ranking is incorrect:

My measure for rank is:

Rank Parent City = RANKX(all(SCM_RMA_METRICS[Parent and TC City]),calculate([Monthly Lines]))
Any idea what's going on here?
Any help would be appreciated!
Link to Sample Rankx problem  https://1drv.ms/u/s!Aq5dyjpfjB3Ug9xgh8R7OSESIUJGww?e=HJ7idb 
  • Hi PaulBethancourt 

    Would something like this help?

     

    Rank TC Parent City 2 = 
    RANKX(
        ALL( 'Table'[Parent and TC City], 'Table'[Parent Org] ),
        [Monthly Lines]
    )

     

    It seems to work in both of your scenarios.

    Let me know how this works.

     

    pbix: Rankx Problem.pbix

5 Replies