Switching calculation based on a property or a code

Occasional Contributor

Switching calculation based on a property or a code


I want to set up a module that contains a set of scenarios. The idea is that the module would contain various iterations of a set of base data, and that the calculations happening in the module could be switched to use a different scenario's data. I'd like to make that switch happen without having to change the formulae, so I'm trying to make it work with either a property or a code that will indicate to Anaplan which is the scenario to use; let's call this the "LIVE" scenario.

Screen Shot 2018-06-04 at 18.48.29.png

Then I have this module:Screen Shot 2018-06-04 at 18.51.04.png

The idea is that the Line Item "Scenario Revenue" contains input data, and then the code or property (I don't mind which, really) of the Scenario list determines which Scenario feeds the Revenue line item. In this example, the "200" in the top row flows through to each of the five cells on the bottom row, because "Scenario 2" is identified as the live scenario.

I can put "Scenario 2" into the Live Scenario line item using the following formula (although I may not need this line item in my final module; it's just there for now to show me what's happening).

Screen Shot 2018-06-04 at 18.55.54.png

Here's the formula that I have for the Revenue line item:

Screen Shot 2018-06-04 at 18.57.11.png

My problem with this is that 'Scenario 2' is hard-coded into the formula, and I need it not to be. Unfortunately I can't figure out the syntax.

Could someone help me out, or if I'm approaching this in a naive way, give me a pointer or two?

Thanks in advance


Valued Contributor

Re: Switching calculation based on a property or a code



If you unhook the Live Scenio Line Item from the Scenarios list (i.e. just make it 1 cell as a selector), then you could select any Scenario and point your Revenue Line Item formula to that selector as Scenario Revenue[Lookup: Live Scenario].  Note that this uses a Lookup and not a Select.  Lookup is used when referencing another value (such as a line item), Select is used when the reference is hardcoded/explicit.


I'm assuming native anaplan versions don't apply here, because the above doesn't work the same way when working with Anaplan Versions.



Occasional Contributor

Re: Switching calculation based on a property or a code

Thanks Paul