Start Free Trial

Alteryx Designer Desktop Discussions

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

Like SQL - Contains

JDong
8 - Asteroid

Hi All,

 

I have data like the following but not limited to the following pattern in a column

 

TowerBrick
BrickTower
BricksinTower
Bricks.Tower-Bigbox
...tower.Jet
&%alstower TowerBrick

 

I want to create a new column where I classify all the above as "Tower". Can I create a formula using REGEX_MATCH or CONTAINS that can search the entire column with 4000 rows and find out which all contain "Tower"?

 

I tried the above but not working..maybe I am doing something wrong with the wildcard match.

 

Please advise.

 

Thanks

2 REPLIES 2
DataNath
17 - Castor
17 - Castor

Hey @JDong, yes you can do this with the Contains() function. Here's a quick example where I've also added an extra row to show the alternative outcome:

 

DataNath_0-1679073142679.png

 

Quick edit: If you need this to be case-sensitive i.e. only 'Tower' rather than 'tower' or 'Tower', then you can add the third argument to Contains() like so, setting this to 0:

 

DataNath_0-1679073390080.png

JDong
8 - Asteroid

trivial but seems it did not write to the table when I checked before posting this question 😀

 

Thanks!

Labels
Top Solution Authors