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

Question on Multi Row Formulas

VidyaS
7 - Meteor

Hello, 

 

Trying to see how I can use Multi Row Formula or any other method to build a workflow that has Start and Stop values in single row for event called 'Stop' and I am looking to create new column and populate with Start and Stop values in single column. However the events are not always continuous,for example, start is not always followed by stop event, sometimes it is followed by another start event and stop can be followed by another stop event. Below in an example snippet of the data set and the new column is what I was trying to get to. Any help is much appreciated.

 

IDEventEvent IdDateStart ValueEnd ValueNew Value
200Start15/8/2019 10:44:16 AMNullNull9
200Stop25/8/2019 11:05:50 AM91010
200Start15/8/2019 12:30:48 PMNullNull22
200Start15/8/2019 12:59:35 PMNullNull44
200Stop25/8/2019 1:03:28 PM223333
200Stop25/8/2019 1:31:56 PM445555

 

I've attached my workflow and sample example output in it as well.

 

Please let me know if you need more information or have any questions.

 

Thank you in advance!

4 REPLIES 4
JohnJPS
15 - Aurora

Hi @VidyaS,

 

It gets a little tricky because they could have an arbitrary number of Starts one after another, and so a MultiField formula might not work so well in that kind of situation. You could do an iterative macro, but I noticed that, since every start always gets a stop eventually, and in the same order... then if I split the set and join it back together, "NewValue" will just line up perfectly.  That's not very well explained.  Please see the workflow for the nuts and bolts.

 

Hope that helps!

John

VidyaS
7 - Meteor

Thank you, John, for the response. Did you attach a workflow or were you referring to the sample workflow?

JohnJPS
15 - Aurora

Oops!  I've edited the previous post to add the attachment.  Thanks!

neeraj_778
7 - Meteor

Hi,

 

Yes, she is right it's a bit tricky request. I have added to my peace of code(workflow) into yours so that you can easily compare.

 

Thanks,

Neeraj

Labels