Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

removing duplicates from different fileds logic?

azanetell
6 - Meteoroid

So I use fuzzy matching to match company names. I review all of the matches and maintain an "exclude" file for pairs that fuzzy matched, but are not actual matches. My file is getting very large and I wanted to try an consolidate it by removing pairs that are duplicated in the data.

 

My exclude file has a "Master" and "Compare" fields. In my flow I use a join tool to remove items that match to the master and compare fields in my exclude file. However it does not matter if it matches to the master and compare or the compare and the master, as long as the pair matches in one direction or the other I want it excluded. So because of this I wanted to remove duplicates in my exclude file where the master and compare are the same in more than one row. Its hard to explain so here is an example:

 

image.png

In the picture above you can see I have ADCOM INC and ALCOA INC as a pair twice. In one instance ADCOM INC is the "master" but in the other instance it is the "compare". How can I remove one of these pairs and keep the other. All methods I can think of will either remove both or neither.

4 REPLIES 4
LordNeilLord
15 - Aurora

Hey @azanetell,

 

Try something like this:

 

  • Add a recordID and transpose the data
  • Sort the values so they are alphabetical
  • Concatenate the values back together
  • Pick the first match in the list
  • Join back to your original data

Removing Duplicates.PNG@LordNeilLord

Part time Tableau, Part Time Alteryx. Full Time Awesome


Data Lover

azanetell
6 - Meteoroid

Yes this works! Thank you!!!!!!! I would have never figured that out on my own!

LordNeilLord
15 - Aurora

I enjoyed this one :)

 

Glad I could help

 

@LordNeilLord

Part time Tableau, Part Time Alteryx. Full Time Awesome


Data Lover

Haneen
5 - Atom

great!

Labels