Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Alteryx and Boolean

Carluccio555
9 - Comet

I have tried 2 approaches to get Alteryx to treat a Field as boolean:

 

1) Data is either 'TRUE' or 'FALSE' and I use a SELECT tool to set datatype as Boolean

2) Data is either 0 or 1 and I use SELECT tool to set datatype as Boolean

 

Expressions don't seem to work consistently however.

 

Can someone explain best practice to get the data to be recognized as Boolean and some simple IIF() expressions to resolve a true or false?

 

 

4 REPLIES 4
binuacs
21 - Polaris
Felipe_Ribeir0
16 - Nebula

Hi @Carluccio555 

 

The boolean values are displayed as True/False, but when you deal with then using formulas, you will need to always use 1 for True and 0 for False. Dont use 'True' or 'False' inside your formulas.

 

Felipe_Ribeir0_2-1672248807532.png

 

Amr_Ahmad
6 - Meteoroid

this saved me , thanks man.

apathetichell
20 - Arcturus

the '=1' part of this is just redundant. if you have a boolean field you can have it standalone as the boolean field so

 

[field1]=True

 

iif([field1],'True','false')

 

is sufficient. 

Labels
Top Solution Authors