Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Community is experiencing an influx of spam. As we work toward a solution, please use the 'Notify Moderator' option on the ellipsis menu to flag inappropriate posts.
Free Trial

Alteryx Designer Desktop Discussions

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

Filter on duplicate rows with the greatest date while keeping any others

lahughes
7 - Meteor

In my data output below you will see I have the potential for there to be a separate instance (or instances) of a row based on the "valid from" date.

 

In these instances, how can I get my output, such that I keep only one instance, and that being the one with the latest valid from date?  The example below could have 1 or more duplicates based on date, and I want to keep just the row with the latest date.  So I would end up in the example below with rows, 13, 14, 16, 17, 18, 19, 20 in my output.

 

My guess is a formula that says, is Item Number and Component are the same, then look at the Valid From and keep the latest date.  But I cannot figure out how to write it or if there is an even better way to accomplish the task.

 

2017-05-22_13-40-27.png

 

 

 

 

 

 

 

 

 

 

 

Thanks,

Larry

2 REPLIES 2
JordanB
Alteryx
Alteryx

Hi @lahughes

 

You could sort the data based on item number, component and valid from date. The use the unique tool to take the first record (Latest date)

 

See workflow attached.

 

Best,

 

Jordan Barker

Solutions Consultant

 

 

lahughes
7 - Meteor

Thank you so much @JordanB

 

As a new user to Alteryx, I find that I have a tendency to over-complicate what turns out to be so simple using the tools provided. :)  Your solution worked perfect.

 

Thanks,

Larry

Labels
Top Solution Authors