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]) )
Hello Anonymous. These are the top 10 states. My desired output is to retain these Top 10 states only across columns even if I include anything on the rows.
Top 10 states:
This is how I need it when I include Region Name on the columns :
But right now it shows this way when I include Region Name, its displaying the Top 10 states for each Region.
Hope that info was sufficient. Else please let me know.
Koushikrish I tried with some sample data but couldn't reproduce the first image in your firdt post.
I think that perhaps that when the Region field is added, you need the measure remove the filters from the Region Field. I think this will do it:
CALCULATE(
[Volume],
TOPN(10,
ALL(dimGeography[State_Code], dimGeography[RegionName]),
[Volume],
DESC
),
VALUES(dimGeography[State_Code])
)