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

Alteryx Designer Desktop Discussions

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

Separate all uniques and all duplicates

DanWhalen
7 - Meteor

The Unique tool separates all unique records into one stream, and all the "extras" into a separate one.

 

INPUT:
ColName
cat
cat
dog

 

OUTPUT:
UNIQUE
ColName
cat
dog

 

DUPLICATE
ColName
cat


But what if I want instead for all the Uniques to go to one data steam and all Duplicates to go to the other?

 

OUTPUT:
UNIQUE
ColName
dog

 

DUPLICATE
ColName
cat
cat


I can imagine some workarounds, but is there a preferred way of accomplishing this?

6 REPLIES 6
MarqueeCrew
20 - Arcturus
20 - Arcturus
Try watching my YouTube video which explains the only unique tool.

https://youtu.be/HXhpgEOSi2Q

Cheers,

Mark
Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
ZacharyM
Alteryx Alumni (Retired)

+1 to what @MarqueeCrew said - the CrEW macros are amazing and I highly recommend them, for this tool and others in the package!

jdunkerley79
ACE Emeritus
ACE Emeritus

2018-12-11_19-53-59.png

Use a summarise tool (Group By ColName, Count ColName) and then filter when Count = 1

 

This will give you unique records

 

You can then join this back to the original and the J output will have the unique records, L output will have the others

DanWhalen
7 - Meteor

This is exactly what I was looking for, thanks!


DanWhalen
7 - Meteor

Mark,

I appreciate the macro, but I'd like to avoid them at the moment.  I'm new to Alteryx, and for now, I want to make sure I'm able to understand/articulate all of what my code is doing.  Haven't gotten into macros yet, would have to treat it as a black box right now, and I feel hinky about black boxes this early on.  Trying to stick to the basics only right now.

 

Soon though!

 

Thank you, I appreciate the reply!  

MarqueeCrew
20 - Arcturus
20 - Arcturus
I understand your POV but want you to know that a good proportion of Alteryx tools themselves are macros. The video that I suggested explains multiple alternatives to the macro itself and is a good source of basic training.

Cheers,

Mark
Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
Labels
Top Solution Authors