Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
dreamhouse32
New 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 States, I want that particular column with no data to be hidden.

 

In this particular data set, blanks are indicated by a dash "-".

1 ACCEPTED SOLUTION

The solution didn't work for me, but I'm having a colleague take another look. I will touch base again next week.

View solution in original post

7 REPLIES 7
v-vpabbu
Community Support
Community Support

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

The solution didn't work for me, but I'm having a colleague take another look. I will touch base again next week.

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

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

Akash_Varuna
Super User
Super 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. 

Thank you. Would you perhaps have an example of what the created measure might look like? I appreciate your help.

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

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.