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

Dynamic Rolling 12 Months data need

mmustkee
10 - Fireball

Hi Team, 

 

I have a list of dates and I now need just rolling 12 months data and rest needs to be filtered out.

Can you please fix me, please?

 

8 REPLIES 8
DataNath
17 - Castor
17 - Castor

Hey @mmustkee, the following Filter will leave you with all records that are on or after a year ago today:

 

DataNath_0-1683295280073.png

 

Everything else will be dropped out of the False (bottom) anchor.

mmustkee
10 - Fireball

Hi 

Thanks for your reply.

The date should start from Apr 22 to Mar 23. but the result shows below. I actually want previous 12 months data. Let's say we have Mar_23 as End month in the current file. So the data should reflect from Apr_22 to Mar23.

 

 mmustkee_0-1683295751088.png

 

DataNath
17 - Castor
17 - Castor

Ah okay @mmustkee, I hadn't realised you wanted to base it on the Max Date in the data itself. In that case, I would first find the Max() of your [STD Date] and then append it to your data:

 

DataNath_2-1683296699298.png

 

You can then use the following expression:

 

DataNath_0-1683296655376.png

 

DateTimeTrim([STD Date],'firstofmonth') >=
DateTimeAdd(
DateTimeTrim([Max_STD Date],'firstofmonth'),
-11,'month')

 

 

All this does is take the start of the month for the max date, take off 11 months (as you're doing 12 months inclusive) and filter for any dates within that. We can test that by now doing a Min() check on your [STD Date] field:

 

DataNath_1-1683296681930.png

 

Hope this helps!

mmustkee
10 - Fireball

Hi DataNath,

 

Could you please also help on the case "Fuzzy Match on name cleaning" which I raised few days back. I still did not get result to my expectation.

Appreciate your help on this too. 

 

Thanks for your help in advance.

mmustkee
10 - Fireball

Appreciate your help on  "Fuzzy Match on name cleaning"

DataNath
17 - Castor
17 - Castor

Hey @mmustkee glad to hear that helped! Unfortunately I'm not experienced at all with the Fuzzy Match tool and don't have any time to look far into it in the near future. I'm sure if you give it a bump someone else may be able to offer a hand!

mmustkee
10 - Fireball

No worries thanks

mmustkee
10 - Fireball

NW Nath. Thanks a lot 

Labels
Top Solution Authors