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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors