Free Trial

Alteryx Designer Desktop Discussions

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

vlookup or searching comma separated values in another comma separated values

Pragnya
5 - Atom

Hi Team,

 

I have two excel files with tables.

 

First Book contains below data:

 

Items
A,B,C
D,E,F
G,H,I

 

Second Book contains below data :

 

ItemsValues
X,Y,A,B,F,K1
X,Y,A,B,C,F,K2
L,M,N,D,E,X,Y3
L,M,N,D,E,F,Z,F,K4
X,Y,G,H,D,E5
X,Y,G,H,I,L,M6

 

I want to search book one items in the book two and if all items in the cell matches then get the respective value like v lookup.

 

Final output should looks like

 

ItemsValues
A,B,C2
D,E,F4
G,H,I6

 

Kindly help me in resolving the scenario.

 

8 REPLIES 8
Jean-Balteryx
16 - Nebula
16 - Nebula

Hi @Pragnya ,

 

Here is a workflow doing what you need !

 

It assigns a RecordID to each row then splits them to get one character per row. It joins to your reference to check if the value is present then group to count the number of values present for each recordID. It then joins to the total count of value for each row and retrieve the row if all values are present in the reference.

 

Capture d’écran 2021-07-23 à 11.51.03.png

 

 

 

Emil_Kos
17 - Castor
17 - Castor

Hi @Pragnya,

 

I believe my solution is quite similar to what @Jean-Balteryx build.

 

Emil_Kos_0-1627034188704.png

 

The most important part is the text to columns. Splitting the data into rows make this task much easier to achieve.

 

Good luck on your Alteryx journey! 

 

danilang
19 - Altair
19 - Altair

hi @Pragnya 

 

If you know that items within each list will be in the same order, you can use a simple find replace to get the results

 

danilang_0-1627042176823.png

Dan

HomesickSurfer
12 - Quasar

Hi @Pragnya 

 

Here's my simple approach.

Capture.PNG

Pragnya
5 - Atom

Hi Jean,

 

Thank you so much for your quick response & for your solution. Really great workaround.

Pragnya
5 - Atom

Hi Homesicksurfer..

 

Thank you for your solution.. i think we can use your workflow only when the csv values are in sequential (adjacent to each other).

 

Please correct me if am wrong..

Pragnya
5 - Atom

Thanks a lot each and every one who provided the workarounds. 

HomesickSurfer
12 - Quasar

Hi @Pragnya 

 

You are correct.

Labels
Top Solution Authors