Forum Discussion
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
- Greg_DecklerCommunity Champion
Try not referencing your column:
Rank Core Orders $ = RANKX(ALL('Table6'), [Order $], , DESC)