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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
ABMN
Frequent Visitor

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

4 REPLIES 4
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!

ABMN
Frequent Visitor

@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.

ABMN
Frequent Visitor

@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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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