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

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.

Reply
aashton
Helper V
Helper V

Help with matrix sum by groups

Hello,

I have a table set-up as below:

aashton_0-1661269272236.png

 

I'd like to use a matrix to set it up similar to a pivot table:

aashton_1-1661269312687.png

 

 

I've tried different ways and can't get it to work.  I've put BDO and State in the Rows, and have created measures for totals of phase 1, 2, and 3 and put that in the values.  But for example, the total for Phase 1 is repeating the grand total, not the total by BDO by State.  This is the formula I used:  

Total Phase 1 = CALCULATE(SUM('BDO Goals'[Phase 1 Goal]), ALLEXCEPT('BDO Goals','BDO Goals'[BDO],'BDO Goals'[State])).
This should work. Not sure why it doesn't???

 

1 REPLY 1
PaulDBrown
Community Champion
Community Champion

The measure you need is a simple SUM for each Phase. The fields in the rows provide the filter context you need

Having said that, I would model your data differently.

Table 1 would include BDO, State and the Phases Unpivotted. You can then create a simple SUM for the values and set up the matrix with the phases field (from the diemnsion table- see below) as the columns for the matrix.

Table 2 would exclude the phases columns. 
Table 3, 4 and 5 would be dimension tables for Phases, BDO and State, with one-to-many relationships between the corresponding fields in Table 1 and 2.

 

However this decision very much depends on what you need to depict in the report





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.