Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

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