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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
JStaf
Frequent Visitor

Rankx with mutiple column in table and multiple slicers

Hi,

I am trying to calculate rank on the table visual that has multiple slicers on it.  When the table has 1 column, rank appears correctly (pic 1).  However, when I start adding another column to the table (the second column adding is just a description of the first column so it's 1 to 1), ranking is not correct anymore (like pic 2).  What I want is to have pic 2 have correct rank like pic 1. 

 

Capture.PNGAny help/tips are appreciated.  thank you

1 REPLY 1
MisterFry
Resolver III
Resolver III

Good ol' RANKX... 

 

Getting a hold of why RANKX is doing this is complicated and involves some knowledge of row contexts, which is a core principle of the DAX language. 
This does a pretty good job explaining it: 
https://www.sqlbi.com/articles/use-of-rankx-in-power-bi-measures/

 

The short answer is that you need to ignore ALL of the fields in your visual to get RANKX to return the right value. Add them to your ALL() statement, and it should work. 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.