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