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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
da26
Frequent Visitor

how to show the ranking of data and removing the ties using RANKX function

Hi!

 

Can someone help me how to display the ranking of data based on the count?

And what if there are ties, how to display their ranking? I've already tried the RANKX function but it only displayed Rank 1 on all the data.

Capture.PNG

Thank you in advance. 🙂

8 REPLIES 8
Anonymous
Not applicable

Hi @da26

 

Try the following

 

1. Create a measure called sumCount = sum( yourtable[CountofHN] )

2. Create a measure called 

    Rank  =

     IF (
HASONEVALUE ( yourtable[Diagnosis] ),
RANKX ( ALL ( yourtable[Diagnosis] ,yourtable[CountofHN]),[sumCount],,desc,dense)
)

 

 

If this works please accept this as a solution and also give KUDOS.

 

Cheers

 

CheenuSing

 

Sean
Community Champion
Community Champion

Post your Measure formula

da26
Frequent Visitor

Capture2.PNG

Sean
Community Champion
Community Champion

Rank =
IF (
    HASONEVALUE ( IPD_CurrentOpenStatus[Diagnosis] ),
    RANKX (
        ALL ( IPD_CurrentOpenStatus[Diagnosis] ),
        CALCULATE ( COUNTA ( IPD_CurrentOpenStatus[HN] ) ),,
        ASC,
        DENSE
    )
)

@da26   How about now?

da26
Frequent Visitor

Hi @Sean

 

 

Still error. I'm sorry.

But thank you so much for immediate response. 😉

Sean
Community Champion
Community Champion

How is you data organized - post some sample of what the table looks like?

da26
Frequent Visitor

Hi @Sean

 

I already found the solution in ranking. 🙂

But what I am trying to know now is there any way to remove the ties in ranking? As you see here, when there is a tie, the ranking was just like this.

 

Capture4.PNG

Thank you again. 🙂

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

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.

Top Solution Authors
Top Kudoed Authors