SOLVED

Help with calculated column in SharePoint LIST

%3CLINGO-SUB%20id%3D%22lingo-sub-2890226%22%20slang%3D%22en-US%22%3EHelp%20with%20calculated%20column%20in%20SharePoint%20LIST%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2890226%22%20slang%3D%22en-US%22%3E%3CP%20class%3D%22%22%3EI'm%20not%20sure%20if%20this%20is%20possible%20but%20please%20help%20if%20you%20can%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Etrying%20to%20move%20the%20following%20risk%20MATRIX%20from%20excel%20into%20SharePoint%20list%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ecreated%202%20choice%20columns%20for%20Impact%20%26amp%3B%20Probability%20(1%20to%207)%3C%2FP%3E%3CP%3EI%20need%20formula%20to%20populate%203rd%20column%20(Risk%20level%20with%20correct%20number%20or%20text%20it%20doesn't%20matter)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EExamples%201-%20if%20Imp%20%3D%202%20%2C%20PROBALIBTY%20%3D4%20%2C%20Risk%20level%20is%205%20%3F%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22neeesz78_0-1635334978579.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F320432i31F0CF05F3DB820A%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22neeesz78_0-1635334978579.png%22%20alt%3D%22neeesz78_0-1635334978579.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2890226%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ELists%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2895129%22%20slang%3D%22en-US%22%3ERe%3A%20Help%20with%20calculated%20column%20in%20SharePoint%20LIST%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2895129%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1067611%22%20target%3D%22_blank%22%3E%40neeesz78%3C%2FA%3E%26nbsp%3Bthe%20problem%20you%20are%20going%20to%20have%20with%20this%20is%20that%20you%20can%20only%20have%2019%20nested%20ifs%20in%20a%20calculated%20column%20formula%20whereas%20you%20need%2049.%20You%20will%20also%20breach%20the%20nested%20if%20statement%20limit%20in%20a%20Power%20Apps%20customised%20form.%20Not%20sure%20there's%20a%20straightforward%20solution%20to%20this%20but%20I'll%20work%20on%20it.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERob%3CBR%20%2F%3ELos%20Gallardos%3CBR%20%2F%3E%3CFONT%20size%3D%222%22%20color%3D%22%23006400%22%3EIntranet%2C%20SharePoint%20and%20Power%20Platform%20Manager%20(and%20classic%201967%20Morris%20Traveller%20driver)%3C%2FFONT%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2899336%22%20slang%3D%22en-US%22%3ERe%3A%20Help%20with%20calculated%20column%20in%20SharePoint%20LIST%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2899336%22%20slang%3D%22en-US%22%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F174092%22%20target%3D%22_blank%22%3E%40RobElliott%3C%2FA%3E%20%2C%20this%20was%20very%20helpful%20%2C%20many%20thanks%20it%20worked%20perfectly%20when%20using%20small%20LIST.%3CBR%20%2F%3Eits%20just%20that%20my%20original%20LIST%20is%20a%20bit%20more%20complicated%20than%204%20columns%3CBR%20%2F%3ENoticed%20the%20customized%20FORM%20is%20a%20bit%20slow%3CBR%20%2F%3EJust%20need%20to%20work%20on%20organizing%20my%20FIELDS%3CBR%20%2F%3E%3CBR%20%2F%3Ebut%20again%20many%20thanks%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2899585%22%20slang%3D%22en-US%22%3ERe%3A%20Help%20with%20calculated%20column%20in%20SharePoint%20LIST%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2899585%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1067611%22%20target%3D%22_blank%22%3E%40neeesz78%3C%2FA%3E%26nbsp%3Byes%20all%20those%20nested%20ifs%20do%20slow%20it%20down.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERob%3CBR%20%2F%3ELos%20Gallardos%3CBR%20%2F%3E%3CFONT%20size%3D%222%22%20color%3D%22%23006400%22%3EIntranet%2C%20SharePoint%20and%20Power%20Platform%20Manager%20(and%20classic%201967%20Morris%20Traveller%20driver)%3C%2FFONT%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

I'm not sure if this is possible but please help if you can

 

trying to move the following risk MATRIX from excel into SharePoint list

 

created 2 choice columns for Impact & Probability (1 to 7)

