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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Matrix Row level Total Calculation

In my sample data B1,B2, B3 is child level of B, so we don't sum them in the total. However I need to show them in the detail.  Please give me some idea 

 

Project CodeAmount 
101A100
101B800
101B1160
101B2320
101B3210
102A130
102B800
102B1270
102B2260
102B3560

 

Final Result:

EricWu_0-1661894503625.png

 

 

1 ACCEPTED SOLUTION
HoangHugo
Solution Specialist
Solution Specialist

Hi, please try this

measure

SUM = 
var select_code = SELECTEDVALUE (Code column)

return if (select_code <> blank(),SUM(Amount),CALCULATE(SUM(Amount), Code column in {"A","B"}))

View solution in original post

2 REPLIES 2
HoangHugo
Solution Specialist
Solution Specialist

Hi, please try this

measure

SUM = 
var select_code = SELECTEDVALUE (Code column)

return if (select_code <> blank(),SUM(Amount),CALCULATE(SUM(Amount), Code column in {"A","B"}))

Anonymous
Not applicable

Thanks a lot, It works for me 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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