Getting Invalid error in Logic

IF 'Headcount Capacity 2' 'Seatings.Less than 50 seats' THEN 'S' ELSE IF 'Headcount Capacity 2' 'Seatings.50-200 seats' THEN 'M' ELSE IF 'Headcount Capacity 2' 'Seatings.201 - 500 seats' THEN 'L' ELSE IF 'Headcount Capacity 2' 'Seatings.More than 501 seats' THEN 'XL' ELSE 'Headcount Capacity 2'

 

This is refernce to Calculate Office size when user enter data  in Headcount so office size need to calculate with this logic either small or medium.

 

 

 

Tagged:

Answers

  • @suruchi.kapoor 

     

    Screenshot of your module would have helped. Anyway here are my suggestions

     

    Suspect 1: IF 'Headcount Capacity 2' 'Seatings.Less than 50 seats' THEN "S" ELSE IF 'Headcount Capacity 2' 'Seatings.50-200 seats' THEN "M" ELSE IF 'Headcount Capacity 2' 'Seatings.201 - 500 seats' THEN "L" ELSE IF 'Headcount Capacity 2' 'Seatings.More than 501 seats' THEN "XL" ELSE 'Headcount Capacity 2

     

    Put highlighted in double quotes

     

    Suspect 2:  'Headcount Capacity 2' 'Seatings - I believe it is the name of the list, are these single quotes within a list item name? If yes then ok, otherwise these are not required in between.

     

    Suspect 3: ELSE 'Headcount Capacity 2' - What is this? What should the system do when it doesn't get results in S,M,L or XL. I doubt this part.

     

    Thanks,

    Misbah

     

  • @suruchi.kapoor 

     

    Already @Misbah  pointed out the error for your formula.

     

    It seems you are using " Text" formatted line item in your formula with multiple IFs statement. As the best practice says to avoid "Text" formatted line item as much as possible because it consuming more space.

     

    I have seen best workaround by @DavidSmith to avoid multiple IFs statement https://community.anaplan.com/t5/Anaplan-Platform/Another-work-around-method/m-p/42250#M4513

     

    I tried to replicate your case with the help of David's example.

    1. Create a seat type list with top level item

    Screenshot_39.png

    2. Create a system module:

    Screenshot_40.png

    3. Create flat list for all the possible range.

    Screenshot_38.png

    System module 

    Screenshot_46.png

     

    4. I am assuming you already have a place holder for head count in your input module.

    Screenshot_41.png

    5. Create one cal module to know the seat type for different possible combination

    Screenshot_43.png

    Screenshot_44.png

    Make sure summary for Seat type line item should be " Last not blank"

    6. Now your final module should be like this:

    Screenshot_45.png

     

    Hope this helps!

     

    Thanks

    Akhtar

     

     

     

  • Thank Akhtar ...It helped. i have tried in same manner and it worked