Alteryx Designer Desktop Discussions

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

Need Help to Find Formula

Kpascal97
5 - Atom

Can you please help me finding the right formula for these two belows:

 

1-) Create a new column named “YearError”. If the Date is >1/3/2025, then YearError=”Invalid”.

 

2-) In the Date column, there is an observation of 2055. This is an error. Correct it to 2025. (Hint:
use Fomula)

2 REPLIES 2
gawa
16 - Nebula
16 - Nebula

hi @Kpascal97 

At first, your question seems the extract from some learning contents.(Because in question 2, it says 'Hint')

Please make sure that sharing those contents here does not violate terms & condition you should have agreed.

 

Anyway, for question 1, you can simply use IF THEN ELSE conditional statements.

For question 2, Replace function would help.

 

Good luck!

Manoj_k
9 - Comet

Formula to create "YearError" column:

CASE WHEN [Date] > ToDate('01/03/2025') THEN 'Invalid' ELSE NULL ENDif

 

Formula to correct date:

IF Year([Date]) > 2050 THEN ToDate('01/01/2025') ELSE [Date] ENDif

Polls
We’re dying to get your help in determining what the new profile picture frame should be this Halloween. Cast your vote and help us haunt the Community with the best spooky character.
Don’t ghost us—pick your favorite now!
Labels