Forum Discussion

RingoSun's avatar
RingoSun
Icon for Helper II rankHelper II
4 years ago

Changing what columns will appear in a matrix table based on a slicer

So I have this matrix table above but I want to filter it in such a way that if I use a Subcategory slicer and choose Convection microwave, it will only show specific competitor columns and the rest of the competitors will be grouped as Others. Something like below. 

And then if I select Portable in the Subcategory slicer then it would show me different columns again like below.

 

That's basically the whole idea.

 

The way I approached this problem was I created additional columns in my Brand dimension table in order to specify which columns would appear.

 

I tried creating a measure with a Switch function in it to return a column based on the selected value on the slicer but of course it won't work since I will not be able to put the measure in the Columns field of the visual.

 

There's probably a better way to do it but I just cannot figure out what. Any help would be greatly appreciated!

 

SAMPLE PBIX