Hi Alteryx Community,
I'm new to Alteryx and have started to use the program to automate a couple of function. I'm looking to create the following rule, but I'm stuck. Hopefully, you're able to help!
I need to come up with a rule to look at the current month (October 2021) and the last two months (August & September 2021) and only look at those records.
Start Date |
2021-10-01 |
2021-10-01 |
2021-10-01 |
2021-09-01 |
2021-09-01 |
2021-08-01 |
2021-08-01 |
2021-01-01 |
2021-02-01 |
This would have to be automatically picked on a monthly basis. In other words, in November of 2021, it would have to look at November, October & September 2021 records.
Thank you!
Solved! Go to Solution.
@irvinsotelo see if it helps
Datetimeformat([Start Date],"%m-%Y") in
(
Datetimeformat(DateTimeToday(),"%m-%Y"),
Datetimeformat(Datetimeadd(DateTimeToday(),-1,"Month"),"%m-%Y"),
Datetimeformat(Datetimeadd(DateTimeToday(),-2,"Month"),"%m-%Y")
)
The attached example uses the formula from below:
Datetimeformat([Start Date],"%m-%Y") in
(
Datetimeformat(DateTimeToday(),"%m-%Y"),
Datetimeformat(Datetimeadd(DateTimeToday(),-1,"Month"),"%m-%Y"),
Datetimeformat(Datetimeadd(DateTimeToday(),-2,"Month"),"%m-%Y")
)
The formula checks for each record whether the Start Date's Month and Year are found in the dynamic list:
Today's Month-Year,
Last Month's Month-Year,
2 Months Prior Month-Year.
Please let me know if you have any questions.
This worked!!!! Thank you very much @csmith11