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.

Creating a new column. IF Date <= 90 days of Column A then [Column A]

wonka1234
10 - Fireball

Hi,

 

I am trying to create a new column called Max Date.

 

If [action_date] is less then 90 days of column A then use column A

Elseif [action_date] is less then 90 days of column B then use column B

else ""

endif

 

The issue here is column A and column B are year and months. Ie Column A is literally 202202, and column B is literally 202203

 

This is how these columns look:

 

wonka1234_0-1674156263484.png

 

How can I do 90 days less then these months? or any amount of days for that matter? I dont want to hardcode any values here.

 

2 REPLIES 2
BS_THE_ANALYST
14 - Magnetar
14 - Magnetar

If you want to do 90 days less than a date, you can use DateTimeAdd(**insert date here**, -90, "day") 

 

You can change the -90 to whatever you want. You can also change the 'days' part aswell to months/years. I'll attach the help guide below for specifics.

 

BS_THE_ANALYST_0-1674157114703.png

 

All the best,
BS

LinkedIN

Bulien
BS_THE_ANALYST
14 - Magnetar
14 - Magnetar

I think this is doing what you want? I've attached the workflow

BS_THE_ANALYST_0-1674157967404.png

 

All the best,
BS

LinkedIN

Bulien
Labels