Alteryx Designer Desktop Discussions

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

Want to compare two list and flag yes if at least one number is matched

Ekmi9
8 - Asteroid

hello Everyone,

 

Need some help on to compare two list and flag yes if at least one number is matched like.

Input

Ekmi9_0-1669367692592.png

 

Output

Ekmi9_1-1669367736838.png

Thanks in Advance !

 

10 REPLIES 10
DenisZ
11 - Bolide

Have you tried using the join tool and potentially split to columns/rows?

ShankerV
17 - Castor

Hi @Ekmi9 

 

Can  you please paste the text input instead of screenshot.

 

Will be easy to copy and paste in Alteryx input to work on solution.

 

Many thanks

Shanker V

ShankerV
17 - Castor

.

.

DataNath
17 - Castor
17 - Castor

Hey @Ekmi9, here's how I'd go about this. We just split one list, check if the other contains that number and then flag accordingly. We can then just take the max flag for each RecordID (as this will be yes if so and no if no matches) and re-join:

 

DataNath_0-1669368455516.png

Ekmi9
8 - Asteroid

enclosed

DenisZ
11 - Bolide

Please see attached workflow

 

DenisZ_0-1669368595902.png

 

 

 

DataNath
17 - Castor
17 - Castor

Updated with your provided data:

 

DataNath_0-1669368637141.png

binuacs
21 - Polaris

@Ekmi9 One way of doing this

 

binuacs_0-1669369943798.png

 

OllieClarke
15 - Aurora
15 - Aurora

Hi @Ekmi9 

 

If your data is the same as your sample here, then I've got a one tool solution:

OllieClarke_1-1669370204587.png

Since the items are single characters, then we can use the replacechar() function to feed them in as a list and compare the outcome. I did have to replace the comma with a ~ so that the comma wouldn't affect the outcome.

 

If your actual data isn't the same in structure, then @DataNath or @binuacs  solutions will always work

 

Ollie

Labels
Top Solution Authors