🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

More than 3 argument If condition, eg: if, elseif, elseif, else...

User: "memecross89"
New Altair Community Member
Updated by Jocelyn
How can I have more than 3 arguments in an if condition when trying to generate a new attribute "Generate Attribute" operator?
Such as: 
if(Age < 2, "Baby" || Age < 12, "Child") 
&& if(Age < 19, "Teen" || Age < 30, "Adult")
&& if(Age <= 65, "Adult" || Age > 65, "Senior")

or if(Age < 2, "Baby" || Age < 12, "Child" || Age < 19, "Teen" || Age < 30, "Adult" || Age <= 65, "Adult" || Age > 65, "Senior")

For a new column name "AgeGroup" based on an existing Attribute "Age" which just has numerical integer values of instances (people's) age...

I'd rather have everything in one Operator, or use the least amount of operators possible to keep things clean!

Find more posts tagged with