Avoid circular reference using list member logic

Wolf37
New Contributor

Avoid circular reference using list member logic

Hi all,

 

I’m new to Anaplan and would really appreciate help with the following:

 

I'm trying use the same module ('Module A') for two stages of a calculation (before and after); for this, 'Module A' has only one dimension; a list or two members ('Before' and 'After'), image attached. it's first line item (Item A1) sets a fixed value for the 'Before' list member and should set a reference to 'Module B' for the 'After' list member. Right now it only sets to zero in the attached image because of the circular reference, if the circular reference could be resolved it would be: 

 

IF ITEM(Cutoff) = Cutoff.Before THEN 1 ELSE Module B.'Item B2'

 

'Module B' has no dimensions, and its first line item takes the second line item of 'Module A', selecting list member 'Before'. Image attached.

 

As I mentioned, if I apply the formula above, i get a circular reference. I understand the reason of the circular refence because of the line items involved, but I wanted to know if this can be avoided by selecting the proper list members in the calculations; as you can see, logically, I'm not incurring in a circular reference, since I'm first doing the 'Before' calculations and later the 'After', even though the line items are the same.

 

I understand this is a matter of what Anaplan is designed to do; if it will get a circular reference even if the logic is sound list member wise, there is nothing I can do, just wanted to know if that is the case or if there is a way to avoid the circular reference through list member logic, even if the line items are incurring in circular reference.

 

Any help would be greatly appreciated.

 

Thanks in advance for any help and best regards,

 

Wolfgang

1 ACCEPTED SOLUTION

Accepted Solutions
nathan_rudman
Master Anaplanner/Community Boss

Re: Avoid circular reference using list member logic

You are right, the Anaplan engine doesn't work this way.

There's 2 ways you can do this currently with Anaplan:

 

1: you can build yourself a logic that uses Time with a daily timescale to do the sequential calculations, by mapping your list to the days and using the PREVIOUS in there. Look at my post back then:

https://community.anaplan.com/t5/Anaplan-Platform/Trick-Previous-on-regular-list-sequential-calcs-us...

It's a heavy calc, but it works well, I've used it at scale (supplier allocations for 100K+ SKU).

 

2: If you have the optimizer, you can use it to do the calc for you sequential, but that is asynchronous. 

 


Nathan Rudman, Anaplan Model Builder

View solution in original post

4 REPLIES 4
Panji
Frequent Contributor

Re: Avoid circular reference using list member logic

Hi wolfgang,

 

why get the circular reference because calculation in your model using same item, in model B to get data Item B2, you take data form model A, and in model A to get data after you take data from model B, it will be circular. the solution is you need to break model A and model B using subset, and you need create model C to combine beetween model A and model B

 

Panji_0-1620616624291.png

 

Regards,

 

Panji

 

nathan_rudman
Master Anaplanner/Community Boss

Re: Avoid circular reference using list member logic

You are right, the Anaplan engine doesn't work this way.

There's 2 ways you can do this currently with Anaplan:

 

1: you can build yourself a logic that uses Time with a daily timescale to do the sequential calculations, by mapping your list to the days and using the PREVIOUS in there. Look at my post back then:

https://community.anaplan.com/t5/Anaplan-Platform/Trick-Previous-on-regular-list-sequential-calcs-us...

It's a heavy calc, but it works well, I've used it at scale (supplier allocations for 100K+ SKU).

 

2: If you have the optimizer, you can use it to do the calc for you sequential, but that is asynchronous. 

 


Nathan Rudman, Anaplan Model Builder

View solution in original post

ChrisHeathcote
Community Boss

Re: Avoid circular reference using list member logic

@Wolf37 

An alternative solution would be to use an action to import the value from one module into the other only when the result of the IF THEN ELSE is TRUE.

This would break the circular reference and allow you to transfer the values between modules.

The circular reference is due to the use of the common dimension. From the screenshots you have provided the list is redundant and the same outcome could be achieve if you simply used line items. 

Chris Heathcote
Bedford Consulting

Gold Partner and Regional Partner of the Year 2021, EMEA
Wolf37
New Contributor

Re: Avoid circular reference using list member logic

Thanks all for the replies, specially so promptly and in detail. In the end I will go with Nathan's suggestion; I saw that workaround, but seemed a little too complex for me at the time.

 

Thanks all for clarifying this for me.

 

Best regards,

 

Wolfgang