In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Set up your security questions now so you can recover your account anytime, just log out and back in to get started. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

IF statement with multiple condition

faisal9999
8 - Asteroid

I want to translate this below code into alteryx can anybody help me out

 

 

WHEN platform NOT IN ('Amazon Display', 'FireTV') THEN

(CASE WHEN video_completion_25pct=0 THEN youtube_views ELSE video_completion_25pct)


WHEN platform='FireTV' THEN video_start ELSE 0

 

there are two condition which am not able to put in alteryx.

 

4 REPLIES 4
FrederikE
13 - Pulsar

Hey @faisal9999,

 

This should do: 

 

IF [platform] NOT IN ('Amazon Display', 'FireTV')

THEN 

 

IF video_completion_25pct=0

THEN youtube_views

ELSE  video_completion_25pct

ENDIF

 

ELSEIF platform='FireTV'

THEN video_start

ELSE 0

ENDIF

 

Raj
16 - Nebula

try this

 

IF [platform] NOT IN ('Amazon Display', 'FireTV') THEN
IIF([video_completion_25pct]=0, [youtube_views], [video_completion_25pct])
ELSEIF [platform] = 'FireTV' THEN
[video_start]
ELSE
0
ENDIF

faisal9999
8 - Asteroid

Thank you @Raj @FrederikE  both solution worked for me :)

Raj
16 - Nebula

Please mark it as solution !!
Have a great Weekend.

Labels
Top Solution Authors