Forum Discussion
RankX Measure re-calculating in table when filtering?
Hi all,
I have an issue I can't quite figure out.
I have two matrix in my report, one contains the measure "Prod ADV % Rank = RANKX(ALL('Pols Outcome and Inception'[Product Code + Scheme fin]),CALCULATE([ADV%]))". For some reason I can't sotp it re-calculating the rank whenever I select the "Product Code + Scheme" table below that shows month (shown in picture 2)
Whereas in different version of this measure I don't have the same issue? See below!
I imagine this is a quick fix, any help appreciated!
Kind regards,
Jordan
- Anonymous6 years ago
Having spent a long time invesigating, it appears that the measure works with just "Product code" and the addition of "product code + product scheme" is what breaks it! Suggestign the measure was fine and the underlying data contains the issue. To combat this, I've created a hierachy with product code -> product scheme, which allows us to still see the scheme attached to the code after a simple drill through click!
7 Replies
- AnonymousNot applicable
Hi Jordan,
I believe the measure is being filtered when you filter the results. The way to avoid this would be to specifiy in the calculate part of your measure that you want it to be for all data in your table
Prod ADV % Rank = RANKX(ALL('Pols Outcome and Inception'[Product Code + Scheme fin]),CALCULATE([ADV%]),All('Pols Outcome and Inception'))
- amitchandak
Super User
Anonymous
When you choose categorical Rank, then the rank will change if you use any other view of data.
Prod ADV % Rank = RANKX(ALL('Pols Outcome and Inception'[Product Code + Scheme fin]),CALCULATE([ADV%]),,desc,dense)For Rank, also Refer these links
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures
https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns
https://radacad.com/how-to-use-rankx-in-dax-part-3-of-3-the-finaleAppreciate your Kudos.
- v-gizhi-msft
Community Support
Hi,
Please try this:
Prod ADV % Rank = RANKX ( ALL ( 'Pols Outcome and Inception' ), CALCULATE ( [ADV%] ) )If this can not solve your issue, please share some sample data and 'ADV%' measure formula as a screenshot for me to help you further.
Expect your reply!
Thanks.
Best Regards,
Giotto Zhi
- AnonymousNot applicable
Hi Giotto,
My existing measure already is
Prod ADV % Rank = RANKX ( ALL ( 'Pols Outcome and Inception' ), CALCULATE ( [ADV%] ) )
I'll PM you a link to the file so you can see for yourself, this is probably easiest!
Kind regards and thank you for your help,
Jordan
- v-gizhi-msft
Community Support
Hi,
Please make sure that you have removing any sensitive data in your shared file.
And i advise you sharing your file here instead of personal private messages.
This can let me help you further.
Thanks!
Expect your reply.
Best Regards,
Giotto Zhi
- AnonymousNot applicable
Having spent a long time invesigating, it appears that the measure works with just "Product code" and the addition of "product code + product scheme" is what breaks it! Suggestign the measure was fine and the underlying data contains the issue. To combat this, I've created a hierachy with product code -> product scheme, which allows us to still see the scheme attached to the code after a simple drill through click!