Calculated colulm

New Contributor

Hi,

 

I am trying to create a calculated column in my SharePoint list, which is based on a choice column.

I would like to set it up as follows: 

If my calculated column (Pre Likelihood) is unlikely this column should show 1, if it is possible it should show 2, if it is likely it should show3 and if it is very likely it should show 4.

 

I have tried several things, but as I have found it should be either one of the below things, however it does not work. Can anyone help with what is wrong with my formular?

 

=IF([Pre Likelihood]="Unlikely","1", 
IF([Pre Likelihood]="Possible","2",
IF([Pre Likelihood]="Likely","3",
IF([Pre Likelihood]="Very likely","4"))))

 

Or

 

=IF([Pre Likelihood]="Unlikely","1", "0",
IF([Pre Likelihood]="Possible","2", "0",
IF([Pre Likelihood]="Likely","3", "0",
IF([Pre Likelihood]="Very likely","4", "0"))))

 

Thank you!

4 Replies

@YDRDK your brackets/parentheses are in the wrong place. It should be:

=IF([Pre Likelihood]="Unlikely",1,(IF([Pre Likelihood]="Possible",2,(IF([Pre Likelihood]="Likely",3,4)))))

 

Pre Likelihood is the Choice Column, LikelihoodScore is the calculated column:

0-SP-Formula.png

 

1-SP-Formula.png

 

Rob
Los Gallardos
Intranet, SharePoint and Power Platform Manager (and classic 1967 Morris Traveller driver)

@YDRDK You are very close with your 1st formula. You just need to provide default/false value for your last IF statement like:

 

=IF([Pre Likelihood] = "Unlikely", "1", IF([Pre Likelihood] = "Possible", "2", IF([Pre Likelihood] = "Likely", "3", IF([Pre Likelihood] = "Very likely", "4", "0"))))

 

Here I have added "0" as a default value in last statement.

Note:

  1. Sometimes comma(,) does not work in formula (I am not sure but it is based on something language or regional settings on your site). So in that case use semicolon(;) instead of comma(,).

Official Documentations:

  1. Calculated Field Formulas.
  2. IF function.

Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

Thank you both of you! I found the issue and it has now been solved :)

@YDRDK You're welcome! Glad it helped you.


Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.