Forum Discussion

SEC's avatar
SEC
Regular Visitor
3 years ago

Show/hide Column or Table Automatically based on Slicer Selection

Hello! 

I am looking for a way for Power BI to automatically show or hide a table (or certain columns within a table, if that's easier) based on a selection in a slicer. I have a list of inquiry topics, and I want the table(s) to show the contact info for each topic. There are 2 options for how to contact someone about the topics - either Salesforce or email (never both). So what I currently have is something like this, with blank fields throughout the table:

 

TopicSalesforce ContactEmail Contact
Topc ASalesforce contact A 
Topc B Email contact B
Topc C Email contact C
Topc DSalesforce contact D 

 

I would like to get rid of the blanks because I think it is confusing for users. And I want a solution that does this automatically - not a button the user would select to toggle between Salesforce and Email options. I don't think I can merge the 2 columns into 1.

 

So for example, if the user selects Topic A, the table displays only Salesforce contact A - the Email contact column is hidden. Or perhaps I need 2 separate tables instead of columns, and 1 of the tables gets hidden based on the topic selection. I can make both options work visually.

 

Any advice you have is much appreciated. Thank you!