ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

Like keyword in Alteryx

Inactive User
Não aplicável

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 RESPOSTAS 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
Não aplicável

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

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

Claje
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
Átomo

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

Rótulos
Autores com maior número de soluções