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")
Solved! Go to Solution.
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!
IF AG3=" " then "expense" else "project" ENDIF
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