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
jerryr125
Helper III
Helper III

Table Visualization - Hide a column

Hi - 

I have a table visualization and I would like to a hide the column if another column (variable) equals 0)

 

Example:

 

Food TypeAmount1Amount2Amount3
Ice Cream101510
Cake151230
Cookies81242

If variable Amount3Target = 0 then do NOT display column 3

 

Food TypeAmount1Amount2
Ice Cream1015
Cake1512
Cookies812

Any thoughts would be appreciated - Jerry

2 ACCEPTED SOLUTIONS
FarhanJeelani
Super User
Super User

Hi @jerryr125 ,

Use a Matrix Instead of a Table

  • Use a Matrix visualization.
  • Drag Food Type to Rows.
  • Drag Amount1, Amount2, Amount3 to Values.
  • Apply a visual-level filter:
    "Show columns where Amount3Target is not 0."
    This will automatically remove the column when the target is 0.

Please mark this post as solution if it helps you. Appreciate Kudos.

View solution in original post

v-sathmakuri
Community Support
Community Support

Hi @jerryr125 ,

 

Thank you for reaching out to Microsoft Fabric Community.

 

Thank you @lbendlin  and @FarhanJeelani  for your prompt response.

 

I have created the data where the Amount3 column contains both 0 and non-zero values. If Amount3 is 0, we first need to unpivot the data, then build the table using a Matrix visual. Next, apply a filter on the Value column to show only non-zero values. This ensures that the Amount3 column automatically hides when all its values are 0.

 

The PBIX file is attached for reference. Let us know if you have any further questions!

 

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! 

View solution in original post

4 REPLIES 4
v-sathmakuri
Community Support
Community Support

Hi  @jerryr125 ,

May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

Thanks!!

v-sathmakuri
Community Support
Community Support

Hi @jerryr125 ,

 

Thank you for reaching out to Microsoft Fabric Community.

 

Thank you @lbendlin  and @FarhanJeelani  for your prompt response.

 

I have created the data where the Amount3 column contains both 0 and non-zero values. If Amount3 is 0, we first need to unpivot the data, then build the table using a Matrix visual. Next, apply a filter on the Value column to show only non-zero values. This ensures that the Amount3 column automatically hides when all its values are 0.

 

The PBIX file is attached for reference. Let us know if you have any further questions!

 

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! 

lbendlin
Super User
Super User

Unpivot your data to bring it into usable format. Then apply the row filter accordingly.  Let the matrix visual do the re-pivoting.

FarhanJeelani
Super User
Super User

Hi @jerryr125 ,

Use a Matrix Instead of a Table

  • Use a Matrix visualization.
  • Drag Food Type to Rows.
  • Drag Amount1, Amount2, Amount3 to Values.
  • Apply a visual-level filter:
    "Show columns where Amount3Target is not 0."
    This will automatically remove the column when the target is 0.

Please mark this post as solution if it helps you. Appreciate Kudos.

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.