Free Trial

Alteryx Designer Desktop Discussions

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

Group by and Include Key Value

Andrew_Seaman
6 - Meteoroid

Here is my dataset:

KeyColorDate
1Red1/1/2021
2Red2/1/2021
3Red3/1/2021
4Blue3/1/2021
5Blue4/1/2021
6Black1/1/2021
7Black5/1/2021
8Black2/1/2021

 

I would like to group by Color, return the Max Date, then include the Key with this record:

 

ColorMax DateKey
Red3/1/20213
Blue4/1/20214
Black5/1/20217

 

In Alteryx I'm having trouble configuring the Summarize tool to get this output, any help is appreciated.

1 REPLY 1
Luke_C
17 - Castor
17 - Castor

Hi @Andrew_Seaman 

 

Here's an example (Note: I believe your answer for blue is incorrect)

 

  1. Convert dates to alteryx date format
  2. Summarize to group by color, take the max date
  3. Join back to data on date and color to get the corresponding record ID

Note, if there are two records with the same date you will get two records back after the join. You could use another summarize tool to concatenate the IDs into one row.

 

 

Luke_C_0-1628627550458.png

 

 

Labels
Top Solution Authors