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

Combine multiple rows into one row

aaltaffer
5 - Atom

Hello!

 

I am attempting to combine two date fields so that they can be plotted on the same axis. 

 

My current data set is formatted like this:

IncidentAssigned toOpened DateResolved Date
12345Joe1/1/20171/6/2017
23456Linda2/2/20174/1/2017
34567Bob3/3/20173/7/2017


My hope is to format it like this:

IncidentAssigned toDateDate Type
12345Joe1/1/2017Open
12345Joe1/6/2017Resolved
23456Linda2/2/2017Open
23456Linda4/1/2017Resolved
34567Bob3/3/2017Open
34567Bob3/7/2017Resolved


Can anyone help me to do this? I cannot seem to find the right tool. 

4 REPLIES 4
Kenda
16 - Nebula
16 - Nebula

Hey @aaltaffer! I would split the data into two different streams, the left only keeping the open date and the right only keeping the resolved date. I would rename the date fields as just 'Date'. Then, I would add a Formula to each stream that creates a Date Type field with the value "Open" in the one stream and "Resolved" in the other. Adding a Union will result the format you're wanting. Hope this helps!

 

This is the one select tool's configuration.This is the one select tool's configuration.

 

 

This is the other select tool's configuration along with the rest of the workflow.This is the other select tool's configuration along with the rest of the workflow.

JoshKushner
12 - Quasar

Using the transpose and regex tool you can get the desired result

 

Flow:

flow.PNG

 

Results:

Results.PNG

 

Transpose:

transpose.PNG

 

Regex:

regex.PNG

aaltaffer
5 - Atom

This worked! Thank you!

aaltaffer
5 - Atom

Thank you this is another great solution

Labels