Alteryx Designer Desktop Discussions

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

Identify and extract unique values based on two different columns

DanMurphy17
5 - Atom

I have a data set that captures multiple duplicate entries that pertain to the one deal but have differing settle dates. What I'm looking to do is keep in my output file just the deal ID with the latest settle date as it contains the most accurate value based on latest pricings. 

DanMurphy17_0-1635935238004.png

 

 

Using the above as an example I'd like to keep entries for Deal IDs 23 and 28 that are highlighted in yellow as they have the latest value. 

 

Would using the Unique tool, or a filter be the best way to go about this? Or if there is an even easier way.

 

Thanks
Dan

2 REPLIES 2
Christina_H
14 - Magnetar

A Unique tool always takes the first instance of the unique value, so if you sort your data in descending date order you could then use a Unique tool to take the latest date for each ID.  Alternatively, assuming your data is already in date order you could use a sample tool to take the last row for each ID.

mceleavey
17 - Castor
17 - Castor

Hi @DanMurphy17 ,

 

In addition to @Christina_H 's suggestion, you could also use the sum tool to group by the max for each grouping:

 

mceleavey_0-1635939307861.pngmceleavey_1-1635939323343.png

 

 

mceleavey_2-1635939335044.png

 

Workflow attached.

Hope this helps,

 

M.

 



Bulien

Labels