In case you missed the announcement: Alteryx One is here, and so is the Spring Release! Learn more about these new and exciting releases here!

Alteryx Designer Desktop Discussions

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

Easy IF/AND/OR expression question

Carluccio555
9 - Comet

I'm still getting used to expression syntax in Alteryx and hoping someone can help.

 

I want column F2's value to be made equal to "Service" if the following condition is true:

 

 

[F2] = "Operations"

 

AND

 

The first character in [F4] = "5" OR The first 2 characters in [F4] = "H5"

 

Hope that's clear thanks!

2 REPLIES 2
JosephSerpis
17 - Castor
17 - Castor

Hi @Carluccio555 I mocked up a example how to tackle this challenege. I would also recommed the Writing Condtional Statements Interactive lesson to get use to the syntax.

 

IF_20112022.JPG

gautiergodard
13 - Pulsar

Hey @Carluccio555 

A little hard to tell without sample data, however below is what I came up with. Hope this helps!

if [F2] = "Operations" and ((left([F4],1) = '5') or (StartsWith([F4], 'H5'))) then "Service"
else ''
endif

 

 

 

Labels
Top Solution Authors