Circular References - OFFSET

Highlighted
Occasional Contributor

Circular References - OFFSET

Hi,

 

I want to create something like the below example, but Anaplan returns circular references.

Could you please give me an idea?

 

Example

example1.png

 

In the above example, I input below formulas

Last month stock = PREVIOUS(Stock) 

Consumption = get from different module

Planned Received Amount = OFFSET(Recommended Order Quantity, -1, 0) 

Stock = Last month stock - Consumption + Planned Received Amount

Lead time = get from different module

Recommended Order Quantity = IF Stock > OFFSET(Consumption, 1, 0) THEN 0 ELSE OFFSET(Consumption, 1, 0) - Stock

 

However, I want to change "Planned Received Amount" formula to  OFFSET(Recommended Order Quantity, -Lead time, 0) 

I can understand if lead time is less than 0 this would be a circular reference, but lead time is always over 0.

 

Any ideas to resolve this?

 

Ayumi

 

 

 

 

 

3 REPLIES 3
Highlighted
Community Boss

Re: Circular References - OFFSET

you can try LAG in strict mode

https://help.anaplan.com/anapedia/Content/Calculation_Functions/All/LAG.html

Nathan Rudman, Anaplan Model Builder
Highlighted
Occasional Contributor

Re: Circular References - OFFSET

Thank you so much!
Highlighted
Community Boss

Re: Circular References - OFFSET

as a note, I personally almost never use offset. I prefer the lag and lead, the reason being this way you see immediately what the formula does.

Nathan Rudman, Anaplan Model Builder