Forum Discussion
RANKX Ties Question
Hello, I am trying to compare and rank 10 regions across a number of metrics. When ties come up, I utilize DENSE which helps for the ties. But after the ties, I want the rank to skip the number of ties that took place. I am looking for this because when looking at a metric when there are ties, it may appear that a region is ranked 8th out of 10 regions, when they are really ranked last (10th).
Below is a current example, and then an example of my disired rank:
Here is one of the rank DAX codes:
- Anonymous2 years ago
Hi, shaebert
Based on your description, you could try turning Dense into Skip. I have created many measures to achieve the effect you are looking for. Following picture shows the effect of the display.
Measures:
Rank = RANKX ( ALL ( 'Table' ), CALCULATE ( 'Table'[ValueMeasure] ),, ASC, SKIP )If this does not work, could you please share some sample data without sensitive information and expected output.
How to provide sample data in the Power BI Forum - Microsoft Fabric Community
Best Regards,
Yang
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
3 Replies
- IdrissshatilaSuper User
hello shaebert ,
check of this spolution works for you
https://community.fabric.microsoft.com/t5/Desktop/Breaking-ties-in-RANKX/m-p/2787534
- shaebertHelper III
Thanks, but no, as I don't want to break the ties. If I break the ties, it would penalize one or more of the regions that are tied. I like how the ranking works including the ties as it stands. I need it to behave differently after the ties.
- AnonymousNot applicable
Hi, shaebert
Based on your description, you could try turning Dense into Skip. I have created many measures to achieve the effect you are looking for. Following picture shows the effect of the display.
Measures:
Rank = RANKX ( ALL ( 'Table' ), CALCULATE ( 'Table'[ValueMeasure] ),, ASC, SKIP )If this does not work, could you please share some sample data without sensitive information and expected output.
How to provide sample data in the Power BI Forum - Microsoft Fabric Community
Best Regards,
Yang
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!How to get your questions answered quickly -- How to provide sample data in the Power BI Forum