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
Jane689
Helper I
Helper I

how to hide column in power bi table based on slicer selection

Hi ,

I have a date filter with values say 08/21/2023, 08/22/2023, 08/23/2023 and so on . I have also created a power bi table which has different columns with same name as above i.e 08/21/2023, 08/22/2023, 08/23/2023.

I want if date slicer is set to 08/21/2023 then power BI table should show only column with label 08/21/2023 , rest all columns should be hidden. similarly if date slicer is set to 08/22/2023 then power BI table should show only column with label 08/22/2023 , rest all columns should be hidden.

 

basically if slicer value equals to table column name then only that specific column should be displayed rest all columns should hide.

 

7 REPLIES 7
Haith70s
New Member

Good day

Please find some options  

Options 1 

base the column on a measure. In the measure use "if" function. If the date slicer is equal to the desired date value/s then blank() else place the required value/calculations.

Option 2 

2.1 create a measure that checks if the value of the date slicer (use the "selectedvalue" function) is equal to the desired value/s.

2.2 Conditional format the background and font colour of the value field based on the measure (step 2.1). This makes the (column) value blend in (can not be seen) with the table/matrix background. 

 

I found this resource to be very helpful as well. 

https://perytus.com/2021/01/26/how-to-use-conditional-formatting-to-show-text-image-instead-of-blank...

ray_aramburo
Super User
Super User

The field parameter will go on the Columns of the Matrix and the Sum of values/Measure on the Values.





Did I answer your question? Give your kudos and mark my post as a solution!

Proud to be a Super User!





am using table visual not matrix visual since i want to sort each column individually which is different dates in my case 

ray_aramburo
Super User
Super User

If you have your dates as columns I'd recommend you to unpivot that table or use field paramaters





Did I answer your question? Give your kudos and mark my post as a solution!

Proud to be a Super User!





I want to keep the dates as columns only as this is my requirement

You can still display them as columns by placing the date value column in a pivot but if you don't want to transform the table schema, then field parameters is your only option. 





Did I answer your question? Give your kudos and mark my post as a solution!

Proud to be a Super User!





field parameters is using nameof function by default , i want to display sum of each date column in the power bi table.

Helpful resources

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

June 2025 community update carousel

Fabric Community Update - June 2025

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