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

Calculated Rank does not always appear correctly

I am having an issue where I have a list of client names and their revenues.  My step 1 rank formula works properly which ranks all clients, but the 2nd step of the formula which is mean to return the rank for one specific client; however, it is returning a different rank number.  Goal of the 2nd step formula is to drop it into a table and see that specific clients rank across different product names listed in column 1     

 

Rank Formula 1 = RANKX(ALL(table[client name]),[revenue])   Note:  [revenue] = sum(table[revenue])

 

Rank formula 2 = IF([Focus client revenue] = 0,0,Calculate([rank formula 1],table[client name]="Client X"))

 

Rank formula 1 returns 4 as the rank which is accurate.  Rank formula 2 returns 5 for the focus client and 0 for all other clients.  Focus client should return a rank of 4.

 

Thank You!

1 REPLY 1
edhans
Super User
Super User

You are going to have to post some data for most of us to really help, and perhaps a screenshot of your model for the relevant tables. See links below on how to post data.

 

How to get good help fast. Help us help you.
How to Get Your Question Answered Quickly
How to provide sample data in the Power BI Forum



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

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.

Top Solution Authors
Top Kudoed Authors