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
sthomas38
Frequent Visitor

Rank with no duplicates

Hi,

I am trying to achieve this ranking (no duplicates) - please see below snapshot. I have to rank each Attribute for around 1000 MSAs. 

I tried adding a random value to the rank - but that is not giving a single digit value between 1 and 11 and giving me tripple digit values. 

 

sthomas38_0-1638517887705.png

 

Let me know if you have any questions please. Thank you so much for your time and help.

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

Hi @sthomas38 ,

First add index:

vluwangmsft_0-1638847346312.png

Close and apply,then use the following dax to create a column:

RANK1 = RANKX(FILTER('Table','Table'[MSA]=EARLIER('Table'[MSA])),'Table'[Value_count]+0.000001*'Table'[Index],,DESC,Dense)

Output result:

vluwangmsft_1-1638847406531.png

 

And you could refer my blog about rank with  same values:

https://community.powerbi.com/t5/Community-Blog/Sort-when-with-same-value/ba-p/2012332 

 

Did I answer your question? Mark my post as a solution!


Best Regards

Lucien

 

View solution in original post

4 REPLIES 4
v-luwang-msft
Community Support
Community Support

Hi @sthomas38 ,

First add index:

vluwangmsft_0-1638847346312.png

Close and apply,then use the following dax to create a column:

RANK1 = RANKX(FILTER('Table','Table'[MSA]=EARLIER('Table'[MSA])),'Table'[Value_count]+0.000001*'Table'[Index],,DESC,Dense)

Output result:

vluwangmsft_1-1638847406531.png

 

And you could refer my blog about rank with  same values:

https://community.powerbi.com/t5/Community-Blog/Sort-when-with-same-value/ba-p/2012332 

 

Did I answer your question? Mark my post as a solution!


Best Regards

Lucien

 

Hi!

Thank you so much for this solution. It helped me! Because of being able to create rank as a column (and nor measure), I was able to achieve so much more (calling out the 3rd rank network and 5th rank network) etc. 

Appreciate your help. Thank you.

Tahreem24
Super User
Super User

@sthomas38 , May this similar post help you out.

https://community.powerbi.com/t5/Desktop/Rank-values-without-duplicate-ranking/m-p/702224

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

Hi Tahreem,

I am not sure if I did it right, or if the solution was not right for this instance - 

 

This is what I am getting after adding index column in Query Editor and then a RANKX Column. 

sthomas38_0-1638537312689.png

VALUE for me is a Calculated Column - in my original dataset, I have IDs thats are distinctly count that created this VALUE column for me. Not sure if that helps. Even to get the RANK column - I had to create it as a Measure and not Column.

 

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.