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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Almantas32
Helper II
Helper II

Sumx issues

Hey Guys,

 

I have a problem with simple measure using sumx function. I am trying to calculate the total weight of manufactured goods, by multiplying the quantity (produt.qty) with the weigth (weight) in related table, line by line.

I am using this formula: 

 

Total Weight = SUMX('public mrp_production', SUM('public mrp_production'[product_qty]) * RELATED('public product_template'[weight]))
 
The results line by line are correct, but the total is too small. What am I doing wrong? 
 
 
Any help much appreciated. 
 
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Almantas32 , Try like

SUMX('public mrp_production', 'public mrp_production'[product_qty] * RELATED('public product_template'[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

@Almantas32 , Try like

SUMX('public mrp_production', 'public mrp_production'[product_qty] * RELATED('public product_template'[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
Pragati11
Super User
Super User

Hi @Almantas32 ,

 

Try modifying your DAX as follows:

Total Weight = SUMX('public mrp_production',
SUM('public mrp_production'[product_qty]) * RELATED(SUM('public product_template'[weight])))

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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