Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi, everyone.
I have a problem when i am using RANKX() function.
I have a one column table that contains redundant category names (AAA, BBB, CCC.....FFF) and have a measure that counts rows through a table:
As you can see categories EEE, FFF have the same counts and as a result the same rank.
I want to get rid of this, i need to get the unique rank for the each row.
To do that, "Counts" measure was modified a bit i added random number and expected to get correct rank, but i have this:
"Counts" was modified like this:
Solved! Go to Solution.
Hi,
Please check the below measures and the attached pbix file.
I suggest writing an additional measure like below.
Rankalphabet =
RANKX ( ALL ( 'Table'[Dim] ), CALCULATE ( MAX ( 'Table'[Dim] ) ),, ASC ) / 100
Counts =
COUNT(
'Table'[Dim]
) + [Rankalphabet]
RankRows =
RANKX(ALL('Table'[Dim]), [Counts],, DESC)
Hi,
Thanks a lot Jihwan_Kim, it was the solution for me.
Have a good day.
Hi,
Please check the below measures and the attached pbix file.
I suggest writing an additional measure like below.
Rankalphabet =
RANKX ( ALL ( 'Table'[Dim] ), CALCULATE ( MAX ( 'Table'[Dim] ) ),, ASC ) / 100
Counts =
COUNT(
'Table'[Dim]
) + [Rankalphabet]
RankRows =
RANKX(ALL('Table'[Dim]), [Counts],, DESC)
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 14 | |
| 5 | |
| 5 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 24 | |
| 10 | |
| 10 | |
| 6 | |
| 6 |