Is there an ELSE IF or Switch statement in Anaplan

Highlighted
New Contributor

Is there an ELSE IF or Switch statement in Anaplan

Hello,

 

I am trying to create an IF statement with 3 possible answers. I was able to do it in excel using this formula:

 

IF(C2="SUPPORT",0 IF(C2="BILLABLE",1,IF(C2="FREE",-1)))

 

But I was wondering if there was a way to do it in Anaplan so I can use the conditional formating with text rather than numbers.

 

Thanks

Tags (2)
Message 1 of 4
3 REPLIES 3
Community Boss

Re: Is there an ELSE IF or Switch statement in Anaplan

@blairvham18 

you could use IF xxx THEN xx ELSE IF xxx THEN

But that is not very efficient!!

Do this instead:

1. Create a list containing the three entries (Support, Billable, Free).  I'll call it Choices

2. Create a module dimensioned by 1. above (Choices) called Choice Attributes

3. Add a numeric line item called Formatting Number and enter 0, 1, -1 respectively

4. In your target module ensure that the line item containing ("C2"), is formatted to Choices, let's say it's called Choice Input

5. Your target line item then becomes Choice Attributes.Formatting Number[LOOKUP:Choice Input]

 

I hope that helps

David

Message 2 of 4
New Contributor

Re: Is there an ELSE IF or Switch statement in Anaplan

That worked! Thank you!
Quick question, why would the LOOKUP be more efficient than the IF ELSE statement?
Message 3 of 4
Community Boss

Re: Is there an ELSE IF or Switch statement in Anaplan

Imagine if you had 12+ conditions!

The lookup will avoid having to traverse through each condition to check what the answer is

We see a lot of very long IFs - unfortunately

 

One other pro-tip, when you do have to use IFs, is put the most common condition first

 

David

 

 

Message 4 of 4