Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

Travel itinerary sequence

Thank you for an idea @danilang! at this stage we dont have date/time information, just the itinerary...


And again, I want to come back to this macro that @CharlieS shared earlier - it works perfectly on a sample of 5 - what I dont understand is why it stops working on population greater than dozen of lines.


Looking at the logic of the macro, it assumes a simply connected list.  As soon as I add a duplicate Arrival, i.e A->B, effectively turning the list into a tree, it starts looping and hits the iteration limit.   Your data has both duplicate departures and duplicate arrivals.


While you don't have time information, do you at least have the order of segments? 



@danilang, unfortunately not, the task is to create the order of the segments. 

@danilang @clant @jdunkerley79 @MarqueeCrew


Guys, can you please have a look at the attached solution. Clearly, there is a pattern there, but I dont know how to create an iteration. Is it something you can help with? 




The first step to simplify is attached.


This takes it from 1000 input to 35 by joining the first unique steps. Some odd tools in the middle to make the sequence.


I'll have a think on how to build a single journey from this. I agree with @danilang that I am not convinced no guarentee of a unique path

I do apologize @jdunkerley79, not sure I understand why we narrow the list of 1000 lines to those 35....Are those the cities where duplication is present? If so, I think it is to Summarize, Count Distinct, filter for those with Count 2+ and than Join with the remaining group, no?


At the same time, do you think there is a way to iterate the workflow I shared earlier? 

Alteryx Certified Partner
Alteryx Certified Partner

Others have pointed out the issues here regarding calculating a route with multiple loops and variable lat/long assignments for some locations The brute force method exploring every potential route is likely the only way this will be solved (without additional data). 


Here's a quick and dirty modification of the macro I built in the other thread that takes a random path when multiple possibilities are available. This could solve it, but I don't know how many attempts it will take to link all 1000.

@alexey_nikityuk no the 35 paths are joining all the unique start and end together (i.e. if I got to Sevenoaks once then I know I can join the two trips).


you can then move to attempt to build a single path joining these together. Will put that part together tonight I hope



This is awesome @CharlieS! Thankyou so much!


It took 1700 iterations, and produced the ouput more or less needed. I will continue tweaking the logic but major part is done! Thanks again!

Alteryx Certified Partner
Alteryx Certified Partner

I'm glad I could help.


If you are able, I recommend spending more time investigating a rigorous methodology like @jdunkerley79 suggested.