Forum Discussion
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 States, I want that particular column with no data to be hidden.
In this particular data set, blanks are indicated by a dash "-".
The solution didn't work for me, but I'm having a colleague take another look. I will touch base again next week.
7 Replies
- Akash_VarunaSuper User
Hi 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.
- dreamhouse32New Member
Thank you. Would you perhaps have an example of what the created measure might look like? I appreciate your help.
- AnonymousNot 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
- AnonymousNot applicable
Hi dreamhouse32,
As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.Regards,
Vinay Pabbu- dreamhouse32New Member
The solution didn't work for me, but I'm having a colleague take another look. I will touch base again next week.
- AnonymousNot applicable
Hi dreamhouse32,
May I ask if you have gotten this issue resolved?
If it is solved, please mark the helpful reply or share your solution and accept it as solution, it will be helpful for other members of the community who have similar problems as yours to solve it faster.
Regards,
Vinay Pabbu