Alteryx Designer Desktop Discussions

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

Dynamic Date Filter not Working as Expected

Tom-Work1
5 - Atom

Hi, I am filtering using dynamic dates. 

 

This month for some reason it appears my dynamic filter isn't working properly.

 

Creating a new field in the formula tool does generate the correct result which I could filter with, but I don't want to have a verbose workflow. 

 

I have attached an example that doesn't work for me. 

2 REPLIES 2
apathetichell
18 - Pollux

datetimeadd(DateTimeFirstOfMonth() is a datetime - a combo of date and time (HH:MM:SS). That would be 2022-10-31 00:00:00 which is not equal to 2022-10-31

 

you can test this by using DateTimeTrim(datetimeadd(DateTimeFirstOfMonth(),-1,'days'),"day") in the formula tool and then using a compare between that expression and your prior expression. It may show up as False initially - but when you run it - it will be True.

Tom-Work1
5 - Atom

Cheers - Using the ToDate() function, the comparison worked. 

Labels