SOLVED
Easy IF/AND/OR expression question
Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Carluccio555
9 - Comet
‎11-20-2022
06:35 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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!
Solved! Go to Solution.
Labels:
- Labels:
- Expression
2 REPLIES 2
17 - Castor
‎11-20-2022
06:44 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
gautiergodard
13 - Pulsar
‎11-20-2022
06:49 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
