Free Trial

Alteryx Designer Desktop Discussions

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

Word match between two fields

Amos1980
5 - Atom

Hi,

I have two files to match between. In one file I have a column which contains a description of a product and the same structure in the other. I want to test how many words match between the two, for example:

Description 1Description 2words match
SENSOR DISP.F.OXYMETER NELLCOR904-NSENSOR DISP.F.OXYMETER2
1320011 - HEPA FILTER 1320011- HEPA FILTER ESC120013
CATH. ENDOTR. BLUE LINE CUFFED טובוס 8CATH. ENDOTR. 2

 

Thanks,

Amos

8 REPLIES 8
T_Willins
14 - Magnetar
14 - Magnetar

Hi @Amos1980,

 

It takes some data cleansing and may not exactly match your needs, but this workflow gives the result you wanted.  You may need to tweak the data cleanse based on your actual data, but this should give you a start.

 

word match between two fields.jpg

 

Qiu
21 - Polaris
21 - Polaris

@Amos1980 
Basically same with @T_Willins approach, and I am thinking a library of delimeter might be easy to use.
So if there is some thing new, just update the red line part.1021-Amos1980.PNG

Amos1980
5 - Atom

Thanks,

The thing is that I couldn't use the record ID since the two fields I'm comparing are in different files and are located in different rows.

What can I do then?

 

Thanks,

Amos

T_Willins
14 - Magnetar
14 - Magnetar

HI @Amos1980 

 

Is the data formatted in the files so that the first record is compared to the first record, the second to the second, and so on?  If yes, you can join the two files using a Join tool and Join by Record Position.  If not, how do you know which rows should be compared to the rows in the other file?

Amos1980
5 - Atom

Hi,

 

The files are very different in size and in rows position.

I tried to use Fuzzy but this is not really the purpose, I just need to know how many words match between rows in both files (could give more than one result per Item).

Currently I'm using a mix of Alteryx and SQL queries but I really want to solve it through Alteryx only.

 

Thanks

T_Willins
14 - Magnetar
14 - Magnetar

Hi @Amos1980,

 

If I am understanding you correctly, you need to compare every row from one file to every row in the other file.  While this could be done using an Append Fields tool, I am thinking a batch macro may work better.  This batch macro compares every row from Description 2 and compares it to each row in Description 1.  The workflow then summarizes the word count and puts the two descriptions side by side.

 

Batch MacroBatch Macro

 

Workflow v2Workflow v2

 

 

Amos1980
5 - Atom

Thanks for the effort,

I'm not sure why, but I'm having trouble downloading the macro.

However I used your first solution with a combination of Fuzzy match from 1% match and that pretty much solved it so thank you very much, it was very helpfull.

 

Thanks,

Amos

taylorbyers
6 - Meteoroid

Is there a way to use this to output a list of words that were matches?

Labels
Top Solution Authors