Alteryx designer Discussions

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

Dynamic filter to keep rolling N months

Highlighted
Meteor

Hi,

 

I have a dataset with 18 months of data.  Each month a new month is appended to the existing dataset.  I'd like to create a filter that keeps only the most recent 14 months (rolling 14 months).  I've attached a simple workflow. 

 

The Date Filter tool would work if I could dynamically specify the "end date" as the most recent date in the Month column.  Any suggestions would be much appreciated.

 

Thanks. 

Highlighted
ACE Emeritus
ACE Emeritus

Hey jjc42,

I modified your workflow to account for a dynamic 14 months. Give it a shot!

 

Jack

Highlighted
Meteor

Thanks, Jack.  That did it!

Highlighted
Meteor

 thanks very much for posting. worked perfectly for me.

Highlighted
Meteor

Thanks Jack! I found this usefull as wel.

Asteroid

Hi, Jack, I think your workflow will solve my exact problem as well. Only change would be in my case, I don't want a rolling 14 months. I want it to append every new month starting with 201803. Reason being, I began running this workflow back in March and want to make it more dynamic than adding on a new filter each month.

Highlighted
Meteoroid

Hi Jack.  Can you please share your workflow with me.

 

I need to append current month data with non matching records of previous 12 months and append . With Batch macro, I cannot do this since my month date is dynamic and cannot create 12 parameters for date.  I think my process would require iterative macro but I am not sure how to do it.  Can you please share the logic to do this.

 

Thanks

Vikas

Labels