This is pretty much what I was doing. Except for the part that you put bith KF as inputs.
That's an interesting twist.
My 2 planning Levels PERPRODPOSPROMO & PERPRODPOSPROMO1 are the same level except one is at Week-1.
This means that the value in KAMLIFTCENTSOFF in Week15 is copied to Week14 to KAMLIFTCENTSOFFW1.
Then I'm trying to figure if I already had a KAMLIFTCENTSOFF in Week14 and I take the MAX value for week14 between KAMLIFTCENTSOFF & KAMLIFTCENTSOFFW1.
The issue is if one is not initialized the calculation fails.