We have extended our Early Bird Tickets for Inspire 2023! Discounted pricing goes until February 24th. Save your spot!

Alteryx Designer Discussions

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

Filter to Rolling 12 Months data

nicktekippe
7 - Meteor

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
16 - Nebula

@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
7 - Meteor

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

Labels