Need suggestions on how to build the logic in Anaplan to solve the problem in the attached file.
Negative CF is to be adjusted first from the previous weeks and then if balance amount is there then we have to look into the future weeks for the adjustments.
For a specific week, you can go back by "m" weeks for adjusting the negative CF and then go forward by "n" weeks for adjusting the negative value.
5 weeks time period is just for an example and it can be 52 weeks or more and irrespective of current week all the future weeks to be adjusted