Alteryx Designer Desktop Discussions

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

Return the friday date for each week

Gaetano_B
8 - Asteroid

Hi All,

 

I have col. A (Regulatory Date) and I need to add a new column named 'Forecast Week Date' which returns the Friday for each date I have in column A. 

 

i.e if column A= 6-Oct-20 then col. B= 9-Oct-20

if column A= 28-Sep-20 then col. B= 2-Oct-20 etc..

 

Any suggestions?

 

Many Thanks in advance,

Gaetano

5 REPLIES 5
atcodedog05
22 - Nova
22 - Nova

Hi @Gaetano_B 

 

Here is a workflow for the task.

 

Output: (use a select tool keep only required columns)

atcodedog05_0-1602771107040.png

 

 

Workflow:

atcodedog05_1-1602770879387.png

 

Hope this helps 🙂


If this post helps you please mark it as solution. And give a like if you dont mind 😀👍

jdunkerley79
ACE Emeritus
ACE Emeritus

I suggest a formula tool with the expression:

 

DateTimeAdd([Start],5-ToNumber(DateTimeFormat([Start],"%w")),"days")

 

 

 Have attached a sample

atcodedog05
22 - Nova
22 - Nova

Happy to help 🙂 @Gaetano_B 

 

Cheers and Happy Analyzing 😀

Raj008
8 - Asteroid

Hi jdunkerley79,

 

How to calculate Previous Friday date for Monday?

 

Thanks,

Raj

nikhil07
5 - Atom

Hi, I tried to tweak the formula a bit to get Monday's date. DateTimeAdd([Start],1-ToNumber(DateTimeFormat([Start],"%w")),"days").

But this is failing for every Sunday. Ideally I am looking for 2022-02-07 if my input is 2022-02-13. How can I achieve the same?

Labels