Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

Select Month from 28th to 27th

ushuja
6 - Meteoroid

 I have used datetimeformat and datetimeparse to get Month and year, however I am required to take the month from 28th of previous month to 27th of current month as the current month. 

For eg 28 Dec to 27 Jan should be classified as Jan month.

 

4 REPLIES 4
OTrieger
12 - Quasar

@ushuja 
There are many ways to do it, however if you are not too familiar with Alteryx, you can do it based on your knowledge level.
You can set a new field that take the year and the month and adding 27 for the current month and 28 for the previous month. You will need additional condition that if the month is Jan than the year for period month need to be Year-1 and filter based on these 2 dates.

OTrieger
12 - Quasar

@esther598 
It is a great asset to know Python, however the whole idea of Alteryx is to provide a no-code low-code solution so those that do not have programing knowledge could build solutions. So while your solution is great it will be too challenging to someone that is not familiar with Python.

Alteryx has tools that can do the job.

cjaneczko
13 - Pulsar

The following should work, where DateTime_Out is your formatted date field.

 

[DateTime_Out] < DateTimeAdd(DateTimeFirstOfMonth(),26,'days') and [DateTime_Out] > datetimeadd(datetimeadd(DateTimeFirstOfMonth(),-1,'month'),26,'days')
ushuja
6 - Meteoroid

Thanks a lot cjaneczko. It works!!

Labels
Top Solution Authors