cancel
Showing results for 
Search instead for 
Did you mean: 

Nested Boolean logic

jenszulinski
Explorer
0 Kudos

Hi,

I'm trying use advanced Boolean logic for report variables.  I need to count widgets that have 1 characteristic less the combination  of 2 characteristics.  For instance I need to identify widgets with A but not B&C.  So, in theory, if condition A is met and not(condition B and condition C) then 1 else 0.

I've written it as =if ([A]=1 and (not([B]=2) and not([C]=3));1;0.  However it treats each condition equally so I'm not counting all the widgets I need to count.

Thanks for your assistance.

Accepted Solutions (1)

Accepted Solutions (1)

former_member198519
Active Contributor
0 Kudos

Try:

=if([A]=1 and Not([B]=1 and [C]=1)) then 1 else 0


or


=if([A]=0) then 0 elseif([B]=1 and [C]=1) then 0 else 1 (this would only work if the ouput of [A] object is 1 or 0)

jenszulinski
Explorer
0 Kudos

Thank you Kuldeep, it worked.  I had tried your first solution first but for some reason couldn't get it to work.  Much appreciated.

Answers (0)