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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.