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 Number | Req Number | Po Number | Req Create Date | Po Line Creation Date |
3517792 | 630697 | 4145188 | 07/24/17 | 2017-07-27 |
3517792 | 649384 | 4154543 | 12/11/17 | 2017-12-12 |
END RESULT This is What I want to show
Parent RMA Number | Requisition Number | Po Number | Req Create Date | Po Line Creation Date |
3517792 | 649384 | 4154543 | 12/11/17 | 2017-12-12 |
Solved! Go to Solution.
Hi @ashleyinman
This should work:
- 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,
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.
@ashleyinman based on my reading of your post, which date takes precedence? that would determine the route you would want to proceed with.
Thank you! I was also looking how to accomplish that.