Alteryx Designer Desktop Discussions

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

Select Most Recent Date in Alteryx - Multiple Values

chris4987
7 - Meteor

Hi! I am new to Alteryx and am wondering how I can select the most recent date in Alteryx when there are multiple values. Sample below

 

Input:

Carl          01/01/2020

Carl          12/31/2020

Harold      02/01/2020

Harold      11/30/2020

Ronald     01/01/2020

Ronald     12/31/2020

Isaac        03/01/2020

Isaac        12/31/2020

 

Output:

Carl          12/31/2020

Harold      11/30/2020

Ronald     12/31/2020

Isaac        12/31/2020

2 REPLIES 2
BrandonB
Alteryx
Alteryx

Summarize tool group by the name and then select max for the date, then join back to the original data set on the name and max date fields. This will only pass through the max date for each name. 

danilang
19 - Altair
19 - Altair

Hi @chris4987 

 

Something to note here is that all dates in Alteryx need to be in yyyy-mm-dd format.  Any other format is treated as a string and compared in alphabetical order so 01/01/2021 will be sorted before 12/31/2020 since "0" < "1".  Convert your input date strings to date data types before applying any comparisons.    The attached workflow uses a DateTime tool to convert, but a DateTimeParse() function in a formula tool would work as well

 

Dan

Labels