Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
Hi,
I have this table with recipes:
Table 1
Product | Raw material | Amount |
1 | 3 | 0.3 |
1 | 4 | 0.3 |
1 | 5 | 0.3 |
2 | 3 | 1 |
2 | 5 | 3 |
2 | 6 | 6 |
And another table (Table2) with planned usage of the products:
Usage Product
1000 | 1 |
20000 | 2 |
I made a measure that calculates the planned amount x the raw material amount used in the recipe:
And when I have solved this problem I have another problem to solve 🙂 Some of these raw materials are actually intermediates, so when I know how much I need of these intermediates, I should calculate the amount of needed raw materials for these intermediates. And of course some of the raw materials are the same as needed for ready products, so what I need is the total sum of these raw materials.
Anyone have any idea how I do that?
Thanx!
Hi @sw123 ,
Could you please provide more sample data and expected result with specific examples and calculation logic? Do you need to get the count of Raw material? Thank you.
Best Regards
Hi,
Here is an example of data (recipe):
Product ID | Planned production amount | Raw material ID | Needed raw material / kg | SUM of needed raw material |
1 | 1000 | A | 0.003 | 3 |
1 | 1000 | B | 0.035 | 35 |
1 | 1000 | C | 0.04 | 40 |
2 | 20000 | A | 0.003 | 60 |
2 | 20000 | B | 0.03 | 600 |
2 | 20000 | C | 0.04 | 800 |
What I want to do is simply calculate how much of raw materials A, B and C I need for producing products 1 and 2. Like this:
Raw material | Needed amount of raw material |
A | 6883,8798 |
B | 6125 |
C | 3290,0315 |
Does this help?