Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Like keyword in Alteryx

Inactive User
Not applicable

Hi,

 

I have to look up for words like 'abc-treatment' from a column which is a concat of multiple values ( eg 'abc-treatment/def-maintainence') 

 

'abc-treatment/def-maintainence'- this should match

'def-treatment/abc-maintainence'- this shouldn't match

 

I am not sure about what function to use here

 

Thanks,

 

 

 

 

4 REPLIES 4
patrick_digan
17 - Castor
17 - Castor

@Inactive User If it's at the beginning of your field, you can use an expression like

startswith([Field], 'abc-treatment')

 

Inactive User
Not applicable

It can be anywhere in middle or end as well ..

eg- > xyz-treatment/def-maintainence/abc-treatment

Claje
14 - Magnetar

I'm going to use examples with a SQL syntax for comparison to give you all three versions of the "Like Operator" as I would recommend in Alteryx

 

LIKE 'abc-treatment%'  (start of string):

STARTSWITH([field],'abc-treatment')

LIKE '%abc-treatment%' (any part of string):

CONTAINS([field],'abc-treatment')

LIKE '%abc-treatment' (end of string):

ENDSWITH([field],'abc-treatment')

 

I hope this helps!

jdoughty1
5 - Atom

Hi Claje,

 

I like the Contains option!

I used the NOT ([field] like ["FY20*","FY19*","FY18*","FY17*","FY16*","FY15*","FY14*","FY13*","FY12*","FY11*","FY10*","FY09*"])  this eliminates all values in the array but returns the values that are not in the array, such as "FY21" etc. Also the asterisk saves me time writing each with the quarter.

 

Curious how would you write this in Alteryx?

Many thanks for your time.

J

Labels