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

The RANKX formula is not reflecting the correct results in CARD visual

Dear Community,

Basically, I am trying to do a hotel benchmark analysis in terms of their occupancy rates. 
As you see below, the MATRIX rank and CARD rank are not matching. 
I have 2 slicers that show hotel names and locations. In some cases, I would like to increase my sample size by choosing more than one location (it's A+B locations in my below sample ) but the rank level seems incorrect when I chose multiple locations.

I chose Hotel 2, It's rank should be 2 under location A and 3 under location A+B but CARD shows the rank as 2 for both situations.

Rank Occ = IF(HASONEVALUE('Survey Data'[Hotel Name]),RANKX(ALL('Survey Data'[Hotel Name]),[Occupancy Rate (%)]))
rankx new = RANKX(CROSSJOIN(ALL('Survey Data'[Hotel Name]),ALLSELECTED('Survey Data'[Location])),[Occupancy Rate (%)])

 

Kansetsuwaza_0-1669213065580.png

3 REPLIES 3
Kansetsuwaza
Frequent Visitor

@amitchandak Have you had any chance to check my sample .pbix please?

Kansetsuwaza
Frequent Visitor

@amitchandak 
Thanks for your valuable feedback. I checked your link but unfortunately, I could not manage to solve my issue.
You may find the sample .pbix HERE 

Thanks again.

amitchandak
Super User
Super User

@Kansetsuwaza , is the across table rank is not correct then refer

Power BI Rank Across dimension tables: https://youtu.be/X59qp5gfQoA

 

If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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.