Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
shaebert
Helper III
Helper III

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:

 

Screenshot 2024-02-02 at 11.46.19 AM.png

 

Here is one of the rank DAX codes:

Screenshot 2024-02-02 at 11.47.36 AM.png

 

1 ACCEPTED SOLUTION
v-yaningy-msft
Community Support
Community Support

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.

vyaningymsft_0-1707121621825.png

 

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 Team

 

If 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

 

 

View solution in original post

3 REPLIES 3
v-yaningy-msft
Community Support
Community Support

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.

vyaningymsft_0-1707121621825.png

 

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 Team

 

If 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

 

 

Idrissshatila
Super User
Super User

hello @shaebert ,

 

check of this spolution works for you 

https://community.fabric.microsoft.com/t5/Desktop/Breaking-ties-in-RANKX/m-p/2787534

 



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




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. 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.