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
Anonymous
Not applicable

RankX different answers when filtered

Hello,

 

I have what seems to be a common issue with RankX, but can't locate the exact solution. Here's my situation:

  • I have a table including a ranking label that behaves as expected (rank number corresponds to score)
  • I have a seperate one-row table that only shows the selected Brand from a synced slicer
  • The one-row table has been created by copying-pasting the long table, therefore the same slicers apply to both (namely, country, month, quarter, brand (=label))
  • The issue that I have is that, although all the metrics are identical between the two tables (score, MoM, YoY), the rank number is not always the same (which makes me think that it is a fluke when they are actually the same)
  • Below a snapshot of the table and the relevant formulae that I'm using

Example.png

Score = CALCULATE(AVERAGE('Brand Tracker'[score original]),FILTER('Brand Tracker', 'Brand Tracker'[Month]=[SelectedDate]))
 
Rank = RANKx(ALL(Brands[Label]),ABS([Score]))

 

Any suggestions on why the two tabs show a different rank # and how to resolve the issue are much appreciated!

 

Many thanks,

 

George

 

2 REPLIES 2
v-chuncz-msft
Community Support
Community Support

@Anonymous 

 

Notice the third parameter of RANKX and check the current context.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

I have, but I have no idea what to do with it 🙂 

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