community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.

Mapping Sales Territories - How to enlargen districts until they are adjacent to another?

Highlighted
Atom

Hi everyone

 

I would like to map Europe into different sales territories with similar sales opportunities. I found this very helpful description (https://www.thedataschool.co.uk/ben-davis/mapping-equitable-sales-territories-alteryx-part-3/), which helped me to build a macro and a workflow, which allocates my sales reps tothe nearest postal districts and takes into account that every rep should have similar sales in total.

 

The macro starts from the sales rep with the lowest sales opportunity and assignes to him the nearest sales territory (postal district), which hasn't been mapped to another sales rep yet. This goes on, until each territory is mapped to a sales rep.  

 

The Macro I built:

Alteryx Macro.PNG

The Workflow:

Alteryx Workflow.PNG

 

This works fine, but I ran into the same problem, as Ben did in the post mentioned above: In the last iterations, when the last territories are assigned, these will sometimes be very far away from the sales rep in order to meet the criteria of equal sales.

Therefore the result looks for me like this:

Equal sales.PNG 

Instead of more like this:
 Non equal sales.PNG

 

Ben proposes a solution to this problem in his youtube post: https://www.youtube.com/watch?v=EFaGzO0Kc-g , where he swaps his districts in the end, in order to create sales territories for each sales rep that only consists of adjacent postal districts.

I tried to rebuilt this workflow for my problem, but the problem I run into is, that my postal district are in the most cases not adjacent to another postal district so I cannot match district based on Touching / Intersecting Spatial Match as proposed by Ben.

 

Does anyone has another suggestion how to solve this problem, OR has a suggestion on how to enlargen the districts until all of them touch other districts?

 

Thank you very much.

 

Kind regards

 

Ben looks at using Spatial tools in Alteryx to make equal spacial sales territories

Maybe I'm over simplifying, but when I read this line:

 

"

I tried to rebuilt this workflow for my problem, but the problem I run into is, that my postal district are in the most cases not adjacent to another postal district so I cannot match district based on Touching / Intersecting Spatial Match as proposed by Ben.

"

 

I think that maybe you just need to add in 'dummy' records for those postal locations that don't exist in your data set with a sales value of 0.  Then once you are done mapping them all, remove the ones that you don't service.  Does that make sense?

Atom

 

Thanks a lot for your reply! This is actually a great idea, but I would need a list of all postal districts in Europe and don't have the budget to buy one. I was hoping therefore there might be another solution.

 

Kind regards

 

 

Labels