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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
ABMN
Helper I
Helper I

Breaking ties in RANKX

I'm using the rank function and would like to basically assign a row number insted of a rank, to give a distinct rank instead of duplicate rankings for a tie.

 

I currently have

 

Department          Count            Rank        What I would like for the rank

A                           11                  1              1

B                           10                  2              2

C                           10                  2              3

D                           5                   4              4

E                            3                   5              5

F                            3                   5              6

 

Any help is appreciated.  

1 ACCEPTED SOLUTION
CNENFRNL
Community Champion
Community Champion

CNENFRNL_0-1663872681702.png


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

View solution in original post

6 REPLIES 6
parry2k
Super User
Super User

@andrew_k it is further ranking the department , dividing it by 100 to add decimal value to the count [CNT] measure  to break the ties.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

CNENFRNL
Community Champion
Community Champion

CNENFRNL_0-1663872681702.png


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

After searching the internet for a few hours this solved my problem. Thanks.

Any chance you can explain what it's doing?

@CNENFRNL That worked!  Thanks a lot for the help!

parry2k
Super User
Super User

@ABMN check at the bottom of this blog post (section called breaking ties) and see if that helps How to use RANKX in DAX (Part 2 of 3 – Calculated Measures) - RADACAD

 

 

Follow us on LinkedIn and YouTube.gif to our YouTube channel

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make effort to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

 

Visit us at https://perytus.com, your one-stop shop for Power BI-related projects/training/consultancy.

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

@parry2k That is still giving me the duplicate ranks.  Here is what I have.

 

Rank = RANKX(ALLSELECTED('servicedesk BIA_tickets'[department]),CALCULATE(COUNT('servicedesk BIA_tickets'[request_number])
+ INT(CALCULATE(MIN('servicedesk BIA_tickets'[creation_date])/100000))
),,DESC)

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.