Stock based on previous month

Hello, I need to project stock needs for the coming months. I have monthly sales by material code, the current stock for all materials, and finally, upcoming arrivals. What I need is for the first row (current month) to add up arrivals + initial stock - sales.
And for that number to be next month's stock.

I know I can do it with Iterate, but I can't figure out how.

Hi Melissa,

It's not clear from your description how exactly the calculation should work. Can you please provide an example of the required calculation?

Sorry, I didn't explain it well.

I'm attaching two images showing how we currently do it in Excel.


Thank you for the clarification. In this case, you don't need iterations - a cumulative sum will be sufficient (adjusted for the start balance).

See the example below:

stock-balance.morph (5.0 KB)
Sales-Arrivals.xlsx (8.7 KB)

1 Like