Alteryx Designer Desktop Discussions

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

Finding same value in different rows in two columns

JeremyZ
7 - Meteor

Hi all, 

 

Does anyone know how to find same value in different rows in two columns?

Here if the value in "Ref1" column in first row matches the value in "Ref2" column in second row, I will add "match" to the "Comments" column for both two rows.

The same value cannot appear in the same row.

 

Original:

Ref1 Ref2Comments
12345678 
01231234 
ABCEFGH 
XYZWABCDEF 
EFGHABCD 

 

Desire result:

Ref1 Ref2Comments
12345678match
01231234match
ABCEFGHmatch
XYZWABCDEF 
EFGHABCDmatch
10 REPLIES 10
BS_THE_ANALYST
14 - Magnetar

@JeremyZ here's one way (it's a bit scrappy, I've not got much time). I'll refine it shortly

BS_THE_ANALYST_0-1681292385376.png

All the best,
BS

 

NMangera
10 - Fireball

Hi @JeremyZ

 

 

 

JeremyZ
7 - Meteor

@BS_THE_ANALYSTThanks for your help!

But when I try to run my raw data which contains more than 300 rows, the "Append Fields" tool shows error message "There were more than 16 records in the source", how could I fix it? thanks

martinding
13 - Pulsar

Hi @JeremyZ,

 

Here's another approach:

martinding_0-1681293706117.png

 

martinding
13 - Pulsar

Hi @JeremyZ,

 

In the Append Tool, you can select allow more than 16 records.

JeremyZ
7 - Meteor

@martinding Thanks for your help!

But the last two rows need to show "match" in "Comment" column as well. 

JitendraPal
7 - Meteor

Hi @JeremyZ you can post this as a weekly challenge, you would have received more responses/solutions to the same problem, anyways I'll also post my approach once I work through it.

 

on the other hand, you can still submit this as an weekly challenge.

martinding
13 - Pulsar

@JeremyZ 

 

I see what you mean.

 

martinding_0-1681294422512.png

 

Christina_H
14 - Magnetar

Here's another option

Christina_H_0-1681294702532.png

Labels