Good Evening,
I have two datasets of a shop referred to the same time period;
the first set's columns are: Date - Quantity Ordered - Initial Inventory - Final Inventory After the Order(= Column 2 + 3)
Since orders are not made on a daily basis, I completed the set with zeros, in order to have a complete series of dates.
The second set's columns are: Date - Quantity Sold.
I would like to create a dataset in which the Inventory is updated according to sales, on a daily basis, merging the two dataframes.
For example: On the 01-01-2017, Quantity Ordered = 20, Initial Inventory = 5, Final Inventory = 25, Quantity Sold = 8, Actual Inventory = 25-8 = 17;
If I compute the difference between columns, sometimes it may happen that Actual Inventory = -3, because I completed the initial date series with zeros as missing values!
Does anyone know how to address this question?
Best Regards, Alex