SOLVED
Home

SP Online: Using Boolean in IF Statements

%3CLINGO-SUB%20id%3D%22lingo-sub-1313328%22%20slang%3D%22en-US%22%3ESP%20Online%3A%20Using%20Boolean%20in%20IF%20Statements%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1313328%22%20slang%3D%22en-US%22%3E%3CP%3EGood%20day.%20I'm%20having%20an%20issue%20with%20getting%20a%20boolean%20statement%20working%20in%20an%20IF%20statement.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPlatform%3A%20SharePoint%20Online%20(Office%20365%20Business%20Premium)%3C%2FP%3E%3CP%3EList%3A%20Modern%20List%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIssue%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20a%20list%20that%20contains%20several%20Yes%2FNo%20columns%20(defined%20as%20Y%2FN).%20Other%20columns%20have%20numbers%20and%20are%20defined%20as%20Number.%20I%20would%20like%20a%20new%20calculated%20column%20to%20show%20me%20the%20number%20from%20one%20column%20if%20Yes%20and%20the%20amount%20from%20a%20different%20column%20if%20No.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EEventually%2C%20I%20would%20like%20to%20make%20several%20tests%2C%20ie.%26nbsp%3BIf%20column%205%20is%20Yes%20AND%20column%206%20is%20No%20THEN%20use%20column%202%20amount...%26nbsp%3BBut%20let's%20try%20to%20walk%20before%20we%20can%20run%20%3A)%3C%2Fimg%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHere%20is%20the%20formula%20that%20refuses%20to%20work%20(syntax%20error)%20%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3DIF(ReportVF%3DTRUE%2C%20Previsionnel%2C0)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EReportVF%20is%20Yes%2FNo%20Column%3C%2FP%3E%3CP%3EPrevisionnel%20is%20a%20Number%20Column%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20tried%20with%20and%20without%20%5B%5D%20around%20column%20names.%20I've%20tried%201%20instead%20of%20TRUE.%20I've%20tried%20%22True%22.%20I've%20tried%20%3B%20instead%20of%20%2C%20separators%20...%26nbsp%3BNothing%20works%20%3Acrying_face%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20help%20would%20be%20most%20welcome.%20It%20should%20be%20simple%2C%20but%20apparently%20it's%20not%20with%20SharePoint.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1313328%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-1313645%22%20slang%3D%22en-US%22%3ERe%3A%20SP%20Online%3A%20Using%20Boolean%20in%20IF%20Statements%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1313645%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F523452%22%20target%3D%22_blank%22%3E%40mcowen%3C%2FA%3E%26nbsp%3BI%20doubt%20this%20will%20be%20possible%20with%20a%20default%20SharePoint%20form%20and%20calculated%20columns%20but%20will%20be%20do-able%20with%20a%20customised%20form%20with%20Power%20Apps.%20So%20that's%20where%20you%20should%20should%20concentrate%20your%20attention.%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%23333399%22%3EMicrosoft%20Power%20Automate%20Community%20Super%20User%3C%2FFONT%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1313745%22%20slang%3D%22en-US%22%3ERe%3A%20SP%20Online%3A%20Using%20Boolean%20in%20IF%20Statements%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1313745%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F174092%22%20target%3D%22_blank%22%3E%40Rob%20Elliott%3C%2FA%3E%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20your%20reply.%20Now%20I%20know%20where%20to%20concentrate%20and%20not%20waste%20time.%20Simple%20calculations%20work%20fine%2C%20just%20this%20IF%20problem%20didn't%20%3A(.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EUltimately%20the%20data%20will%20end%20up%20in%20PowerBI%2C%20so%20I%20guess%20I'll%20use%20DAX%20to%20achieve%20something%20similar.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3Afolded_hands%3A%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

Good day. I'm having an issue with getting a boolean statement working in an IF statement.

 

Platform: SharePoint Online (Office 365 Business Premium)

List: Modern List

 

Issue:

 

I have a list that contains several Yes/No columns (defined as Y/N). Other columns have numbers and are defined as Number. I would like a new calculated column to show me the number from one column if Yes and the amount from a different column if No.

 

Eventually, I would like to make several tests, ie. If column 5 is Yes AND column 6 is No THEN use column 2 amount... But let's try to walk before we can run :)

 

Here is the formula that refuses to work (syntax error) :

 

=IF(ReportVF=TRUE, Previsionnel,0)

 

ReportVF is Yes/No Column

Previsionnel is a Number Column

 

I've tried with and without [] around column names. I've tried 1 instead of TRUE. I've tried "True". I've tried ; instead of , separators ... Nothing works :crying_face:

 

Any help would be most welcome. It should be simple, but apparently it's not with SharePoint.

 

2 Replies
Highlighted
Solution

@mcowen I doubt this will be possible with a default SharePoint form and calculated columns but will be do-able with a customised form with Power Apps. So that's where you should should concentrate your attention.

 

Rob
Los Gallardos
Microsoft Power Automate Community Super User

Highlighted

Hi @Rob Elliott,

 

Thanks for your reply. Now I know where to concentrate and not waste time. Simple calculations work fine, just this IF problem didn't :(.

 

Ultimately the data will end up in PowerBI, so I guess I'll use DAX to achieve something similar.

 

:folded_hands: