In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Set up your security questions now so you can recover your account anytime, just log out and back in to get started. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

Min & Max Date Per Row (Across Several Columns)

AlteryxUserFL
11 - Bolide

Besides using a large number of if statements, is there an easy way to determine the min or max date per row across several columns? See below for example: 

 

 

IDDate 1Date 2Date 3 Max Date
11/1/20195/1/20191/1/20195/1/2019
210/01/20191/1/20195/1/201910/01/2019
310/01/201910/01/20195/1/201910/01/2019
41/1/20191/1/20191/1/20191/1/2019

 

2 REPLIES 2
echuong1
Alteryx Alumni (Retired)

You can use the transpose tool to get all of the values in one column. From there you can use the summarize tool with a group by on the ID field to get the max date. See attached for an example. 

 

 

echuong1_0-1576173694327.png

RolandSchubert
16 - Nebula
16 - Nebula

Hi @AlteryxUserFL ,

 

you could use the Transpose tool to convert columns to rows using "ID" as the key column, use a Summarize tool to find the MAX value (group by ID) and join the result to your original data. But - first you'll have to convert your dates to "Date" data type (and re-convert at the end). I've attached a sample workflow.

 

Regards

 

Roland

Labels
Top Solution Authors