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

How do I extract duplicates that occur only twice in my data?

GaRaGe
8 - Asteroid

I am using Unique macro to get the duplicates from my data set and join it back to the main data to fetch all the duplicates. However, my ultimate goal is to identify the duplicates which occur only twice 

 

For example, my data is (A,B,C,A,D,B,A,C,D,D,A,B)

my output should return (C,C,D,D) . it should ignore A,B as they are occurring more than twice. 

 

Any suggestions on how to do it?

2 REPLIES 2
DataBlender
11 - Bolide

Hi @GaRaGe

 

You could use summarize tool to group by the relevant field(s) that you had been using in your unique tool.

 

Then do a count of a records and filter only for records that occur twice. You can then join this result back on to your original dataset.

jdunkerley79
ACE Emeritus
ACE Emeritus

You can use a Summarise tool to get number of each instances, filter where the count is two and then a Join tool to filter down to just those record.

 

2017-01-25_09-08-47.png

 

Sample attached.

Labels