IF function without ELSE condition

Highlighted
Occasional Contributor

Re: IF function without ELSE condition

Hi @Sorna Raja Prabhu 

 

A works like lock on C. If A is TRUE, C should no longer be calculated. It should be considered as frozen period.

jairamkamath
Highlighted
Super Contributor

Re: IF function without ELSE condition

Hi @jairam,

 

In this Scenario, What should be the output (C) ...?

 

 

Scenario-4Jan-20Feb-20Mar-20Apr-20
ATRUEFALSEFALSETRUE
B78345693
C    

 

I am little confused, in the previous post you have mentioned, (get the previous value in same cell not previous period).  In this Scenario, what is the previous value in same cell for the Period  - Apr-20 ?

 

Sorna Raja Prabhu
Highlighted
Occasional Contributor

Re: IF function without ELSE condition

@Sorna Raja Prabhu The Previous same value for Apr-20 would be whatever value that was in Apr-20 before A became TRUE. In this case it should remain blank.

 

jairamkamath
Highlighted
Certified Master Anaplanner

Re: IF function without ELSE condition

Hello @jairam,
As @kavinkumar mentioned it, there is no way to retrieve the previous value of a "cell".
Can you provide a bit more context for us to understand what you are trying to achieve?
Highlighted
Occasional Contributor

Re: IF function without ELSE condition

Hi @fabien.junod  @kavinkumar  -

 

I am looking to lock the plan that is in line item C based on A boolean (lock). The periods that are to be locked can be random. Example: Store 1 may have locked April-20 while Store 2 may have locked only till Mar-20. line Item B is plan file upload which is also editable by user on the dashboard.

 

 

jairamkamath
Highlighted
Certified Master Anaplanner

Re: IF function without ELSE condition

Hi @jairam 

Not sure if this will help but I would recommend using Dynamic Cell Access (DCA). It would allow you to "block" a cell and that way no one can modify it.

https://help.anaplan.com/anapedia/Content/Modeling/Working_with_Data/DynamicCellAccess.htm

In my example, I have used the following line items

TRUE: Boolean set as "TRUE" (for the DCA)

Lock (A): is the line item used to lock an input 

Dynamic Cell Access - NOT A: is the line item used for the DCA. The formula is "NOT Lock(A)"

B : is the stores plan. It can be uploaded from a file and also modified in the module/dashboard (if it's not locked)

Anaplan Stores1.JPG

 And this is how you set-up the DCA

-  The Write Access Driver is the line item Dynamic Cell Access - NOT A. Becasue the DCA works opposite to locking a cell. You need to tell select the cells that are OK to be modified/read

- The Read Acces Driver is "TRUE", that way regardless of the write access, you can always view the number on that cell

- Note: You need to make sure that the summary for the access driver line items is NOT "None"

Anaplan Stores2.JPG

Hope this helps.

Highlighted
Certified Master Anaplanner

Re: IF function without ELSE condition

Hey @jairam,
Were you able to review the proposed solution. Did it help?
Highlighted
Certified Master Anaplanner

Re: IF function without ELSE condition

How are you defining scenarios? Are you using the native versioning as the scenario or did you create a "fake" scenario list? If using version, you can use the function of PREVIOUSVERSION() as mentioned in my other post.

 

If you're using a "fake" scenario list, my suggestion is to create some sort of mapping module to tie each scenario list item to a previous version. You can then reference this module in your formula.

 

Your first module will be dimensioned by the fake scenario list and 1 line item of “previous scenario.” Tie each scenario to what you want the previous to be.

taylor_rogers_0-1585345787463.png

taylor_rogers_0-1585346038200.png

 

 

Your second module will need to be dimensioned by the scenario list and a few different line items for C. One line item will set C = B since this one possible solution to your formula. The other line item will set C = Previous C because this is the other option. Your final C line item will then do the logic to determine which of the other 2 C line items it will take based on the value of A.

 

taylor_rogers_3-1585345880275.png

 

 

 

taylor_rogers_2-1585345787480.png

 

I hope this helps!

 

- Taylor