# Circular reference with previous value

Options

Hi,

I have two line items in my module. The first value in the first line item is picked up from an another module, but the second value is first value of second line item and so on. My second line item is a product of first with some number (x)

When I use Yield = Starting Yield Coupon * X - I get a circular referencing warning error. I have used the forumla below for "Starting Yield Coupon"

IF Period.Coupon = 1 THEN Rates.Base Yield Coupon[LOOKUP: Period.Previous] ELSE Yield[LOOKUP: Period.Previous]

Where "Previous" is a property to identify previous value and "Coupon" to identify the first value.

Is there any other way to get this done?

Tagged:

• Options

Hi,

In summary of your issue, formula for first line is the previous value of 2nd line. And, formula for 2nd line = Line 1 * factor 'x'.

Clearcut  circular refernce issue.

Prima facie, looks like there is something wrong with the logic, you are trying to build. Please check once.

Regards,

Pavan

• Options

Hi Pavan,

Yes, you got the logic correct but I think the piece you missed out was the initialization. The first value of the first list (in column 1) is taken from another source. I am attaching the logic in Excel for reference.

Let me know if this helps!

• Options
Hi,
Okay, got it.
Then, how is the values calculated in Yield (Column E)?

Pavan
• Options

Hi Pavan,

Yield is a function of Starting Yield i.e E3 = D3 * x (where x is some constant). Similarly E4 = D4 * x and so on

• Options

Hi,

Got it.

Both lines are refering to each other. This cannot happen. Please check with the business to take clarity on the requirement.

Regards,

Pavan

• Options
Hi Only way you can achieve this would be using offset and other time based functions.

The limitation is it just works with the time list but does not work with general lists.
• Options
Yes. You are right Harish.

Regards,
Pavan
• Options

Hello,

I'm facing the same problem.

How did you solve the it ?

For example : W1 : B = A - X

W2 : the value of A is the previous value of B

Thanks & Regards.

• Options

Hi Salma,

the anaplan formula PREVIOUS() is how you will solve it

• Options
you can "transcode" your values onto a daily timescale line item and use the days as your list or artificial steps in your calculation. Being on time you can then use the time functions.
can be a size heavy solution but works
• Options

Hello ,

the Previous formula does not work 😕

• Options
what do you mean ? maybe open a topic
• Options

Is this what you meant for?

If you have the model calendar, you can use 'Previous' formula (as Mr.  @nathan_rudman  said) and avoid circular reference.

In original topic, it seems not to use the model calendar, and it is difficult to avoid circular reference, probably.

(Sorry, if I've misunderstood your question.)