Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Multi Field Combination for Mix / Max Date

kpurcell
6 - Meteoroid
Hello,

I was hoping if someone could help if there is an easier way to do this.

I have a table with userid, activity code and activity date stamp.  Is there a formula that would give me min activity date and max acivity date for each uniquie userid, activity code for each day.  For example
 
useridactivityactivity date stamp
1pick3/1/15 9:00 AM
1pick3/1/15 9:15 AM
1pack3/1/15 11:15 AM
1pick3/2/15 11:15 AM
1pack3/2/15 11:15 AM
3pick3/1/15 9:00 AM
3pick3/1/15 9:15 AM
2pack3/1/15 11:15 AM
2pick3/2/15 11:15 AM
4pack3/2/15 11:15 AM

Any help would be greatly appreacited.

Kevin
2 REPLIES 2
kane_glendenning
10 - Fireball
Hi Kevin,

To do this, you probably want to use a Summarise tool. The Prep work that will be needed is getting a field for each day. The summarise tool will do the min/max, and then a join tool will append to the original data if that was required.

A formula tool with the following will give you the Day field ?DateTimeTrim([Activity Date Stamp],'day')

The Summarise tool will just need Group By: UserID, Activity, Day, Min (Activity Date Stamp), Max (Activity Date Stamp)

If you want to append your results back on, then use a Join tool on all the relevant fields to append the Min & Max fields.

Kane
kpurcell
6 - Meteoroid
Thank you Kane.  I will try that approach.

Kevin
Labels