This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
We've recently made an accessibility improvement to the community and therefore posts without any content are no longer allowed. Please use the spoiler feature or add a short message in the message body in order to submit your weekly challenge.
We are currently experiencing an issue with Email verification at this time and working towards a solution. Should you encounter this issue, please click on the "Send Verification Button" a second time and the request should go through. If the issue still persists for you, please email firstname.lastname@example.org for assistance.
Here is a new challenge for this week, it is a continuation from last week’s warehouse distribution challenge. If you did not complete last week’s challegne don’t worry, you will not need any output from part one to complete this part. The link to the solution for last week’s challenge is HERE. I posted two solutions for last week’s challenge. The first is a solution without a macro and is in my opinion a more straight forward approach to solving the problem. I included the second macro approach because it is an excellent example of how to utilize an iterative macro.
The use case:
Based on data from last week’s warehouse distribution challenge, we want to calculate the total shipped miles per item. The products are available from 3 different warehouses, lat/lon data is provide for each warehouse and each store location.
Your goal is to find the total distance travelled as straight line miles for each item based on it being shipped from the closest warehouse.
Good luck, I hope you are having fun with these challenge and expanding your knowledge of Alteryx. Thanks to all that have provided feedback.
- joined all warehouses to all stores. At this point I had a list of stores with the products; cross-joined to the warehouses (so SxIxW rows) - Worked out the distances for all combinations - then filtered out all but the shortest.
The solution provided works well if every warehouse has every product, and is way more efficient because it only uses SxI rows (number of items by store) - but if different warehouses had different product sets, then an approach like mine may be needed where you actually have to explode down to the store/item/warehouse level for every item.
Anyway - learned more about the "find nearest" component from the provided solution - thank you @GeneR and @MarqueeCrew