Forum Discussion

simrantuli's avatar
simrantuli
Continued Contributor
5 years ago
Solved

Dynamically add or remove columns from table visual using slicer selection

Hi All,

I am looking to fulfil a requirement wherein I want to give the flexibility to the user to select which columns he/she wants to see in the table visual based on slicer selection.

E.g. let's say the user only wants to see Country and Sales in the table so he will select Country and Sales from the slicer. If he also wants to see column Profit, he can select Profit from the slicer and the table should show these 3 columns now.

 

Your help will be very much appreciated.

Thanks!

  • Hi, simrantuli 

     

    Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.

    Table:

     

    You may go to Power Query, add an index column and then unpivot column 'Country', 'Sales', 'Profit'.

     Add an index column:

     

    Unpivot columns:

     

    Then you may use decide which column to display with the slicer in Power BI Desktop.

     

    Best Regards

    Allan

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

5 Replies