Forum Discussion
hide second column in matrix
- 1 year ago
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.
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.