Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Extracting strings from a column to match it with other columns of strings

Roche
8 - Asteroid

Hi everyone, 

 

I need some help with a problem.

 

I have a column of concatenated strings, which are 1+ items, likely not more than 15 in one record.  Then I have other lists of strings.  These lists are all combinations of only 2 items, concatenated with 2 possible combinations.  All the items correspond to a number and the numbers can be a concatenated form or in columns.  When I join the larger list to the smaller lists, it does not yield results due to the fact that the concatenated values in the smaller lists are only 2 items and some of the combinations in the larger list are not only 2 items, but can vary from 1 or more.  

The larger list of strings can change (the smaller lists of strings also change) for various situations, and so the solution cannot be cannot be only for the example I share, but needs to be applicable in general.

 

I need to find a way to get the correct receipt numbers joined back to the smaller lists.  I.e. if a record in the larger list contains "av,extent,cab,ar.net" then it needs to match with "cab,extent" OR "extent,cab"  If the smaller list is "alt,ar.net" or "ar.net,alt" then it needs to match with all the records named "ar.net,ls.ut,alt" and "alt,cab,ar.net" in the larger list.  The smaller list must match with all the records that contains the substring in the larger list.  The unique tool can then be used at the end to get the unique receipt numbers with the specific concatenated string.

 

The code numbers correspond to the item 1 item  item 3 etc in the concatenated list of items.

 

Thank you for your time and help!

 

Updated the flow - there was a mistake.

 

Rouche

 

6 REPLIES 6
Christina_H
14 - Magnetar

Here you go.  I transpose the codes to one per column before matching, and check whether the number of matches equals the number of items.  If you hadn't included the codes, I would have used Text To Columns (split to rows) instead.

Christina_H_0-1643883079958.png

 

atcodedog05
22 - Nova
22 - Nova

Hi @Roche 

 

Here is my take based on my understanding.

 

Workflow:

atcodedog05_0-1643885332292.png

 

Hope this helps : )

atcodedog05
22 - Nova
22 - Nova

Hi @Roche 

 

If the above is not what you are looking for please provide the expected output so that we can work towards it.

 

Happy to help : )

Roche
8 - Asteroid

Hi, thank you so much for helping!  The solution that I was looking for is as Christina have provided.

 

 

Roche
8 - Asteroid

Another solution that helped me is challenge 18 which is determining pairs of combinations from merchants.

 

atcodedog05
22 - Nova
22 - Nova

Happy to help : ) @Roche 

 

Note you are allowed to mark more than one post as a solution. So if my post helped feel free to mark it as a solution.

Cheers and have a nice day!

Labels