Alteryx Designer Desktop Discussions

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

Remove duplicate records based on two columns

timothyyeo
7 - Meteor

Hi All,

 

I have a set of records and would like to remove duplicate values based on two columns.

 

Document NoInvoice No
1231
4561
1232
4562

 

The correct set of records to be returned should be:

Document NoInvoice No
1231
4562

 

In other words, the invoice number  cannot be repeated. If Invoice Number 1 has already matched to Document No 123, then it should not be matched again to Document No 456.

 

How can I do this in Alteryx? Using the unique tool either on both columns or one of the columns does not work.

11 REPLIES 11
JoeS
Alteryx
Alteryx

Hi @timothyyeo 

 

It looks like you may be opening the macro and running it as a workflow.

 

An iterative macro is designed to be used as a tool itself.

 

I have attached a workflow that uses the macro within it. 

 

This then achieves the output that you wish.

 

There are lots of different resources available on the community about macros. I'd recommend starting with these:

 

this first

then this

 

 

timothyyeo
7 - Meteor

Thanks @JoeS . Good articles on building macros.

Labels