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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.