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

Filter to Rolling 12 Months data

nicktekippe
8 - Asteroid

I am trying to filter my data to R12 data based on the columns shown below. With the year and month being separate I am unsure how to filter them to last 12 months. My best idea so far is filtering it using the formula created columns below. Let me know if you have any Ideas. 

Thank You!

nicktekippe_1-1660143076862.png

nicktekippe_2-1660143106537.png

 

 

2 REPLIES 2
DataNath
17 - Castor
17 - Castor

@nicktekippe how does this look? Within the Filter tool, the expression combines the Year & Date (as a string), before parsing it as an actual date and checking whether or not this falls within -12 months of now:

 

DateTimeParse(ToString([Fiscal Year])+ToString([Fiscal Month]),'%Y%m') >= DateTimeAdd(DateTimeNow(),-12,'month')

 

Before:

DataNath_3-1660145502315.png

 

After:

DataNath_1-1660145453288.png

nicktekippe
8 - Asteroid

@DataNath That looks great thank you. I'll give it a shot.

Labels
Top Solution Authors