Alteryx Designer Desktop Discussions

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

Multi-Condition IF THEN ELSE statement

Saeed_ps
アトム

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.

2件の返信2
Hammad_Rashid
ボリード

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
ENDIF

 

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.

Qiu
21 - Polaris
21 - Polaris

@Hammad_Rashid 
I again doubt you are a Robot or AI. 😂

投票
We’re dying to get your help in determining what the new profile picture frame should be this Halloween. Cast your vote and help us haunt the Community with the best spooky character.
Don’t ghost us—pick your favorite now!
ラベル