Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.

Connect the travel path in succession

I have a situation where in I need to arrange the data in order, for example a customer boards the bus from Station A to Station B called route 1, then he goes from station B to Station C and so on, however the data we have is not in sequence. 

We need to find routes that are in succession. To identify the succession the customer recognized that the station he departs to in the previous route was the arriving station in his current route.



(1) Customer starts from his home and depart from bus station A (route 1)

(2) Arrives in station A and Departs to station B (route 2)

(3) Arrives in station B and Departs to Station C (route 3)






Alteryx Certified Partner

Attached is a example of how an iterative macro could be used to solve for find the next route segment each time. It could use a lot more work on things like how to handle if there isn't a "Home" to start from, or if a segment is missing. Hopefully this gets you started.


Thanks Charlie. This is a perfect solution.


I tried to use it in my workflow which has got 2000 records. However it is not working and keep outputing the loop result. Do you know why is that? Do I need to do anything for the interface?



@CharlieS, I have similar problem as @benbenjoy, when having 1000 lines the logic is not working. I adjusted Append formulas to allow it to go beyond 16 lines, but the macro just keeps spinning without any output....


Can you please advise on this? 

Alteryx Certified Partner

@benbenjoy - The example solution from above has the iterations limited to 100. Try increasing that in the Interface Designer (Ctrl+Alt+D).


@alexey_nikityuk - Even if the process doesn't finish, something should output form the macro. The macro was purpose built for the original case and may not provide a universal solution. It you debug the macro, does the first iteration complete as expected?


I recommend starting new posts here on the Community so that any advice can be tailored to your specific scenarios and desired output. 

Thanks a lot, @CharlieS! I indeed created a separate post here:


If you can help with iteration of the last WF that I posted there - i would be so grateful!


How long does this workflow take to run?