Forum Discussion
DAX TOP N Measure on a Matrix Issue
- 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]) )
Anonymous : This worked great, thank you! I have another question though. Consider I have to include another column from another table on the Row (instead of Region Name). Is there a way to get rid of the filter without explicity specifiying the field name?
For example, I tried to use another column called Brand Family on the row but it won't work as filter is removed only on the Region Name. I also tried this but didn't work as it looks like arguments for ALL function must be from same table.
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])
)
- Koushikrish4 years agoHelper I
Anonymous : that worked great as well. Got the result as I desired for exactly! Thanks a lot for your help on this!! 😊