cancel
Showing results for 
Search instead for 
Did you mean: 

Challenge #26: Service Technician Travel Distance

GeneR
Alteryx Alumni (Retired)

Challenge #26: Service Technician Travel Distance

The link to last week’s challenge (challenge #25) is HERE

 

This week’s challenge is a use case faced by one of our customers that can leverage the geo-spatial tools available in Alteryx.  If you have the spatial data available you can output your results as drive-distance, in the event that you do not have the drive-distance data available, please use the straight-line distance.  The basic tools and setup of the data needed will be identical.  Output results will be provided for both methods.  In the event that you use drive-distance and your results vary slightly from the sample output, it may be due to variance in the data set used for the exercise.

 

Use Case:  in order to audit their employee expense reports, a service company would like to calculate how far (in miles) their technician is traveling from their hotels, to the worksite, then to their destination hotel on a daily basis.

 

The Data:  The source is collected in a way that record 1 contains the spatial object for the beginning hotel for day 1, record 2 is the spatial object for the worksite for day 1, and record 3 is the spatial object for the ending hotel for day 1.  This pattern repeats for three successive days.

 

Find the distance on a daily basis the technician is either driving or straight line distance if you don’t have the spatial data available.

 

Enjoy!

Attachment
Download this attachment
Attachment
Download this attachment
DylanBell
10 - Fireball

Re: Challenge #26: Service Technician Travel Distance

My solution:


Bulien
Attachment
Download this attachment
davidskaife
Magnetar

Re: Challenge #26: Service Technician Travel Distance

My attempt, not very simple but it works!

 

 

Attachment
Download this attachment
Dominic_Brady
Asteroid

Re: Challenge #26: Service Technician Travel Distance

My solution: used multi row formula to generate stop ID's for the journey each day, which I then built a sequence polyline from and subsequently measured.

Attachment
Download this attachment
JBevan89
Asteroid

Re: Challenge #26: Service Technician Travel Distance

my solution attached

Attachment
Download this attachment
SteveY02
Asteroid

Re: Challenge #26: Service Technician Travel Distance

Almost Done.

Unlike other user, I used self-join and distance tool to calculate the straight line distance. To me, this method is more straight forward the cursive calculation.

One more thing, I don't have Spatial Data Pack, So don't know how to calcaulate the drive distance, maybe google map api could be a option?

Attachment
Download this attachment
TGreen
Asteroid

Re: Challenge #26: Service Technician Travel Distance

Calculated only linear distance, no dataset for drive length.

Attachment
Download this attachment
pedcar
Asteroid

Re: Challenge #26: Service Technician Travel Distance

solution without drivetime

Attachment
Download this attachment
RebekaMazuchova
Asteroid

Re: Challenge #26: Service Technician Travel Distance

Smiley Happy

Attachment
Download this attachment
Daniel_Homola
Asteroid

Re: Challenge #26: Service Technician Travel Distance

Here!

Attachment
Download this attachment
Rhys_Cooper
11 - Bolide

Re: Challenge #26: Service Technician Travel Distance

Great refresher on spatial tools:

 

Spoiler
Screenshot 2025-06-06 091137.png
Attachment
Download this attachment