Alteryx Designer Desktop Discussions

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

Filter tool Expression

ywang
6 - Meteoroid
A minor question:
In the Filter tool, when filtering a numeric variable(say, Age) using the expression "21<=[Age]<=45", the tool does not filter to the intended age range while there's no error message for the expression. Of course, expression "[Age]>=21 and [Age]<=45" works fine.
So should there be error message to remind user for the expression like "21<=[Age]<=45" then?
 
1 REPLY 1
Joe_Mako
12 - Quasar

In my experience, Alteryx effectively treats Booleans as numbers, True is -1, and False is 0; numbers as Booleans, 0 is False, and any other number is True, based on the operator used, or the specified data type.

So the statement of "21<=[Age]<=45" will be effectively evaluated as: "ToNumber(21<=[Age])<=45", and I would expect always evaluates to True in the end, because both 0<=45 and -1<45 evaluate to True.

The operators in Alteryx http://help.alteryx.com/current/Reference/Functions.htm#Operators_ are all usable on both numbers and Booleans, and some operators can be used on other data types.

Labels