I need formula to populate 3rd column (Risk level with correct number or text it doesn't matter)

 

Examples 1- if Imp = 2 , PROBALIBTY =4 , Risk level is 5 ?

neeesz78_0-1635334978579.png

 

 

3 Replies
best response confirmed by neeesz78 (New Contributor)
Solution

@neeesz78 this was an interesting challenge because there is a limit of 19 nested ifs in a calculated column formula in SharePoint. So a calculated column is not posible here. However it is possible to have more nested ifs in a Power Apps customised form formula and we can just squeeze in the number you need in before it errors.

 

My SharePoint list uses the Title column for the risk item and has a choice column (1-7) for the Impact, another chpoice column (1-7) for the Probability and a single line of text column for the reisk level.

 

Add the Power Apps customised form:
0-PA-form.png

I've renamed the impact dropdown to dataImpact and the probability dropdown to dataProbability:

0-PA-dropdowns.png

 

For the risk level change the default property of the data field to the nested if statement shown below:

 

1-PA-RiskLevel.png

 

 

 

 

If(dataImpact.Selected.Value="1", "Level 6",
If((dataImpact.Selected.Value="2" && dataProbability.Selected.Value="1"),"Level 6",
If((dataImpact.Selected.Value="2" && dataProbability.Selected.Value="2"),"Level 6",
If((dataImpact.Selected.Value="2" && dataProbability.Selected.Value="3"),"Level 6",
If((dataImpact.Selected.Value="2" && dataProbability.Selected.Value="4"),"Level 5",
If((dataImpact.Selected.Value="2" && dataProbability.Selected.Value="5"),"Level 5",
If((dataImpact.Selected.Value="2" && dataProbability.Selected.Value="6"),"Level 4",
If((dataImpact.Selected.Value="2" && dataProbability.Selected.Value="7"),"Level 4",
If((dataImpact.Selected.Value="3" && dataProbability.Selected.Value="1"),"Level 6",
If((dataImpact.Selected.Value="3" && dataProbability.Selected.Value="2"),"Level 5",
If((dataImpact.Selected.Value="3" && dataProbability.Selected.Value="3"),"Level 5",
If((dataImpact.Selected.Value="3" && dataProbability.Selected.Value="4"),"Level 4",
If((dataImpact.Selected.Value="3" && dataProbability.Selected.Value="5"),"Level 4",
If((dataImpact.Selected.Value="3" && dataProbability.Selected.Value="6"),"Level 3",
If((dataImpact.Selected.Value="3" && dataProbability.Selected.Value="7"),"Level 3",
If((dataImpact.Selected.Value="4" && dataProbability.Selected.Value="1"),"Level 6",
If((dataImpact.Selected.Value="4" && dataProbability.Selected.Value="2"),"Level 5",
If((dataImpact.Selected.Value="4" && dataProbability.Selected.Value="3"),"Level 4",
If((dataImpact.Selected.Value="4" && dataProbability.Selected.Value="4"),"Level 4",
If((dataImpact.Selected.Value="4" && dataProbability.Selected.Value="5"),"Level 3",
If((dataImpact.Selected.Value="4" && dataProbability.Selected.Value="6"),"Level 3",
If((dataImpact.Selected.Value="4" && dataProbability.Selected.Value="7"),"Level 3",
If((dataImpact.Selected.Value="5" && dataProbability.Selected.Value="1"),"Level 5",
If((dataImpact.Selected.Value="5" && dataProbability.Selected.Value="2"),"Level 4",
If((dataImpact.Selected.Value="5" && dataProbability.Selected.Value="3"),"Level 3",
If((dataImpact.Selected.Value="5" && dataProbability.Selected.Value="4"),"Level 3",
If((dataImpact.Selected.Value="5" && dataProbability.Selected.Value="5"),"Level 2",
If((dataImpact.Selected.Value="5" && dataProbability.Selected.Value="6"),"Level 2",
If((dataImpact.Selected.Value="5" && dataProbability.Selected.Value="7"),"Level 2",
If((dataImpact.Selected.Value="6" && dataProbability.Selected.Value="1"),"Level 4",
If((dataImpact.Selected.Value="6" && dataProbability.Selected.Value="2"),"Level 3",
If((dataImpact.Selected.Value="6" && dataProbability.Selected.Value="3"),"Level 3",
If((dataImpact.Selected.Value="6" && dataProbability.Selected.Value="4"),"Level 2",
If((dataImpact.Selected.Value="6" && dataProbability.Selected.Value="5"),"Level 2",
If((dataImpact.Selected.Value="6" && dataProbability.Selected.Value="6"),"Level 1",
If((dataImpact.Selected.Value="6" && dataProbability.Selected.Value="7"),"Level 1",
If((dataImpact.Selected.Value="7" && dataProbability.Selected.Value="1"),"Level 4",
If((dataImpact.Selected.Value="7" && dataProbability.Selected.Value="2"),"Level 3",
If((dataImpact.Selected.Value="7" && dataProbability.Selected.Value="3"),"Level 3",
If((dataImpact.Selected.Value="7" && dataProbability.Selected.Value="4"),"Level 2",
If((dataImpact.Selected.Value="7" && dataProbability.Selected.Value="5"),"Level 1",
If((dataImpact.Selected.Value="7" && dataProbability.Selected.Value="6"),"Level 1",
If((dataImpact.Selected.Value="7" && dataProbability.Selected.Value="7"),"Level 1",
"Error"
)))))))))))))))))))))))))))))))))))))))))))

 

 

 

That will give the following result when you  add the items into the list:

2-SP-list.png

 

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

 

 

@RobElliott , this was very helpful , many thanks it worked perfectly when using small LIST.
its just that my original LIST is a bit more complicated than 4 columns
Noticed the customized FORM is a bit slow
Just need to work on organizing my FIELDS

but again many thanks

@neeesz78 yes all those nested ifs do slow it down.

 

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