Want to get involved? We're always looking for ideas and content for Weekly Challenges.
SUBMIT YOUR IDEAC479. More in spoiler
Very tough one. I think the answers are wrong tho.
Solved!
I think row 10 in the text answer file within the Start File is wrong. It says that the 30 units came from LOT_2, but they had to have come from LOT_3, since you used up all of LOT_2's units earlier
my solution:
This one took a while to get to a point where I felt comfortable with my result.
It was clear early on, from looking at the data, and the expected solution in the start file, and at the given solution file that there was going to be little guidance on this one, and I was going to have to figure things out and make decisions on my own.
The main decision that I made about this project was that the given datasets are already in order. Raw_1 is used for a different set of things than Raw_2, and the lot order is the First-In-First-Out order. Both the supply and demand tables should be addressed from the top down.
Learning
0. Sometimes you can find great benefit in planning your code/analysis before you even start writing script or adding tools to a canvas. I found after several false starts that I really needed to back up and plan the whole thing out.
1. Iterative macros are great if you are specific with the schemas of your input, output, and looping. Being off by even one column can cause the whole thing to error out.
2. When it comes to iterative macros then data row order matters. Combine this with multi-row formulas, and you have to be really careful about how the data table is organized geographically (which things are in which rows and which columns). This is especially true vis-a-vis the data that you are looping back through the iterative part of the macro. If the row order is wrong then your answer can come out as completely wrong, unusable, or even as gibberish.
3. Standard macros are like functions in a scripting language. Batch macros are like "for every item in list" loops, and iterative macros are roughly equivalent to "while" loops. This can make Alteryx feel clunky if you are used to scripting.
4. Clarifying expectations at the beginning can save a lot of headaches and unpleasantness during the development process. If at all possible you should try to nail down requirements and limitations before you start writing code or analysing data.