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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
nannimora
Helper I
Helper I

Hide Column on a Table or Matrix

Hello,

I would like to know if is possible show/hide column on a table/matrix when one or more conditions are verified.

I have to write a code (like visual basic?)

 

Thanks

G

1 ACCEPTED SOLUTION
v-kelly-msft
Community Support
Community Support

Hi  @nannimora ,

 

You could realize it in a matrix.

First create a dim table;

Then create a measure similarly as below:

Measure = IF(NOT(ISFILTERED('Slicer table'[account])),CALCULATE(SUM('Table'[sales]),FILTER('Table','Table'[Type]=SELECTEDVALUE('Slicer table'[Type]))),
IF(MAX('Table'[account]) in FILTERS('Slicer table'[account]),CALCULATE(SUM('Table'[sales]),FILTER('Table','Table'[Type]=SELECTEDVALUE('Slicer table'[Type])))+0,BLANK()))

And you will see:

 

v-kelly-msft_0-1613641831768.pngv-kelly-msft_1-1613641846663.png

 

For the related .pbix file,pls see attached.

 

Best Regards,
Kelly

Did I answer your question? Mark my post as a solution!

View solution in original post

2 REPLIES 2
v-kelly-msft
Community Support
Community Support

Hi  @nannimora ,

 

You could realize it in a matrix.

First create a dim table;

Then create a measure similarly as below:

Measure = IF(NOT(ISFILTERED('Slicer table'[account])),CALCULATE(SUM('Table'[sales]),FILTER('Table','Table'[Type]=SELECTEDVALUE('Slicer table'[Type]))),
IF(MAX('Table'[account]) in FILTERS('Slicer table'[account]),CALCULATE(SUM('Table'[sales]),FILTER('Table','Table'[Type]=SELECTEDVALUE('Slicer table'[Type])))+0,BLANK()))

And you will see:

 

v-kelly-msft_0-1613641831768.pngv-kelly-msft_1-1613641846663.png

 

For the related .pbix file,pls see attached.

 

Best Regards,
Kelly

Did I answer your question? Mark my post as a solution!

Shishir22
Solution Sage
Solution Sage

Hello @nannimora ,

 

Your requirement is not clear. You can always use visual level filter to hide columns.

Can you please come up with example of what you are expecting?

 

Thanks!

Cheers,
Shishir

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.