Forum Discussion
Koushikrish
4 years agoHelper I
DAX TOP N Measure on a Matrix Issue
Hello, I have a requirement to display TOP 10 States on a Volume measure across a matrix visual. I have used the TOP N DAX Measure to achieve this : CALCULATE([Volume], TOPN(10, ALL(dimGeograp...
- Anonymous4 years ago
Koushikrish glad it worked!
To also remove the filter from Brand, this below might work (I've not tested this)
CALCULATE( [Volume], TOPN(10, ALL(dimGeography[State_Code], dimGeography[RegionName]), CALCULATE([Volume], ALL('dimBrand'[BrandName])) DESC ), VALUES(dimGeography[State_Code]) )
amitchandak
4 years agoSuper User
Koushikrish , try if this can help
measure =
var _tab = TOPN(10, ALL(dimGeography[State_Code]), [Volume], DESC)
return
CALCULATE([Volume], FILTER(VALUES(dimGeography[State_Code]),dimGeography[State_Code] in _tab))
- Koushikrish4 years agoHelper I
Hi amitchandak , thanks for the response. This doesn't seem to fix the issue though. It doesn't appear to show just top 10 but all states and mapped to their corresponding region :