community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

Separate all uniques and all duplicates

Highlighted
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?

Alteryx Certified Partner
Alteryx Certified Partner
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 reboot. Order shall return.
Alteryx
Alteryx

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

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

Meteor

This is exactly what I was looking for, thanks!


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!  

Alteryx Certified Partner
Alteryx Certified Partner
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 reboot. Order shall return.
Labels