Alteryx Designer Desktop Discussions

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

Creating a Yes/No column based on other columns

beadyeyesbb
7 - Meteor

Hi 


I am looking for some help on a formula to create a column which says if a booking is with or without children/infants

 

There are two columns, one called children and one called infants,  that shows the total number of children/infants in the booking. 

 

It's something along the lines of this but I can't quite figure it out, any help much appreciated 🙂 

 

If (children) or (infants) >0

THEN "With children"

ELSE "Without children"

END

 

 

 

 

12 REPLIES 12
beadyeyesbb
7 - Meteor

I have tried changing to that but it still isn't working 😞 

 

 

Jonathan-Sherman
15 - Aurora
15 - Aurora

Hi @beadyeyesbb,

 

It looks as though your [CHILDREN Pax] and [Infants Pax] fields are perhaps strings and not numeric. Could you try the following formula:

 

IF ToNumber([CHILDREN Pax]) > 0 OR ToNumber([Infants Pax]) > 0

THEN "With Children"

ELSE "Without Children"

ENDIF

 

If this solves your issue please mark the answer as correct, if not let me know!

Regards,

Jonathan

beadyeyesbb
7 - Meteor

thank you! 

Labels