I have been struggling with a "simple" task, but I simply cannot get my head around it, on how to solve this using Alteryx.
What I am trying to do, is kind of a flattening a kind of hierarchy, by which there is many examples of here, but this is bit simpler.
I have a set of data with travels, start point and end point, like this, but in no particular order
What I am trying to accomplish is something like this
I have tried different approaches, joining on end point to start point, and also the Multi-Row formula, but so far I have not crack this nut, and would like to know how to do such a recursive lookup to do this.
Br
/Verakso
Solved! Go to Solution.
Hi Ryan
I have accepted you solution since it does work, but my head is still spinning,
So I have learned something new, iterative macros. I had to read up on that and see a few training videos, but I do not think I have completely understood how it is solved anyway.
So the first part I seem to get
It is the macro I am trying to get a grasp at
I kind a get the two text inputs, the join and the formula, but then I am lost.
What is the I Output doing, and how does the iteration actual work?
When I have looked at other examples, there seems to be some kind of loop in either the macro, or in the workflow surrounding the macro.
Kind of what I would have expected with the outcome of I Output macro output.
So yes it works, but I have not quite figures out why.
//Verakso
The I output in the macro is the next iteration. The I output will go to the I input and start all over again until there are no more iterations. The Join takes the iteration record and joins to the main dataset From/To. It will run out of iterations once there are no other trips/joins.
Hi Ryan
I appreciate you time to reply. I was in the meantime taking a deeper look my self, trying to get a grasp of how this works.
So I watched a couple of more videos on the subject (slow speed), and I finally had the Eureka moment.
The magic between the I Input and the O Output
I done in the Interface Designer - Properties
Here the iteration logic, or the loop as I mentioned is configured.
So I get it now.
On a personal note, when I was trying to built up my own macro from scratch I had put it a rather high number in the max iterations number, which had me wait quite a while until I realized I had make a mistake in the macro ;)
But thanks again for your time, to help me to understand this.
Br
/Verakso