Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Separate duplicate values

Upali
6 - Meteoroid

I have trouble segregating unique and duplicate values from my datasheet. I used the "unique" tool and selected the column in which to look for the duplicate values and ran it. One row of the duplicate value is getting moved into the unique value output and the other row is getting to the duplicate value. I would like to move both rows containing the duplicate value in the column selected to be moved to the Duplicate output. How can I do this.

5 REPLIES 5
binuacs
21 - Polaris

@Upali One way of doing this

binuacs_0-1683841080382.png

 

Raj
16 - Nebula

hope this helps ,

 

MikeBird
7 - Meteor

Hi, 

I use both of these techniques together. 

I summarize the records based on the field/fields I use as my unique criteria and then use a join to compare these to the results. 

Anything with a record count of 1 is truly unique, anything else is a duplicate. 

 

This could be a Macro or, even better, an option on the Unique tool itself at source for Unique or Truly unique.

Upali
6 - Meteoroid

Thanks all for your replies. I was able to separate out the unique data and duplicate date using the summarize tool. I could then join the unique data element with the original data file.

How do I join the duplicate data with the original file. I am having trouble joining data from the false output to the original information.Any suggestions will be appreciated. Thanks.

MikeBird
7 - Meteor

Hi Upali, 

You would use a Union tool for that. 

The Join brings data together horizontally (equivalent of a VLookup in Excel) either by a key field or by position. 

A Union stacks data vertically matching up field names where it can. 

 

In the TrulyUnique workflow I uploaded, add a Union where the browses are to bring all the data back together. 

You could even add it directly after the Join, bringing together everything out the 'J' and the 'R' but I'm assuming you are doing some processing on the unique entreies before you want to merge it back in. 

If this is the case, the Union is still in the one you would use to bring all the data back together.

Labels