Forum Discussion

tanehome1's avatar
tanehome1
Icon for Helper I rankHelper I
10 months ago
Solved

Hide or show Table visual columns based on another slicer selection/filter

Greetings All,
is there a way to control show or hide column in the table visual based on selection on another slicer
Example: I've one slicer shows many types (type1,type2,type3)
ex. type1 should shows column A,B,C,D,E

ex. type2 shows column A,B,X,Y,Z

ex. type3 shows column A,B,C

5 Replies

  • Hi tanehome1,

     

    Try to explore Field Parameters -> https://learn.microsoft.com/en-us/power-bi/create-reports/power-bi-field-parameters

     

    Field parameters allow users to dynamically change the measures or dimensions being analyzed within a report. This feature can help your report readers explore and customize the analysis of the report by selecting the different measures or dimensions they're interested in.

     

    Another way could be to have different visuals and use buttons to show one or another depending on the user selection

     

    Or you can use switch, but this won't work with columns but with DAX Measures -> https://learn.microsoft.com/en-us/dax/switch-function-dax

     

     

    If you elaborate more on your request providing some sample data I could probably help more

     

    If this helps, feel free to give kudos or accept as a solution 👍

    • tanehome1's avatar
      tanehome1
      Icon for Helper I rankHelper I

      Thank you for your reply! I’m actually referring to an approach that uses a slicer not created by a Field Parameter, (which allows the user to select what to show in the table).

      What I meant is similar to the example mentioned — to make it dynamic based on the type selection.

      I appreciate the additional suggestions; the buttons and SWITCH examples are very helpful as well!

      • danextian's avatar
        danextian
        Icon for Super User rankSuper User

        Hi tanehome1 

        You can still use the field parameter table but you'll need create another with the information as to what columns are visible for each type.  This also calls for a many to many relationship between the  parameter and the view tables.

        Please see the attached pbix

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi tanehome1 ,
    I would also like to take a moment to thank MattiaFratello and danextian 
    , for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.
     

    I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions