Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Compare if data matches in different columns (no particular order)

aiste_griffiths
7 - Meteor

Hi guys, 

 

I am in need of your assistance and brains please :)

 

After blending and joining the data I am at the stage in my workflow where I have two columns with data separated by commas that I need to compare: I need to check if data in Column "Typology Code" appears in Column  "Key Typology" in no particular order.

 

As an output I would need to know how many times data from column C matched data on Column D.

 

raw data:

 

staff nameapp IDTypology CodeKey Typology
Josh1T12T12,T17,T18,T21,T22,T4,T7,T8
Josh2T21,T22T12,T17,T18,T21,T22,T4,T7,T8
Josh3T12T12,T17,T18,T21,T22,T4,T7,T8
Josh4T21,T21,T23,T22,T12,T7,T8T12,T17,T18,T21,T22,T4,T7,T8
Amy5T7T12,T17,T18,T19,T2,T20,T4,T6,T
Amy6T17,T18T12,T17,T18,T19,T2,T20,T4,T6,T
Amy7T21,T21,T23,T22,T24T12,T17,T18,T19,T2,T20,T4,T6,T
Amy8T7,T10,T4T12,T17,T18,T19,T2,T20,T4,T6,T
Tom9T21,T21,T22,T12,T7T12,T21,T22,T24,T4,T6,T7,T8
Tom10T12,T7,T8T12,T21,T22,T24,T4,T6,T7,T8
Tom11T12,T7T12,T21,T22,T24,T4,T6,T7,T8
Tom12T7,T24T12,T21,T22,T24,T4,T6,T7,T8

 

Desired output for Josh (and for other staff):

 

 T12T17T18T21T22T4T7T8
Josh30032011

 

Could you please guide me to the right direction how to work towards such output?

Thanks so much, Aiste x

3 REPLIES 3
CoG
14 - Magnetar

The Text to Columns Tool is the MVT (Most Valuable Tool) in this case, allowing you to check each code individually, aggregating at the end to calculate the total counts. I'm not sure exactly what your output is supposed to look like when all [staff name]'s are considered, so I just left them all together where null implies a code was not in [Key Topology] at all.

Screenshot.png

 

Hope this helps and Happy Solving!

aiste_griffiths
7 - Meteor

Hi @CoG 

 

I don't know what to say - this is exactly what I needed!

Thanks so much, love this community 💖

ChrisTX
16 - Nebula
16 - Nebula

Try the attached workflow

 

Screenshot 2024-11-24 171519.png

 

Chris

Labels
Top Solution Authors