Calculate a date based on running counter of a value
Hi,
I am trying to figure out a logic using RPAS rules to calculate dispatch date based on lead time and lead time value.
Example is given below:
Store Lead Time: Parameter set by user
DC Working Calendar: Parameter set by user
Store Replenishment Calendar: Parameter set by user
Lead Time Value: Calculated as 1 for days where DC working days is TRUE and 0 otherwise
Dispatch Date: Should be calculated only where DC working days is TRUE
The challenge I am facing is to calculate the Dispatch Date.
It should be calculated by finding the date where the sum of the LT Value between the dispatch date and the day before the current index adds up to the Minimum Store Lead Time. If the first date of the calendar is reached but Minimum Store Lead Time is not reached, Date of Dispatch will be marked as NA