Hi all,
just saw a Christmas riddle and was wondering how to dispay ALL possible cominations of fragments into an Excel list. Enclosed is a short table with 5 positions (POS) and 3 possible fragments per position. If you put all possible cominations in the list, you would finally see somewhere the solution to the riddle.
The expected solution is for
POS1 MER
POS2 RYC
POS3 HR
POS4 IST
POS5 MAS
Any ideas how to create the entire list of all possible combinations (order is already fixed by the position) with an Alteryx workflow?
"MERRYCHRISTMAS" to the Alteryx Community.
Solved! Go to Solution.
Great, thanks! Now need some time to follow along the logic ... :-)
Understanding your macro might cause me some headache :-) But very good learning experience for me. Thanks for sharing!
Hi,
I didn't write that macro either, but I think I can summarize what it is doing!
Basically it is creating a list of what options should be output, and is giving each one an ID. So in your example, we take the POS field, which conveniently has five values, and tell it to output each value to its own output stream, in the order they are read in. In our data, since it was already sorted by the POS field (POS 1 was the first set of records, POS 5 was the last), this meant that everything was already well ordered for this process. You can also have it output by number of records, which would output the most common POS to #1, the second most common to #2, etc.
What this essentially does is give us a set of up to 5 outputs, plus an overflow. Fortunately in this case, 5 outputs was exactly enough (we had 5 different POS values).
Hi Claje,
thanks for the further explanations. In the meantime I have replaced the macro by 5 filter tools to get the 5 POS-related fragments separated. Then following your solution was "easy going". I like your approach very much - nice and easy.
User | Count |
---|---|
17 | |
15 | |
15 | |
8 | |
6 |