Alteryx Designer Desktop Discussions

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

DateTimeDiff

erinrog
5 - Atom

Hi! I used the DateTimeDiff formula to take the difference in months between the date now (DateTimeNow()) and a date column in my data and created a new column (called Month Diff) to display the difference. From here, I want to filter out so I only see data from within the past two months. I thought that using a filter for [Month Diff] <= "2" would be the right approach here, however, after running this filter the True output still shows results with differences greater than 2 months and I am not sure why. Any help would be greatly appreciated!

 

(First screenshot shows my formula for the difference in months formula which worked and gave the MonthDiff output column; second screenshot shows the filter for the MonthDiff column to be less than or equal to 2; third screenshot shows the output from that filter which still includes data in the MonthDiff column that's greater than 2) 

3 REPLIES 3
Qiu
20 - Arcturus
20 - Arcturus

@erinrog 

In your formula tool you have assigned "Month Diff" to be a String, please change to Int16.

then remove the double quote in your filter tool around the number 2 and lets see if it will be correct after that.

DateTimeDiff1.pngMonth Diff Filter1.png

erinrog
5 - Atom

That worked, thank you!

caltang
17 - Castor
17 - Castor

@erinrog kindly mark @Qiu 's post as an accepted solution to close the thread and help people find the solution faster. Thanks!

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
Labels