Important Community update: The process for changing your account details was updated on June 25th. Learn how this impacts your Community experience and the actions we suggest you take to secure your account here.

Alteryx Designer Desktop Discussions

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

Combining rows with matching conditions

OIT
6 - Meteoroid

Can someone please support me on this topic? I am  Looking to combine rows that have different dates but have the same Task and Team.  In the result table, I'd like the min. of the two start dates and max. of end dates, and the total number of days(in a new column).  Thank you!

 

EngagementTaskTeamstart dateEnd date
XYZCOMA20.01.202418.02.2024
ABCARGC21.02.202418.03.2024
IJKNPB20.07.202418.08.2024
ABCARGC29.03.202418.04.2024
ABCARVC15.06.202410.07.2024

 

Output

EngagementTaskTeamstart dateEnd dateNumber of weeks
XYZCOMA20.01.202418.02.20244
ABCARGC21.02.202418.04.20248
IJKNPB20.07.202418.08.20244
ABCARVC15.06.202410.07.20243
3 REPLIES 3
DataNath
17 - Castor

Hey @OIT, how does this look? Alteryx can only deal with Dates in an ISO format (YYYY-MM-DD) so the first step just involves converting from your custom DD.MM.YYYY format. From there we can just group by the engagement/task/team and find the min/max of the start and end date respectively. After that, we just take a DateDiff in days and divide this by 7 to get days, flooring the calculation:

 

8000.png

binuacs
20 - Arcturus

@OIT one way of doing this

image.png

OIT
6 - Meteoroid

@DataNath Many thanks! this worked perfectly for my scenario. 

Labels