I am trying to figure out the logic in which to match inbound flights to the closest outbound flight, but the outbound flight can only be used once. Is there a way to do this in Alteryx?
Below is the output in which you can see that Outbound_RecordID 11 is used twice to match two different inbound flights twice.
I have attached the two tables as well as the workflow
Solved! Go to Solution.
I believe you will need an iterative macro to perform this task.
https://www.thedataschool.co.uk/marc-reid/creating-iterative-macro-alteryx/
I've built out an example with your data that I believe brings you to the solution you would like, see attached.
Basically the way it works is it takes your data through, takes the first match and pulls that through to keep, it then removes any instances of that inbound ID, and then instances of that outbound ID, which gives us a new dataset (now excluding the potential for duplicates) which comes back round to the front, and the process loops.
Ben
Ben,
This is pretty awesome. I will definitely be reading up on Iterative Macro.
Thank you so much!!
User | Count |
---|---|
17 | |
15 | |
15 | |
8 | |
5 |