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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

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
Community Champion
Community Champion

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
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.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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