ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

formula guidance on an IF statement

chad_hitachi
5 - Atom

How do I convert the following excel formula to an Alteryx logic statement?

 

=IF(OR(OR(OR(AND([Asset Group] = "GROUP 1",[Year] <"2020"),AND([Asset Group] ="GROUP 2",[Year] <"2023")),(AND([Asset Group] ="GROUP 3",[Year] <"2023"))),(AND([Asset Group] ="GROUP 5",[Year]<"2020"))),"Prior",N10746) 

2 REPLIES 2
alexnajm
19 - Altair
19 - Altair

Might be worth putting into an LLm next time 😊 try this:

 

IF (([Asset Group] = "GROUP 1" AND [Year] < 2020)
OR ([Asset Group] = "GROUP 2" AND [Year] < 2023)
OR ([Asset Group] = "GROUP 3" AND [Year] < 2023)
OR ([Asset Group] = "GROUP 5" AND [Year] < 2020)
THEN "Prior" ELSE "whatever N10746 is" ENDIF

aatalai
15 - Aurora

@alexnajm is correct but slightly more concise

 

IF (([Asset Group] in ("GROUP 1","GROUP 5") AND [Year] < 2020)
OR ([Asset Group] in ("GROUP 2",""GROUP 3") AND [Year] < 2023)
THEN "Prior" ELSE "whatever N10746 is" ENDIF

 

Labels
Top Solution Authors