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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Andy_Peak
New Member

Sum values from multiple rows and columns by corresponding variables

I'm struggling with writing my DAX code to return the sum totals I need. Below is a sample data set based on what I'm working with. Based on how the data is structured, I need to return the total savings per facilitator - the totals per facilitator for this example data set are listed above the table. When we have multiple facilitators in a row, the total savings for that row is evenly allocated to each facilitator. Some rows only contain one facilitator, while other rows could have two or even three facilitators. 

 

Facilitator A = 1700

Facilitator B = 1400

Facilitator C = 1350

 

 

Primary FacilitatorPrimary Facilitator SavingsSecondary FaciliatorSecondary Facilitator SavingsTertiary FaciliatorTertiary Facilitator SavingsTotal Savings
Facilitator A750Facilitator B750Facilitator C7502250
Facilitator C500Facilitator A500  1000
Facilitator B250    250
Facilitator A50    50
Facilitator C100Facilitator B100Facilitator A100300
Facilitator B300Facilitator A300  600

 

Thanks!

Andy

1 ACCEPTED SOLUTION
v-yuta-msft
Community Support
Community Support

Hi Andy_Peak,

 

To achieve your requirement, duplicate your original table to three tables. Remove columns in the three table as below:

Table1:                                                                            Table2:

1.PNG2.PNG 

Table3:

3.PNG 

 

Then Append Table1, Table2 and Table3:

捕获.PNG 

 

Finanlly, after applied&closed, create a measure using DAX below:

Result = CALCULATE(SUM(Append1[Facilitator Savings]), ALLEXCEPT(Append1, Append1[Facilitator]))

捕获2.PNG 

 

Regards,

Jimmy Tao

 

View solution in original post

2 REPLIES 2
v-yuta-msft
Community Support
Community Support

Hi Andy_Peak,

 

To achieve your requirement, duplicate your original table to three tables. Remove columns in the three table as below:

Table1:                                                                            Table2:

1.PNG2.PNG 

Table3:

3.PNG 

 

Then Append Table1, Table2 and Table3:

捕获.PNG 

 

Finanlly, after applied&closed, create a measure using DAX below:

Result = CALCULATE(SUM(Append1[Facilitator Savings]), ALLEXCEPT(Append1, Append1[Facilitator]))

捕获2.PNG 

 

Regards,

Jimmy Tao

 

Thanks Jimmy! Worked perfectly. 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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
Top Kudoed Authors