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

How to compare lists within two fields

averyoldakowski
7 - Meteor

Hello, 

 

I have a dataset with two fields that I am trying to compare which can have a practically unlimited number of items in the list. I'd like to compare the items in the list and output both the similarities and differences into separate columns. My data currently looks like these first two columns:

 

List1List2SimilaritiesDifferences
A,B,C,D,EB,D,C,E,FB,C,D,EA,F
A,B,C,DE,F,G[NULL]A,B,C,D,E,F,G
A,B,C,D,EB,C,E,D,AA,B,C,D,E[NULL]

 

I realize I could do something with text to columns but I believe that wouldn't be the most efficient because the number of items in the list varies drastically.

 

Thank you!

Avery

3 REPLIES 3
averyoldakowski
7 - Meteor

Also, it is possible that there are duplicates within either list: 

 

List1List2SimilaritiesDifferences
A,B,C,D,A,B,C,DA,BA,BC,D
Qiu
21 - Polaris
21 - Polaris

@averyoldakowski 
I expect your items are seperated withe delimeter "," then we can break them into each of them. 
then it is all about Join and Union. 😁

0925-averyoldakowski.png

 

averyoldakowski
7 - Meteor

Perfect, thank you!!

Labels