Start Free Trial

Alteryx Designer Desktop Discussions

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

Concatenate based on pre-existing multiple rows

CDF234557
7 - Meteor

Hi! I am trying to think of how to create a concatenated column from data like the below: 

 

DateABFlag
1-JanAB1
2-JanAB1
3-JanAB1
5-JanAB0
2-JanCD1
3-JanCD1
4-JanCD1
6-JanCD0

 

To the following: 

DateABFlagOutput 
1-JanAB11-Jan - 3-Jan
2-JanAB11-Jan - 3-Jan
3-JanAB11-Jan - 3-Jan
5-JanAB00
2-JanCD12-Jan - 4-Jan
3-JanCD12-Jan - 4-Jan
4-JanCD12-Jan - 4-Jan
6-JanCD00

 

Note - it is easy to filter out the flag if that makes the equation easier. Still can't figure out what I am missing... Thanks!!

3 REPLIES 3
fmvizcaino
17 - Castor
17 - Castor

Hello once again @CDF234557 ,

 

Almost real time answer hahahahh. Attached is a workflow that does the job. 

 

Let me know if that works for you.

Best,

Fernando V.

CDF234557
7 - Meteor

Hi Fernando! Thanks(yet again!!). To add a layer of complexity to this, I am not sure first and last will work as I think I may have the same instance multiple times, e.g.

 

DateABFlag
1-JanAB1
2-JanAB1
3-JanAB1
5-JanAB0
2-JanCD1
3-JanCD1
4-JanCD1
6-JanCD0
7-JanAB1
8-JanAB1
9-JanAB1

 

Here I would want the output to be:

DateABFlagOutput 
1-JanAB11-Jan - 3-Jan
2-JanAB11-Jan - 3-Jan
3-JanAB11-Jan - 3-Jan
5-JanAB00
2-JanCD12-Jan - 4-Jan
3-JanCD12-Jan - 4-Jan
4-JanCD12-Jan - 4-Jan
6-JanCD00
7-JanAB17-Jan - 9-Jan
8-JanAB17-Jan - 9-Jan
9-JanAB17-Jan - 9-Jan

 

 

Any thoughts or suggestions?  

fmvizcaino
17 - Castor
17 - Castor

Hi @CDF234557 ,

 

Attached is a workflow that does the job.

 

Let me know if that helps.

Best,

Fernando Vizcaino

Labels
Top Solution Authors