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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

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
Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.