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
jsangerman
Helper II
Helper II

Sum minus value from related table

I have two tables:

 

People

PersonCapacity
John1
Mike0.8
Alice0.4

 

Utilization

PersonPeriodProjectUtilization
John10/1/2021Project 10.5
John10/1/2021Project 20.4
John11/1/2021Project 11
Alice10/1/2021Project 20.5

 

I'm trying to calculate the available capacity for each person (rows) for each period (columns), equal to the capacity of the person minus the sum of the utilization for the period. The result I'm looking for is this table:

Person10/1/202111/1/2021
John0.10
Alice-0.10.4
Mike0.80.8

 

What DAX formula gets me there?

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@jsangerman , Try one of the two measures

 


Sum(people[Capacity]) - sum(Utilization[Utilization])

 

or

 

Sumx(summarize(Utilization, people[person], people[Capacity], Utilization[Period], "_1", sum(Utilization[Utilization])), [Capacity] -[_1])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@jsangerman , Try one of the two measures

 


Sum(people[Capacity]) - sum(Utilization[Utilization])

 

or

 

Sumx(summarize(Utilization, people[person], people[Capacity], Utilization[Period], "_1", sum(Utilization[Utilization])), [Capacity] -[_1])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

The second option is exactly what I needed, and I understand how it works. You're using SUMMARIZE to create a new table with 1 value for Capacity plus the sum of Utilization for a given person and period. The math is simple from there.

 

Thank you.

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.