Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Community is experiencing an influx of spam. As we work toward a solution, please use the 'Notify Moderator' option on the ellipsis menu to flag inappropriate posts.

Alteryx Designer Desktop Discussions

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

Filter for Number Greater Than

fmontante
5 - Atom

Hello,

 

I am new to Alteryx and trying to learn as I go.

 

I am trying to use the filter to split between true/false for data in a column greater than 90 but I end up getting the output to be incorrect. In a previous formula I set it up to take the last log in date and give me a number which looks like this: DateTimeDiff(DateTimeToday(),[Last Login Date],"days")

 

I then want to filter for any number greater than 90 and created a test document with a couple of different ranges of dates. What I am expecting is true to be everything over 90 and false to be under but what I get under false is 4, 366 and 247. 

 

I cant figure out why my three digit numbers come under false. This is the filter I am using [Days last login] > "90"

filter more than 90.JPG

 

Thanks

6 REPLIES 6
gautiergodard
13 - Pulsar

Hey @fmontante 

Is this what you are looking for? 

Perhaps just ensure that the field you are filtering on its a numerical data type... double, Int ...etc.

gautiergodard_0-1667500602266.png

 

 

fmontante
5 - Atom

Hello,

 

Thanks for the reply. That did not work unfortunately.

 

Is there a way to make sure the field is numerical data type?

binuacs
21 - Polaris

@fmontante One way of doing this

 

binuacs_0-1667502974591.png

 

fmontante
5 - Atom

That worked! Thank you!

DataNath
17 - Castor
17 - Castor

@fmontante in the formula tool where you set up the expression to perform the datediff calculation, make sure the data type is set to something numeric (double, integer etc) - by default new fields being created in the formula tool are set to a string so I’d imagine that’s the issue in your initial approach.

 

DataNath_0-1667503844976.png

gautiergodard
13 - Pulsar

See comment from @DataNath to touch on the data type issue I was raising. 

You have the ability to select a data type when creating a new column with a formula - its important to select the right data type as this will impact the types of transformations you are able to perform. 

Labels