Hello,
I need you help please, I have two columns, one with the year and one with the week number, Sunday 1st January being week 1.
I want to return the Friday date for each row but for week 1, I want it to return the Sunday.
Example : for week 28 of year 2023, the date should be 07/07/2023 / week 1 of year 2023, the day should be 01/01/2023/ week 2 of year 2023, the date should be 01/06/2023.
I got it in excel but don't know how to put it in Alteryx.
Attached is the sample to use to get the date.
I hope you can help me.
Thank you in advance
Solved! Go to Solution.
You can filter for Week 1 using the Filter Tool and get the result in TRUE, whereas other weeks are under FALSE.
From there, you can use the following formula for Fridays:
DateTimeAdd([Start],5-ToNumber(DateTimeFormat([Start],"%w")),"days")
Replace it for Sunday as such:
DateTimeAdd([Start],7-ToNumber(DateTimeFormat([Start],"%w")),"days")
Hope this helps!
Hi @KS
Sorry, I read your statement wrongly. Fixed it with my new export, please find attached.
Thanks,
Cal
Hi @caltang
Thank you. Actually the Date column does not exist the input file. I just added it to show the output that I need.
I can only use the Week and year columns.
Thanks,
KS
You should have mentioned that earlier…!
Kindly attach your sample without the excel dates, just the raw data you want to transform.
Kindly edit your main post and attach your file there as well.
My bad, I though it was clear. I only included the date column to show the output I needed.
I just edited my post.
Thanks,
KS