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.
RESUELTAS

How to use the If Function

Yahairaandrade
Meteoroide

Hello community.


I'm new to alteryx and exploring the tools. I want to apply an "IF" function as I would in Excel but I don't know how to apply it in Alteryx.

 

In Excel my formula is the following:

=IF(AG3="","expense","project")

3 RESPUESTAS 3
DataNath
17 - Castor
17 - Castor

Hey @Yahairaandrade, the equivalent in Alteryx would be:

 

IF [AG] = "" THEN 'expense' ELSE 'project' ENDIF

 

Following the syntax of: IF <condition> THEN <result if true> ELSE <result if false> ENDIF

 

We can also use immediate if statements which resemble Excel more closely, which would look like:

 

IIF([AG]="",'expense','project')

 

Which follows the pattern of: IIF(<condition>,<result if true>,<result if false>)

 

Hope this helps!

nagakavyasri
Cuásar

IF AG3=" " then "expense" else "project" ENDIF

cjaneczko
Púlsar

It would look something like this in the formula tool. Where [AG] is the field or "column" that cell AG3 is in.

IF [AG] = '"' THEN 'Expense' ELSE 'Project' ENDIF
Etiquetas
Autores con mayor cantidad de soluciones