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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Nick221_
Frequent Visitor

RankX formula with tie's

I have the below formula that will rank my 'Risks" by the sum of Immediate high and Long term high. In some situations there are risks that have the same total number. In instances where there are ties, I would like the rank to order the risk that has more Immediate high responses.

 

Example.

 

Risk 1 Total number 54. Immediate high 24. Long Term High 30

Risk 2 Total number 52 Immediate high 43. Long Term High 9

Risk 3 Total number 52. Immediate high 48. Long Term High 4

 

Risk 1 should be 1 since it has higher total. Risk 3 should be come in at rank 2, because there is a higher number of Immediate High. Then Risk 2 at 3.

 

Here is my current formula:

Risk Order = RANKX(ALLSELECTED('Survey 2022'[Risks]),CALCULATE(SUM('Survey 2022'[Immediate High]) + SUM('Survey 2022'[Long Term High])))
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Nick221_ , You can choose tie breaker 

 

Rank Tie breaker
https://community.powerbi.com/t5/Community-Blog/Breaking-Ties-in-Rankings-with-RANKX-Using-Multiple-...
https://databear.com/how-to-use-the-dax-rankx-function-in-power-bi/

 

If you have small data to rank, you can consider Window

Learn Power BI: Window as Rank- why and Why not: https://youtu.be/Pu8y8bd5mb8

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Nick221_ , You can choose tie breaker 

 

Rank Tie breaker
https://community.powerbi.com/t5/Community-Blog/Breaking-Ties-in-Rankings-with-RANKX-Using-Multiple-...
https://databear.com/how-to-use-the-dax-rankx-function-in-power-bi/

 

If you have small data to rank, you can consider Window

Learn Power BI: Window as Rank- why and Why not: https://youtu.be/Pu8y8bd5mb8

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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