Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

Overcome circular dependency creating Stock overview

Dears,

 

I am a new BI-user and therefore desperately need your support. 

I have built an Excel file to calculate whether I need to produce and how much I need to produce then, based on calculated stocks:

 

I am trying to get this calculation in Power BI by using an calculated column. However, I experience a "Circular Dependency" (what I understand) that I would like to overcome/avoid. I don't know how.

 

This is what I currently have:

 

 

["MRP (voorraad begin orderregel)"] depends on ["MRP (voorraad eind orderregel)"] in case ["Volgorde #"] > 1.  However, ["MRP (voorraad eind orderregel)"] is calculated by ["MRP (voorraad begin orderregel)"] minus ["Order Qty"]. So there is a circular dependency. Since it works in Excel (surprisingly) I assume it can work in Power BI as well. 

Basically this is what I want to achieve:

I am currently using the following DAX-formulas in Power BI:

"Volgorde-1":

"Test1":

"MRP voorraad begin orderregel":

I need to replace 'Combinatie'[Balans] in the latter one by the above formulas, however, then I am experiecing the circular dependency error.

 

Could you please support me in overcoming/avoiding it? 

 

Thanks a lot for your support!

 

KR, Tom

 

1 Reply

  • Calculated columns can usually be pushed upstream into Power Query.  That will also remove the circular dependency.