A problem with a cumulative calculation measure

HI All

200727_ACE_Quality_Targets.pbix (356.6 KB) !
screen shot|522x281
Check.xlsx (21.0 KB)

I am struggling since 1 week on this issue and I would like to ask for your support.

I need to calculate the values of scrap over a process. In attachment you can find the PowerBI Model

  1. I Have 100 product and for each product I have “Y” Process step to produce it (let´s take as example the “product 10” – with 5 process step - see screenshot)

  2. The values (cost) of my product increase for each process step. For this reason I have to consider the cumulative cost for the scrap cost calculation

  3. The Value of my product is given by the sum of “BOM cost” + “Labour” + “Process cost”

  4. Set Up Scrap cost per one pc produced are = Set up scrap * Cumulative total cost without scrap / Batch size

  5. When I calculate the “Cumulative total cost without scrap” the calculation is correct but when I used this measure to calculate the “Set up Scrap cost” I got wrong number

PowerBI use the column of “Total cost without scrap” instead of the “ Cumulative total cost without scrap” despite I have specified the right measure

See “check.xlsx” file column “T” (the correct calculation) and column F (the wrong PowerBI Calculation) / Column U (Check wrong calculation).

I can not understand where I am mistaking.

Your help will be really appreciated

Thanks in advanced

FG

Kindly use the measure below and it will give you the correct figure based on the explanation above. I have implemented it and got the answer expected.

SetUp Scrap Cost2 =
VAR SetUPScrap = SUM(Process_Flow_Facts[TARGETSet up scrap[units/batch]]])
VAR BatchSize = SUM(Process_Flow_Facts[TARGETMin Batch size[pc]]])
RETURN
DIVIDE(SetUPScrap * [Cumulative total Production cost w/o Scraps],BatchSize)

Also make the format to be 6 decimal places in order to see the result you expect

Woooooowwww….thanks a lot for the quick and effective support :-)! I really appreciate it

You are Welcome. Cheers :smiley: