Forum Discussion

sw123's avatar
sw123
Helper III
5 years ago

Recipe usage

Hi,

 

I have this table with recipes:

 

Table 1

ProductRaw materialAmount
130.3
140.3
150.3
231
253
266

 

And another table (Table2) with planned usage of the products:

Usage      Product

10001
200002

 

I made a measure that calculates the planned amount x the raw material amount used in the recipe:

SUM('Table2'[Usage]) * SUM('Table1'[Amount])
 
This works fine in a table with each product and it´s raw materials but how do i calculate the total usage of the specific raw materials? I can´t seem to get that to work.
 
Thanx!

3 Replies

  • 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!

    • Anonymous's avatar
      Anonymous
      Not applicable

      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

      • sw123's avatar
        sw123
        Helper III

        Hi,

         

        Here is an example of data (recipe):

        Product IDPlanned production amountRaw material IDNeeded raw material / kgSUM of needed raw material
        11000A0.0033
        11000B0.03535
        11000C0.0440
        220000A0.00360
        220000B0.03600
        220000C0.04800

         

        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 materialNeeded amount of raw material
        A6883,8798
        B6125
        C3290,0315

         

        Does this help?