Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Community v19.6

Looks aren't everything... But the latest Community refresh looks darn good!

Learn More

Using IF statement with multiple Boolean columns


Hello. New to Altryx. Tried Googling and can't seem to find a good answer. I am trying to create a filter based on if the Bool value in two different columns is True. I have tried multiple formulas, but I still don't ever return any results (and yes, looking at the raw file, there are True-True combinations). Ultimately I want to only keep the rows where I have True in both of the columns. I already changed the dtype from V_String to Bool. Below I am creating a new column called Scenario1 as my output and am attempting to assign "keep" or "delete" based on if both bools = True (so, "keep" if bool-bool = true-true and "delete" for all other bool-bool combinations)


IF ([Anchor] = 1 && [Band] = 1)  THEN "Keep" ELSE "delete" ENDIF

Alteryx Certified Partner
Alteryx Certified Partner

Hi @CBarger 


Could you please share your workflow with a sample of your data, showing the unexpected results?



Alteryx Certified Partner

@CBarger ,


If those two fields are set to BOOL field types, this expression in a formula tool should work. If you prefer to use &&, you can.

[Anchor] AND [Band]



Teknion Data Solutions


Thanks so much! Not sure why I wasn't getting any "true" for the true-true combination before, but your suggestion worked perfectly!