Forum Discussion

hoyt22's avatar
hoyt22
Helper I
1 year ago
Solved

Issue with RankX in a Matrix - Duplicate Ranks for Differing Values

Hi all,

 

I have a matrix with Market and Advertiser in the rows, and I want to rank the Advertisers within each Market on different KPIs. This seems straightforward, but I'm getting duplicate ranks for advertisers even when their values are different. For example:

 

I have TotalSpend:

 

 

 

TotalSpend = SUM(Data[$])

 

 

 

And Rank_Spend:

 

 

 

Rank_Spend = 
IF(
    [TotalSpend] > 0,
    RANKX(
        ALL('Data'[ADVERTISER]),
        [TotalSpend],,DESC, Dense)
)

 

 

 

But, as you can see, the ranks are incorrect.

 

I want the user to be able to select which advertisers are displayed in a market, but not have the ranks change. For example, if the user chooses to only show Coolray Cooling Heating Plumbing, the rank in Atlanta will still show as 4.

 

I feel like I'm missing something obvious, but any help would be appreciated. I have my sample dashboard and dataset below. Thanks!

 

Sample Dashboard and Dataset