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
Shelley
Continued Contributor
Continued Contributor

RANKX Works Halfway

Hi All, I'm using RankX to rank distributors by orders. When I show a table with the list, it works as expected. However, I am working on a dashboard and want to filter on a distributor, and see their rank among the total. When I do this, it doesn't work. It always shows 1 of 1. What the heck am I missing?

 

Here's the formula: 

Rank Core Orders $ = RANKX(ALL('Link Table'[Distributor APR]), [Total Core Orders $], , DESC)

 

[The link table contains all distributors and is used to link all the fact tables together on that one distributor key.]

 

I'm trying to show the distributor is ranked X out of Y:

APR Rank Text = [Rank Core Orders $] & " of " & [APR Count]

 

Displays properly with NO slicer selections AND in table format:

Distributor   Order $     Rank

A                   $500           1

B                    $450          2

C                    $300          3

D                   $299           4

 

 

Card showing Rank shows 1 of 115, when nothing is selected. (I'd rather have it be blank.)

 

But when I click a slicer to select one distributor:

Everything in the table goes away except the distributor selected.

In addition, the Card showing the rank, now shows 1 of 1. I thought the ALL in the formula would prevent this behavior?

Rank Core Orders $ = RANKX(ALL('Link Table'[Distributor APR]), [Total Core Orders $], , DESC)

 

What am I missing? Any help is appreciated. Thank you!

1 REPLY 1
Greg_Deckler
Community Champion
Community Champion

Try not referencing your column:

 

Rank Core Orders $ = RANKX(ALL('Table6'), [Order $], , DESC)


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

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.

Top Solution Authors