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.
I struggled with this one.... Not the logic behind it, but the wording in the scenario. It didnt rtanslate to me that i should be working it out on a per item basis. Small adjustments made to find my answer but i enjoyed working with the spatial tools. A great introduction.
Process: - Create points for the the stores and warehouses based on Lat and Lon - Append data to match each store with each warehouse - Calculate distance from each store to each warehouse - Sort by Store and by Distance (ascending) from store to warehouse - Select every third record (since there are 3 warehouses, given the sort from above, this will give the warehouse closest to each store - Join results with list of items to be shipped to each store - Calculate miles for every item (Distance * number of items) - Group by item, sum miles per item