Forum Discussion
Slicer for multiple columns
I'm working with a senario in which I need to create single slicer for multiple columns, I have tried few DAX quaries with the help of similar questions asked on forum but I was unable to make that work.
Below is my data view on which I'm working
| Brand | top 10 per | top 20 per | top 30 per | top 40 per |
| B1 | 0 | 0 | 0 | 1 |
| B2 | 1 | 1 | 1 | 1 |
| B3 | 0 | 1 | 1 | 1 |
| B4 | 0 | 0 | 1 | 1 |
| B5 | 0 | 0 | 0 | 1 |
I am looking for solution in which I can select Top 10, Top 20 or Top 40 from filter to reflect only those brands in various charts which denotes 1 in correspond to the selection.
Please help.
In your scenario, to achieve your requirement. You can refer to following steps:
1. Unpivot your source table columns. To make them as fields in Slicer.
Go to Edit Queries -> Choose your source table and select column Brand -> Go to Transform option, find Unpivot Columns and choose Unpivot other columns:
2. Close & Apply. Then you can simply create Slicers:
Thanks,
Xi Jin.
2 Replies
- v-xjiin-msftSolution Sage
In your scenario, to achieve your requirement. You can refer to following steps:
1. Unpivot your source table columns. To make them as fields in Slicer.
Go to Edit Queries -> Choose your source table and select column Brand -> Go to Transform option, find Unpivot Columns and choose Unpivot other columns:
2. Close & Apply. Then you can simply create Slicers:
Thanks,
Xi Jin. - MattAllingtonCommunity Champion
When you load the data, unpivot it before it is loaded. Click the brand column and then select “unpivot other columns”. You can then place a slicer on the new attribute column.