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

View all the Fabric Data Days sessions on demand. View schedule

Reply
micdwo
Regular Visitor

hide second column in matrix

Is there any way to hide columns for below layout in matrix?

For Subname3 I would like to display data however for others (Subname1, Subname2) to hide them because they are blank.

Similarly applies to other Names: Name2, Name3 etc (matrix is large)

 

multiple rows

2 columns (name1, subname1,2,3)

2 values (displayed as column 1, column 2)

 

 Name1
 Subname1Subname2Subname3
IDColumn 1Column 2Column 1Column 2Column 1Column 2
1value value valuevalue
2value value valuevalue
3value value valuevalue
4value value valuevalue
5value value valuevalue

 

 

keepto removekeepto removekeepkeep
1 ACCEPTED SOLUTION
v-venuppu
Community Support
Community Support

Hi @micdwo ,

To hide the Column2 Display in the matrix only for specific Subname values (e.g., when Subname "not equal to" Subname3), Power BI doesn’t support dynamic column removal. However here are few workarounds that will help:

Use a measure that returns BLANK() when Subname  "not equal to" Subname3 to hide values.Apply conditional formatting to make the column appear invisible (e.g., white font/background).Use slicers or bookmarks to toggle matrix visuals based on Subname.Create separate matrix visuals for different Subname values if needed.

Thank you.

View solution in original post

10 REPLIES 10
v-venuppu
Community Support
Community Support

Hi @micdwo ,

I hope the information provided is helpful.I wanted to check whether you were able to resolve the issue with the provided solutions.Please let us know if you need any further assistance.

Thank you.

v-venuppu
Community Support
Community Support

Hi @micdwo ,

May I ask if you have resolved this issue? Please let us know if you have any further issues, we are happy to help.

Thank you.

v-venuppu
Community Support
Community Support

Hi @micdwo ,

I wanted to check if you had the opportunity to review the information provided and resolve the issue..?Please let us know if you need any further assistance.We are happy to help.

Thank you.

HarishKM
Memorable Member
Memorable Member

@micdwo Hey,
In Power BI Report Builder, you can achieve the dynamic hiding of columns in a matrix by using expressions to control the visibility property of each column. To address the need for displaying only columns with data, follow these steps: 

  1. Set the visibility property of each column based on its content. For example, for columns "Subname1" and "Subname2", use an expression like =IIF(IsNothing(Fields!Subname1.Value), True, False) in the visibility property.
  2. This will hide columns that are blank or have no data. Apply filters at the dataset level to conditionally include only the rows where data exists for certain columns.This ensures that the matrix only processes items with valid data.
  3. Once columns are hidden based on the above conditions, the layout will automatically adjust to fill in gaps where columns are hidden.
  4. This method allows for conditional visibility that reflects the actual data and minimizes clutter by hiding unnecessary columns based on your matrix's data set.

Thanks

Harish KM

If these steps help resolve your issue, your acknowledgment would be greatly appreciated.

v-venuppu
Community Support
Community Support

Hi @micdwo ,

To hide the Column2 Display in the matrix only for specific Subname values (e.g., when Subname "not equal to" Subname3), Power BI doesn’t support dynamic column removal. However here are few workarounds that will help:

Use a measure that returns BLANK() when Subname  "not equal to" Subname3 to hide values.Apply conditional formatting to make the column appear invisible (e.g., white font/background).Use slicers or bookmarks to toggle matrix visuals based on Subname.Create separate matrix visuals for different Subname values if needed.

Thank you.

micdwo
Regular Visitor

Hi,

Thank you for your responses.

So I'm looking for solution to hide Column 2 Display (as in sample file) for the specific column Subname (Subname is below Name in matrix column).

 

v-venuppu
Community Support
Community Support

Hi @micdwo ,

Thank you for reaching out to Microsoft Fabric Community.

Thank you @rohit1991 @burakkaragoz for the prompt response.

 

I have created a sample PBIX file by using sample data to replicate the scenario.Please go through the attached PBIX file for your reference.

Thank you.

micdwo
Regular Visitor

I enclose screenshot for better presentation of desired layout

micdwo_0-1753450189008.png

1. Show items with no data - I keep it turned off as below however nothing changed

micdwo_1-1753450746121.png

 

2. For column 2 'Subname3' has values, other Subnames have them blank (no space, null, N/A etc.)

3. DAX Measure as suggested with ISBLANK replaced in 'Values' however matrix displays then only one column (either column 1 which is ok OR column 2 only for Subtype3), not sure how to display ALL values from column 1 and conditionally only Column2 for Subtype3.

 

Thank you in advance.

 

rohit1991
Super User
Super User

Hi @micdwo ,

 

Here’s what works best:


1. Easiest fix: Go to your matrix’s Format pane, find the “Values” section, and turn OFF “Show items with no data.”
This usually hides any columns (or subname columns) that are completely blank.

 

2. If you still see empty columns:  Sometimes columns look blank but actually have zeros, spaces, or “nulls” that Power BI doesn’t treat as blank. Try putting your Subname field into the Visual Filters and set it to exclude blanks or filter just the subnames you want to see.


3. DAX measure for even more control: If you want to be 100% sure columns are hidden when there’s nothing to show, you can use a custom measure like: 

 

Show Column =
IF(
    ISBLANK([Column 1]) && ISBLANK([Column 2]),
    BLANK(),
    [Column 1] // or whichever value makes sense for your setup
)


Power BI will automatically hide columns that only return BLANK. If you want to only show a specific subname (like Subname3), you can use a measure like:

Show Subname3 Only =
IF(
    SELECTEDVALUE([Subname]) = "Subname3",
    [Your Value Measure]
)

 

Turn off “Show items with no data” first it solves most cases. Use BLANK()-based DAX if you want to get fancy or the basics don’t work.


Did it work? ✔ Give a Kudo • Mark as Solution – help others too!
burakkaragoz
Community Champion
Community Champion

Hi @micdwo ,

 

You've got a few ways to tackle this depending on how your data is structured.

Easiest fix - Visual settings: Go to your matrix formatting options, find Values section, and turn off Show items with no data. This should automatically hide those empty subname columns.

If that doesn't work: Add your Subname field to the visual filters pane and exclude blanks. This way only subnames with actual data will show up.

For a cleaner approach: Create a simple measure like this:

Display Column 1 = 
IF(ISBLANK([Column 1]) && ISBLANK([Column 2]), BLANK(), [Column 1])

Use this measure instead of your original columns. Power BI will automatically hide columns that return only blanks.

Quick question: Are those blank subnames actually empty in your data, or do they contain spaces/null values? Sometimes what looks blank isn't technically blank to Power BI.

Try the visual settings first - that's usually the quickest win for this type of issue.


If my response resolved your query, kindly mark it as the Accepted Solution to assist others. Additionally, I would be grateful for a 'Kudos' if you found my response helpful.
This response was assisted by AI for translation and formatting purposes.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors