SOLVED

Calculated Column Issue

%3CLINGO-SUB%20id%3D%22lingo-sub-2296218%22%20slang%3D%22en-US%22%3ECalculated%20Column%20Issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2296218%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20a%20calculated%20column%20in%20a%20list%20as%20below%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3DIF(%5BSlope%20(%25)%5D%26gt%3B%2290%22%2C%22PASS%22%2C%22FAIL%22)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIt%20works%20except%20for%20when%20the%20result%20is%20100%20-%20now%20it%20should%20say%20PASS%20as%20100%20is%20greater%20than%2090%20but%20it%20shows%20as%20FAIL.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20ideas%20why%20it's%20doing%20this%20and%20how%20I%20can%20sort%20it%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2296218%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ELists%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMicrosoft%20Lists%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2297864%22%20slang%3D%22en-US%22%3ERe%3A%20Calculated%20Column%20Issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2297864%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1008255%22%20target%3D%22_blank%22%3E%40RRMX01%3C%2FA%3E%26nbsp%3BIf%20the%20data%20type%20of%20your%20%5BSlope%20(%25)%5D%20column%20is%26nbsp%3B%3CSTRONG%3ESingle%20line%20of%20text%3C%2FSTRONG%3E%20then%20your%20formula%20will%20fails%20as%20you%20are%20comparing%20text%20in%20your%20formula.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3ESolution%201%3C%2FSTRONG%3E%3A%20If%20you%20want%20to%20continue%20using%20single%20line%20of%20text%20for%20Slope%20%25%2C%20use%20below%20formula%20for%20calculated%20column%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-javascript%22%3E%3CCODE%3E%3DIF(Value(%5BSlope%20(%25)%5D)%20%26gt%3B%2090%2C%20%22PASS%22%2C%20%22FAIL%22)%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3EOutput%3C%2FSTRONG%3E%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22ganeshsanap_0-1619530592398.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F275831iD213CF2C48857D45%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22ganeshsanap_0-1619530592398.png%22%20alt%3D%22ganeshsanap_0-1619530592398.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3ESolution%202%3C%2FSTRONG%3E%3A%20Use%26nbsp%3B%3CSTRONG%3ENumber%3C%2FSTRONG%3E%20data%20type%20for%20Slope%20(%25)%20column%20%26amp%3B%20use%20below%20formula%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-javascript%22%3E%3CCODE%3E%3DIF(%5BSlope%20(%25)%5D%20%26gt%3B%2090%2C%20%22PASS%22%2C%20%22FAIL%22)%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CHR%20%2F%3E%3CP%3EPlease%20click%26nbsp%3B%3CSTRONG%3EMark%20as%20Best%20Response%3C%2FSTRONG%3E%26nbsp%3B%26amp%3B%20%3CSTRONG%3ELike%3C%2FSTRONG%3E%20if%20my%20post%20helped%20you%20to%20solve%20your%20issue.%20This%20will%20help%20others%20to%20find%20the%20correct%20solution%20easily.%20It%20also%20closes%20the%20item.%20If%20the%20post%20was%20useful%20in%20other%20ways%2C%20please%20consider%20giving%20it%20%3CSTRONG%3ELike%3C%2FSTRONG%3E.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

Hi,

 

I have a calculated column in a list as below;

 

=IF([Slope (%)]>"90","PASS","FAIL")

 

It works except for when the result is 100 - now it should say PASS as 100 is greater than 90 but it shows as FAIL.

 

Any ideas why it's doing this and how I can sort it?

1 Reply
best response confirmed by RRMX01 (Occasional Contributor)
Solution

@RRMX01 If the data type of your [Slope (%)] column is Single line of text then your formula will fails as you are comparing text in your formula.

 

Solution 1: If you want to continue using single line of text for Slope %, use below formula for calculated column:

 

=IF(Value([Slope (%)]) > 90, "PASS", "FAIL")

 

Output:

ganeshsanap_0-1619530592398.png

Solution 2: Use Number data type for Slope (%) column & use below formula:

 

=IF([Slope (%)] > 90, "PASS", "FAIL")

 


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.