Forum Discussion

bidgeir's avatar
bidgeir
Most Valuable Professional
5 years ago

Calculating plan accuracy, circular reference

Hi all

 

I´m trying to calculate plan accuracy where I can "use" orders from +-1 week to fulfill the plan. As you can see in the image below I have 13 weeks. In those 13 weeks I have plan in column C and orders in column B. Columns A, B and C are my data, the rest is what I want to calculate. In column E I have calculated the Orders +-1 week but taking into account if there are any leftover from previous period. The problem is that the leftover are reliant on Orders +-1 week. This is possible in Excel because in the Orders +-1 week (column E) I reference leftover (column F) from the row above. So the leftover formula for line 3 is E3-C3 and the Orders +-1 week for line 3 is B4+IF(F2>SUM(B2:B3),SUM(B2:B3),IF(F2>0,F2,0)). 

 

 

In Power BI it´s not possible to reference a column/measure that relies on the source column/measure. 

 

The goal are column G, H and I using only columns A, B and C. So my main goal is column H line 15 (the total accuracy) but I would like to calculate accuracy pr. line and covered batches as well. 

 

The datasource is not Excel and not in this exact format but it´s reprecentative of the data source.

 

If anyone has an idea about how to go on about solving this in Power BI I would be very greatful. I don´t care if the solution is in Power Query or DAX. You can download the Excel file with this example and another one here: https://tinyurl.com/4b55kaxh  

 

I have just fiddled a little with it in Power BI so I don´t have any PBIX to share. 

 

/Ásgeir

5 Replies