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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
laura_ESNH
Frequent Visitor

Sum of Calculated Measure

I am managing a program where we are tracking individuals weight loss and the overall success of the group.

I have one table with the participants initial weights:

laura_ESNH_0-1617200385635.png

There is a separate table that contains the monthly weigh-in information.

laura_ESNH_1-1617200385641.png

I created three calculated measures to track the individuals weight loss progress:

laura_ESNH_2-1617200385643.png

Starting Weight = CALCULATE(MAX('Participants'[Starting Weight]))

Current Weight = CALCULATE(MAX('Monthly Weigh-in'[Weight]),FILTER(ALL('Monthly Weigh-in'[Date].[Date]), 'Monthly Weigh-in'[Date].[Date]= MAX('Monthly Weigh-in'[Date])))

Weight Loss = 'Monthly Weigh-in'[Current Weight] - 'Monthly Weigh-in'[Starting Weight]

 

It resulted in an accurate table of the individual's progress:

 laura_ESNH_3-1617200385645.png

The issue I’m having is when I try to use the Weight Loss calculated measure to get an overall sum of the group weight loss. I tried adding the Weight Loss measure to a Card visual, but the “Sum” is not accurate. It should be -20.2.

laura_ESNH_4-1617200385646.png

From the research I’ve done, I think I’m supposed to use the SUMX function. I created this measure:

Overall Weight Loss = SUMX(DISTINCT('Monthly Weigh-in'[Initials]), 'Monthly Weigh-in'[Weight Loss])

I also replaced “DISTINCT” with “VALUES”, but neither yielded the correct results.

laura_ESNH_5-1617200385646.png

Based on everything I’ve read, I think I’m on the correct path. I just need some help getting this figured out.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@laura_ESNH , Try a measure like

sumx(values('Participants'[initials]), 'Monthly Weigh-in'[Current Weight] - 'Monthly Weigh-in'[Starting Weight])

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

@laura_ESNH , Try a measure like

sumx(values('Participants'[initials]), 'Monthly Weigh-in'[Current Weight] - 'Monthly Weigh-in'[Starting Weight])

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

I just needed to use the table that only had the participant listed once. I was so close, thanks for bringing this across the finish line. 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 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.

Top Solution Authors
Top Kudoed Authors