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
Can you clarify:
Why only Week 5 needs to display data, why not all the previous weeks?
Is Week 5 your current period and what should be the logic for future weeks?
Here is what I was doing. This is not your desired outcome but you can take a cue from here. If not I will develop it further once I receive clarifications from you
Week 5 is not the current week.
5 weeks are just for an example.It is a continuous data. It may be for 52 weeks or more and irrespective of current weeks, CF of all the future weeks to be adjusted.