Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

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