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

Removing Duplicate Lines to Only Show one Row

ashleyinman
8 - Asteroid

If there are multiple rows of Parent Numbers, I want to only show the rows that have the newest Req create date and newest PO Line Creation Dates. I'm unsure what tools to use to achieve this.

 

Parent  NumberReq NumberPo NumberReq Create DatePo Line Creation Date
3517792630697414518807/24/172017-07-27
3517792649384415454312/11/172017-12-12

 

 

 

END RESULT This is What I want to show

Parent RMA NumberRequisition NumberPo NumberReq Create DatePo Line Creation Date
3517792649384415454312/11/172017-12-12
4 REPLIES 4
Thableaus
17 - Castor
17 - Castor

Hi @ashleyinman 

 

This should work:

max date.PNG

 

- Sort by Parent Number, then Req Create descending and Po Line Creation Date descending.

- Use Sample Tool to get first 1 row, grouping by parent number.

Flow attached.

 

Cheers,

nerces
8 - Asteroid

The above solution will work except in the case where you have two parents numbers with different Req Number and PO number but the same dates for Req Create Date and Po Line Creation Date. If you use a group by and then join back to the original data set, you will be able to not only return the rows that fit the criteria above, but also return any exact duplicates in your source data.

Capture001.PNG

 

neilgallen
12 - Quasar

@ashleyinman based on my reading of your post, which date takes precedence? that would determine the route you would want to proceed with.

iludeiro
5 - Atom

Thank you! I was also looking how to accomplish that. 

Labels