Alteryx Designer Desktop Discussions

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

Max Date Based with Unique Identifier

DodgerFH
7 - Meteor

I have a table that lists multiple items by Unique ID.   Each Unique ID can have multiple Modified Dates with same stage name.   Wondering if it is possible to get a Max Date for each specific Unique ID.  

 

Example.  

IDStageDate
0064600000F7jG2AAJComplete4/25/2023
0064A00000vteytQAAComplete3/17/2022
0064A00000we9kJQAQComplete5/5/2023
0064A00000xI7IVQA0Complete6/5/2023
0064A00000xnLnfQAEComplete7/4/2023
0064600000F7jG2AAJComplete6/1/2023
0064A00000xI7IVQA0Complete7/3/2022

 

 

Would like to get a final result like this:  

 

IDStageDate
0064A00000vteytQAAComplete3/17/2022
0064A00000we9kJQAQComplete5/5/2023
0064A00000xnLnfQAEComplete7/4/2023
0064600000F7jG2AAJComplete6/1/2023
0064A00000xI7IVQA0Complete7/3/2022

 

Tried Summarize Tool for Max Date,  but I only get highest date overall, not all fields are shown.   

 

Any help would be appreciated.  Thank you. 

4 REPLIES 4
ChrisTX
15 - Aurora

In the Summarize tool, first Group By ID.  If you want to carry the field for Stage, you will also need to Group By Stage, or you could use First.

 

Chris

Yoshiro_Fujimori
15 - Aurora

Hi @DodgerFH ,

 

Here is another way of doing this using Sort and Sample tools.

 

Workflow

Yoshiro_Fujimori_0-1687402091346.png

Output

Row 3 does not match with the Expected value.

But the actual should be correct, as 2022-07-03 < 2023-06-05.

Expected

Yoshiro_Fujimori_1-1687402109184.png

Actual

Yoshiro_Fujimori_2-1687402149077.png

 

BRRLL99
11 - Bolide

Another way of doing this is

using summarize tool >> group by ID and max of date

use Unique tool to remove repeating values from ID

 

and join on the basics of ID

 

BRRLL99_0-1687408633063.png

 

DodgerFH
7 - Meteor

Thanks for making it simple!  Still getting the hang of Alteryx, although I love the program.  

Labels