Opening & Closing Balances

Hi there.

I am trying to forecast inventory levels based on assumed sales (4-month average sales as at the end of March) and purchases that will be arriving.

All amounts are measured in KG’s.

I am struggling with the DAX formula to get my closing balance of my inventory to work out correctly.

The opening balance is equal to the closing balance of the previous month (except for April - this is the actual inventory level at the beginning of the month).

I need the closing balance to be worked out as follows: opening balance + stock change). When I try this, I get an error saying there is a circular dependency. I have therefore had to use another column just to get the visual to show.

Please can someone help me!!

Here is the pbix file:
dummy pbi.pbix (364.1 KB)