Important Community update: The process for changing your account details was updated on June 25th. Learn how this impacts your Community experience and the actions we suggest you take to secure your account here.

Alteryx Designer Desktop Discussions

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

Filter data on current and remaining months of the year

Crispy131
8 - Asteroid

Hi there, I have a field called Date that has data like below:

 

2023-01-01

2023-02-01

2023-03-01

2023-04-01

2023-05-01

2023-06-01

2023-07-01

2023-08-01

2023-09-01

2023-10-01

2023-11-01

2023-12-01

 

I want to filter the records so that I only get the current month records and the months for the remainder of the year

E.g. If I ran it in October I get October, November and December

 

Appreciate any help!

2 REPLIES 2
TimN
13 - Pulsar

 

If you want greater than or equal current month then this might do the trick in a filter tool

 

[Date] >= ToDate(DateTimeFirstOfMonth())

gawa
15 - Aurora
15 - Aurora

hi @Crispy131 

 

Using Filter tool with expression like this will work.

The function DateTimeFirstOfMonth() returns first date of the current month(it returns 2023-11-01 if you run it today, 2023-11-03). This would be one condition to filter data.

And you said you want to filter data having the same year only, so comparing the YEAR of the current date and incoming data as a second filter condition. (In this case, it never passes the date in year 2024. )

Please see the attached WF for your ready reference.

image.png

Labels