We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

IF AND Formulas that consider a date

trevian3
8 - Asteroid

I am trying to find the correct way to write the following statement within Alteryx. 

If a material is equal to the one specified and the date in the date column is greater than 2025-01-01 then change the value in the site column if not true leave the site column as is. This is the formula I have written to try and achieve my desired result. 

IF [Material] = "123456" AND [Date] >= "2025-01-01" THEN [Site] = "SPAIN" ELSE [Site] ENDIF

For some reason, when running this in the formula tool, the site does not change to Spain as expected. Do you have any tips on getting this to work? 

If I can get this to work it would be helpful. Many thanks in advance for the help with this! 

 

3 REPLIES 3
alexnajm
18 - Pollux
18 - Pollux

You don't have to type [Site] = "SPAIN"

 

Just "SPAIN" will do

trevian3
8 - Asteroid

Thanks @alexnajm! I feel so dumb for missing that! I was thinking that I'm missing something much more complex and didn't even think about the structure of the original IF statement! Many thanks this is working as it should have if I would have written this the right way from the get go! insert facepalm emoji! 

alexnajm
18 - Pollux
18 - Pollux

All good! 😊

Labels
Top Solution Authors