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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
BrianRiggin
Frequent Visitor

Dynamic Rank Measure for Table visualization

I've read a lot of postings on this, but I just can't seem to get it to work.  I have a base table that looks like this:

Thingy (Unique)RankingNumber
a12345646
b9988544
c54654
d654654654
e654654654
f89191813

I want to put this into a visual to and add a measure showing the rank like this:

Thingy (Unique)RankingNumberRank
a123456463
b99885442
c546541
d6546546545
e6546546546
f891918134

So when I filter it by A and E for instance, I get:

Thingy (Unique)RankingNumberRank
a123456461
e6546546542

I've tried this, but I get an error saying it can't find a single value for RankingNumber

RANKX(ALLSELECTED(MyTable),MyTable[RankingNumber],,DESC)

 

And I've tried these, but everything has the same value for every row corresponding to the count of total rows in MyTable

RANKX(ALLSELECTED(MyTable),MyTable[RankingNumber],MAX(MyTable[RankingNumber]),DESC)

RANKX(ALLSELECTED(MyTable),MyTable[RankingNumber],CALCULATE(SUM(MyTable[RankingNumber])),DESC)

 

Any help would be greatly appreciated!

 

1 ACCEPTED SOLUTION
DataInsights
Super User
Super User

@BrianRiggin,

 

RANK is a better choice than RANKX for most scenarios. Try this measure:

 

Rank = 
RANK ( ALLSELECTED ( MyTable ), ORDERBY ( MyTable[RankingNumber], ASC ) )

 

DataInsights_0-1706284260480.png

 





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

Proud to be a Super User!




View solution in original post

2 REPLIES 2
DataInsights
Super User
Super User

@BrianRiggin,

 

RANK is a better choice than RANKX for most scenarios. Try this measure:

 

Rank = 
RANK ( ALLSELECTED ( MyTable ), ORDERBY ( MyTable[RankingNumber], ASC ) )

 

DataInsights_0-1706284260480.png

 





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

Proud to be a Super User!




That worked!  Thanks!

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.