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!
Solved! Go to Solution.
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')
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.
Boolean: match = true/no match = false
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.
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.
Sorry - yes, comma delimiter
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.
Cheers!
Phil
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!
User | Count |
---|---|
19 | |
14 | |
13 | |
9 | |
8 |