Forum Discussion
Dynamic filter across visuals
- 8 years ago
Hi natg,
Based on my test, you can firstly use the formula below to create the measure to calculate the [Custom Rank], then you should be able to use the [Final Sales] measure to apply visual level filters([Final Sales] is greater than 0) on the visuals of the three answers to get the expected result in your scenario.
Customer Rank = RANKX ( ALL ( 'Sample'[Customer] ), CALCULATE ( [Total Sales], ALLEXCEPT ( 'Sample', 'Sample'[Customer] ) ), , DESC )Here is the modified pbix file for your reference. :smileyhappy:
Regards
Hi natg,
Based on my test, you can firstly use the formula below to create the measure to calculate the [Custom Rank], then you should be able to use the [Final Sales] measure to apply visual level filters([Final Sales] is greater than 0) on the visuals of the three answers to get the expected result in your scenario.
Customer Rank =
RANKX (
ALL ( 'Sample'[Customer] ),
CALCULATE ( [Total Sales], ALLEXCEPT ( 'Sample', 'Sample'[Customer] ) ),
,
DESC
)
Here is the modified pbix file for your reference. :smileyhappy:
Regards
- natg8 years agoFrequent Visitor
Hi v-ljerr-msft,
Thanks for the help. Looks like need to spend more time understanding how the all except works in this case.
When I applied the product filter, the visuals are fine and working as expected. Whereas the rank index values were incorrect in the table.
Once I included Product also as another clause in the all except option, it looked fine. Many thanks for the help.
Customer Rank =
RANKX (
ALL ( 'Sample'[Customer] ),
CALCULATE ( [Total Sales], ALLEXCEPT ( 'Sample', 'Sample'[Customer], 'Sample'[Product] ) ),
,
DESC
)