Hi everyone,
I've looked into mutlirow and macro tools but I can't find a way to fix my issue.
I've got:
- date (all the values are known)
- sells (all values are known)
- starting_inventory (value of day 1 is known)
- ending_inventory (value of day 1 is known)
- shipment (value of day 1 is known)
- min_inventory (all the values are known)
- min_order_size (all values are know)
For the first date, I have all these fields filled up, so no issues for my intialization.
For every single day after this I need to do:
- starting_inventory = ending_inventory[-1] (-1 here means the day before)
- ending_inventory = starting_inventory - sells + shipment[-1]
- shipment = max(min_inventory - ending_inventory, min_order_size) (I want to order enough so that I have at least my min_inventory, technically it would be the min_inventory of the next day, but here it's OK to proceed like this)
I would therefore need to edit both the columns of ending_inventory and shipment. Days have to be calculated sequentially and can't be vectorized. My last resort is to call a Python script but I want to make sure there isn't an Alteryx way of doing it.
Is there a way to do this?
Thanks!