Join 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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi Power Bi Community,
I'm struggling calculating the Subtotal in a rows. This problem is similar to this I have week ago. Thanks to @Greg_Deckler
When I went to the paint roller and turned on the Subtotal, somehow it doesn't show me the subtotal in a row instead it displayed the Total per column and is wrong too.
I want the Total amount in a row. How can I write a formula or do I need to create a new measure?
Col1 = SWITCH(TRUE(), MAX('Table2'[Category]) = "A", CALCULATE(COUNT(Table1[Percent]),FILTER(Table1,[Buck]= "25%")), MAX('Table2'[Category]) = "E", CALCULATE(SUM(Table1[ABC]), FILTER(Table1,Table1[Buck] = "25%"),FILTER(Table1,Table1[Rank] = "Yes")), MAX('Table2'[Category]) = "D", CALCULATE(SUM(Table1[ABC]), FILTER(Table1,Table1[Buck] = "25%"), FILTER(Table1,Table1[Rank] <> "Yes")), MAX('Table2'[Category]) = "C", FORMAT(DIVIDE([INF],[TotalSumABC]),"0.0%"), MAX('Table2'[Category]) = "B", CALCULATE(SUM(Table1[Amt]),FILTER(Table1,SEARCH("25%)",[Buck],1,0))), MAX('Table2'[Category]) = "F", CALCULATE([INF] - [Value]), MAX('Table2'[Category]) = "G", FORMAT(DIVIDE([VAR],[Value]),"0.0%"))
Solved! Go to Solution.
Presuming you are using a matrix visual, you will need to create a 3rd measure that is the sum of Col1 and Col2
TotalCol = [Col1] + [Col2]
Then put TotalCol in your visual next to Col1 and Col2
If, instead, Col1 and Col2 are values from the data (for example year, location, etc), you can put that field in the "Columns" of the matrix and you will get the option to turn column values on or off.
Hope this helps
David
You can create a measure that adds Col1 and Col2. The only way to have the visual provide column subtotals is to have columns defined for the matrix (as opposed to just multiple measures as in your case).
Hope this helps
David
Presuming you are using a matrix visual, you will need to create a 3rd measure that is the sum of Col1 and Col2
TotalCol = [Col1] + [Col2]
Then put TotalCol in your visual next to Col1 and Col2
If, instead, Col1 and Col2 are values from the data (for example year, location, etc), you can put that field in the "Columns" of the matrix and you will get the option to turn column values on or off.
Hope this helps
David
Thank you 🙂
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.