Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
Hi all,
I'm trying to create a matrix including subtotals, so for example:
| A | B | C | Subtotal A/B/C | D | E | F | Subtotal D/E/F | |
| x | 10 | 5 | 10 | 25 | 5 | 5 | 10 |
Now i created a measure for every single column in the matrix, otherwise i couldn't add the subtotals.
In this example you can see F has no value in the column. Therefor, i want to hide column F. As i created all different measures Power BI will not do this automatically. Is there a way to autosize the column to zero (by using DAX) when a column is blank? (When you select another filter option, column F is filled with a value, and maybe column D will be empty)
Or is there another way to create subtotals in a matrix view by just place the value (A/B/C/D/E/F) in the column and add the subtotals in a different way?
Hopefully somebody can help me! I would like to hear from you! 🙂
Hi @Anonymous ,
Please have a try.
I have also found some similsr posts, please refer to.
Solved: How to hide columns in matrix table and keep only ... - Microsoft Power BI Community
Solved: hiding columns in Matrix - Microsoft Power BI Community
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ Rongtie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Please have a try.
I have also found some similsr posts, please refer to.
Solved: How to hide columns in matrix table and keep only ... - Microsoft Power BI Community
Solved: hiding columns in Matrix - Microsoft Power BI Community
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ Rongtie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous,
Thanks for your replay!! 🙂 Unfortenately I don't have that option on a measure. I created measures for every columnlabel, as i need to create the subtotals in between the matrix (See prtscreen).
The matrix shown now only contains rows and measures (so no column values). Every column is another measure, so example given: measure 1 = Calculate([ACT], filter ('Column', [Column] = "A")), same for B,C,D, etc. Also a measure is created for the subtotals (Sum A, B, C).
As i use measures columns are fixed and I cannot use the "show items with no data" option. Therefor I was wondering whether there is an option to:
- autosize a column with to 0.0 when a measure does not have any value (probably by using DAX). In that scenario the column is hidden when the measure is blank.
- or, if there is a way to create subtotals in a matrix using the column tab (based on groups). So my values in the column will be A, B, C, D, E, F. Subtotal needs to be created for the total of ABC and the total of DEF. (Unfortenately I couldnt find any functionality for this in PowerBI)
Hope this clears what i mean 🙂 Hopefully you can help me! 🙂
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.