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,
Solved! Go to Solution.
@Inactive User If it's at the beginning of your field, you can use an expression like
startswith([Field], 'abc-treatment')
It can be anywhere in middle or end as well ..
eg- > xyz-treatment/def-maintainence/abc-treatment
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!
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