Forum Discussion

Shakti22's avatar
Shakti22
Regular Visitor
8 years ago
Solved

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

 

Brandtop 10 pertop 20 pertop 30 pertop 40 per
B10001
B21111
B30111
B40011
B50001

 

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.

  • Shakti22

     

    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

  • Shakti22

     

    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.

  • MattAllington's avatar
    MattAllington
    Icon for Community Champion rankCommunity 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.