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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Anonymous
Not applicable

Finding Sum of Calculated column

Hi All,

 

I believe this problem might have an easy solution but I'm not too sure.

 

I'm wanitng to find the total cost for a product with mutiple ingredients over a selection of past months when prices differ.

I've taken a simplified version of the two tables im using (below) which are connected via Ingredient ID with a many-to-many relationship. (ignore etc.)
BOM: 

Objekt_0-1629384179782.png

Component Cost:

Objekt_1-1629384196822.png

I'm trying to get a total cost for each product, which can vary depending on the month (ive not included date table here).
For product 1 in July, I've created this table and would like the Total Product Cost to add up to equal 1.5+425+6+154 = 586.5  but at the moment its giving the multiplied sum of Quantity and Price tables. 

Objekt_3-1629384683120.png

 

 

The formual I've used for Total Production Cost measure is below, I know it's wrong as I'm using sum on the columns but have no idea what else to use.

Total product cost = CALCULATE(sumx(BOM,BOM[Quantity])*SUMX('Component cost','Component cost'[price]))

What measure should I use to work out this addition? or is this not possible as I'm using a many to many relationship?
 
Thanks in Advance

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Merge these two table is power query using Indegrident id

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

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , Merge these two table is power query using Indegrident id

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

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.