## Circular References - OFFSET

Certified Master Anaplanner

## 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

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

1 ACCEPTED SOLUTION

Accepted Solutions
Master Anaplanner/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
3 REPLIES 3
Master Anaplanner/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
Certified Master Anaplanner

## Re: Circular References - OFFSET

Thank you so much!
Master Anaplanner/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