Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.

Match One Value between Two Strings

8 - Asteroid

Experts - 


Here's the case: I need to figure out if there is at least one common value present in 2 different strings.  For example:


String A: 123, abd, edf

String B: 345,edf,789


In this case there is a match on "edf". 


I am looking for a solution that:

> Doesn't involve parsing and then transposing the strings as that will create millions of records

> Leaves the strings as they are

> Doesn't involve lots of tools - as I already have a solution that involves lots of tools


If I am overlooking an existing function or simple process to get this done, please let me know!


Thanks in advance!

14 - Magnetar

Are these strings different fields in the same record? Or on different records that share a common ID or grouping?


If they're in the same record, you could filter to these records by doing something like:

Contains([String A],'edf') AND Contains([String B], 'edf')

8 - Asteroid

Different fields in the same record.  The problem is I don't know if or what the matching value would be between fields.


"edf" was just an example - not necessarily a known value I am looking for.

21 - Polaris

Hi @Bonediggler 


Can you provide the expected output? what is the output after comparing?

8 - Asteroid

Boolean: match = true/no match = false

14 - Magnetar

Hmm I see, needs to dynamically check to see if there's something in common. I can't think of any solution that doesn't include parsing it out but maybe some of the other smart people here can. 

10 - Fireball

Are the values to be tested delimited, and if so, is there really a common delimiter?  Your sample leads me to believe it is  "," that is what tells the tokens apart.

8 - Asteroid

 Sorry - yes, comma delimiter

13 - Pulsar

Hi @Bonediggler 


If the comma is your common delimiter, you can use a couple Text to Columns and a Filter to find only the strings that match. I mocked up 300,000 rows of data using this method, which ballooned up to 2.7M rows after the Text to Columns tools, and it ran in about 2 seconds.






8 - Asteroid

I am working with millions of rows and up to dozens of values per string so this method might cause Alteryx to explode, but it definitely is one solution!