Free Trial

Alteryx Designer Desktop Discussions

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

Last Previous Three Months Filter Not Working

Kristie_Pires
8 - Asteroid

Hello there! 

 

I am trying to figure out what's wrong with the formula since it is the solution for similar questions:

ToDate([Date Completed]) >= ToDate(DateTimeAdd(DateTimeFirstOfMonth(),-3, "months"))

 

[Date Completed] -->> Datetime

 

I am trying to bring all the last three months of data (December to February) dynamically. However, the formula continues to pick up March data which I don't want to.

 

 

This is a sample of the input...the output doesn't filter March. Any ideas about why it isn't working? 

Date Completed
2024-01-10 19:24:25
2024-01-12 17:05:35
2024-01-18 17:39:55
2024-01-10 20:36:54
2024-01-10 19:50:58
2024-01-24 00:00:00
2024-01-30 00:00:00
2024-03-21 00:00:00
2024-01-24 00:00:00
2024-03-22 00:00:00
2023-12-06 00:00:00
2023-12-26 00:00:00

3 REPLIES 3
usmanbashir
11 - Bolide

@Kristie_Pires 

Use this

ToDate([Date Completed]) >= ToDate(DateTimeAdd(DateTimeFirstOfMonth(),-3, "months"))
AND
[Date Completed] < DateTimeFirstOfMonth()

 

The second condition will exclude March

Kristie_Pires
8 - Asteroid

Thank you so much @usmanbashir !!! Unsure why I didn't think of that LOL 

Jayabharath
5 - Atom

Hi, Im stuck with a filter. There are mutiple suppliers in workflow and i dont want them in my output, when i use below filter

[Supplier] = "IE0GB" or "IE0GD" my output still showing all Supplier data. 

Tried with both V_WString & V_String data types. Can anyone help?

Labels
Top Solution Authors