Alteryx Designer Desktop Discussions

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

Filtering for "Comes After" not populating correctly?

jason79121
7 - Meteor

Hello,

 

I am trying to perform a filtering using the "Comes After" functionality in the Filter tool. I have a data type for "NumberOfDaysOpen" for V_WString, and I am seeing that the tool is not working as intended as there are outputs of 621 showing up in the False.

 

Ideally I would want anything larger than 30 to show up in the "True" output. Does anyone know what I may be doing wrong or if there is another way to do this?

3 REPLIES 3
DataNath
17 - Castor

Hey @jason79121, you're currently trying to apply a mathematical operator/check (> 30) to a string value. If you want this to work correctly you'll have to do one of 2 things:

1) Add a Select tool before the filter and change your [NumberOfDaysOpen] to something numeric (integer, double etc)

or

2) Use the ToNumber() function to temporarily convert the data type for the duration of the Filter check, which would look like:

 

ToNumber([NumberOfDaysOpen]) > 30

 

Hope this helps!

 

Quick edit: One thing to note is that - from your screenshot - it looks like you're looking at the False results of the Filter tool after the '> 30' check. Though you do have results both above and below 30 which shows the initial Filter isn't working, should be addressed by the above.

Robin_McIntosh
11 - Bolide

@jason79121 - I agree with @DataNath .  And just to demonstrate what the Comes After looks like when you change to a Custom Filter it brings down what you selected in the Basic Filter.  So in this case, it's comparing the string to "50".  Whereas if the data was Int, it would be [Days Open] > 50 (without the quotes).

Robin_McIntosh_1-1678826145673.png

versus

Robin_McIntosh_2-1678826169189.png

 

jason79121
7 - Meteor

Thank you! What worked for me was the "ToNumber" addition.

Labels