Alteryx Designer Desktop Discussions

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

How to use the If Function

Yahairaandrade
Météoroïde

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 RÉPONSES 3
DataNath
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
Quasar

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

cjaneczko
Pulsar

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
Étiquettes