Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Community is experiencing an influx of spam. As we work toward a solution, please use the 'Notify Moderator' option on the ellipsis menu to flag inappropriate posts.
Free Trial

Weekly Challenges

Solve the challenge, share your solution and summit the ranks of our Community!

Also available in | Français | Português | Español | 日本語
IDEAS WANTED

Want to get involved? We're always looking for ideas and content for Weekly Challenges.

SUBMIT YOUR IDEA

Challenge #15: Warehouse Shipped Miles

GeneR
Alteryx Alumni (Retired)

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.

TaraM
Alteryx Alumni (Retired)

The solution to this exercise has been uploaded.

Tara McCoy
MarqueeCrew
20 - Arcturus
20 - Arcturus

@JoeM,

 

Not many takers on this challenge.

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
SeanAdams
17 - Castor
17 - Castor

:-) so I did it the hard way, but glad to have learned from the solution provided.

 

Spoiler
- 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

NicoleJohnson
ACE Emeritus
ACE Emeritus

Brushing up on my (basically nonexistent) Spatial skills in advance of the Grand Prix... :)

 

Spoiler
Solution: Create Points > Find Nearest Tool (Max Distance 10000 miles) > Join Item data > Formula: Distance Traveled > Summarize: Group By Item, Sum Distance Traveled.

WeeklyChallenge15.JPG
estherb47
15 - Aurora
15 - Aurora
 
Laurap1228
11 - Bolide

My solution was the same as the one posted.

 

Spoiler
challenge15.jpg
JustinMatthews
6 - Meteoroid

Never needing to use spatial tools for my current job, this challenge was very insightful for me.  And just simple enough :)

Spoiler
Wk 15.JPG
LordNeilLord
15 - Aurora

solution

Spoiler
Weekly Challenge 15.png
robcarroll
7 - Meteor

My Solution. First spatial challenge