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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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