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)
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!
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