Alteryx Designer Desktop Discussions

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

Multi-Condition IF THEN ELSE statement

5 - Atom

Hi Everyone,

I'm new with Alteryx and appreciate if someone could tell me in plain language what the below statement in Alteryx mean.   

Thanks in advance for the help.


IF [value1]-[value2]+[value3] then 1 else 0 endif


my main problem is that i don't get the logic and mathematic behind this condition.

11 - Bolide

The statement you provided is a conditional statement written in Alteryx's expression language. Let me break it down for you in plain language:


IF [value1] - [value2] + [value3] is true
THEN output 1
ELSE output 0


Here's the logic behind it:

  1. Calculate the result of [value1] - [value2] + [value3].
  2. If the result is true (non-zero), the condition is satisfied, and the output is 1.
  3. If the result is false (zero), the condition is not satisfied, and the output is 0.

In other words, the expression checks whether the value obtained by subtracting [value2] from [value1] and then adding [value3] is greater than zero. If it is, the output is 1; otherwise, the output is 0.

20 - Arcturus
20 - Arcturus

I again doubt you are a Robot or AI. 😂