Alteryx Designer Desktop Discussions

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

Automating the months for each run.

stj1120
8 - Asteroid

Hi all,

 

How to automate

2 REPLIES 2
Ashetty
5 - Atom

Can you use a formula to convert the 3 letter month to a number and then the manipulation becomes easy.

Something like this:

 

DateTimeMonth(DATETIMEPARSE([Month],'%b'))

DavidSta
Alteryx
Alteryx

Hi @stj1120,

 

I would recommend to use a join as your dynamic filter like attached in the sample file.

 

DavidSta_0-1596027696752.png

 

 

At first you need to know which months are available. For this you parse your year and month information to an ISO date with the DateTimeParse() function, or the DateTime Tool.

Then you take the dates (should be everytime the 1st of the month) and make then unique. In the sample I use a Summarize tool as it makes sure that the results are sorted in an ASC order. After this you can say how many months you would like to see. So you select with the Sample tool the last 12 months.

 

This result then can be joined with your original data set and will automatically process only the latest 12 months. With this you don't need to update your workflow anymore.

 

Best regards,

David

Labels