Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

How to get the year from just the just the month, if my data is in sequential order?

natday
5 - Atom

Screenshot 2020-07-01 at 11.07.22.png

Every day i receive this data that just has the month column, up until the first 12 (dec) I would like to have the year as the current year. Then after that the previous year.
The data has multiple years in. So currently id like there to be a new column that says 2020, until it says 12 in the month column then 2019. Then when the month column is 12 for the first time again the year to say 2018 and so on.
Ive attached a CSV of just the month column.

4 REPLIES 4
JosephSerpis
17 - Castor
17 - Castor

Hi @natday I mocked up a workflow let me know what you think?

 

Year_01072020.JPG

AngelosPachis
16 - Nebula

Hi natday,

 

I think a multi-row formula and a formula tool can solve this. Please mind that towards the bottom of the csv file, there are some random "12" months followed by "8" rather than "11" (as an example have a look at record 1233). That will cause your year to jump from 2012 to 2011, so be mindful of that

 

Annotation 2020-07-01 113839.png

 

Please let me know if that was what you've been looking for.

natday
5 - Atom

Thanks a lot for your help! This will be really useful for our messiest data

natday
5 - Atom

Thanks a lot for your help! Thanks for pointing that issue out

Labels