Here is my original table below:
I am trying to use the fifth row’s Action value, which is “2021/09/01 PchOrd” to fill all the row above, because this code’s quantity is not enough untill a supply(PchOrd) happens on Sep 1st. You can see column Aggregation is negative until Sep 1st. I want to remind everyone that this demand can be covered on Sep 1st, so that maybe you can make some preparations or plans.
It should look like this:
I think the difficulty is that there are many different code. so the number of rows to be fill cannot be predicted in advance. But the rule is that if next supply can cover the demand, there will be an action plan. I want to put this action in the previous rows, aggregation of each is negative. If the aggregation is positive, then stop.
Hope I express clearly:) Thanks a lot !!!