Forum Discussion
dreamhouse32
1 year agoNew Member
Conditional hiding of columns
In my table visual, I want to hide columns with no data when a slicer is applied. For example, if I use a slicer to select United States, and there is no data in a particular column for the United St...
- 1 year ago
The solution didn't work for me, but I'm having a colleague take another look. I will touch base again next week.
Akash_Varuna
Super User
1 year agoHi dreamhouse32 I don't think Power BI supports that natively for conditionally hiding columns based on slicer selections. For this, we would need to create dynamic measures for each column that return BLANK() if the value is a dash ("-"). Then, use these measures in the table visual.
dreamhouse32
1 year agoNew Member
Thank you. Would you perhaps have an example of what the created measure might look like? I appreciate your help.
- Anonymous1 year agoNot applicable
Hi dreamhouse32,
Below is the measure.
Sales_Visible = IF( MAX('Raw Data'[Country]) = "United States" && SELECTEDVALUE('Raw Data'[Sales]) = "-", BLANK(), SELECTEDVALUE('Raw Data'[Sales]) )If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it!
Regards,
Vinay Pabbu