Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Distance Tool - Tour Dates

jesuisbo
8 - Asteroid

Hi everyone,

 

I'm hoping to get your help with the following; 

 

My dataset contains tour dates for multiple artists and what cities they've visited. I want to calculated the distance travelled of a particular artist. I'm stuck however since we're talking about more than 2 destinations. Is there a way to calculate the distance between multiple citites with the distance tool (or anything else)? 

 

Please find a snippet of the dataset below. I do know that you need to have transpose the rows to columns still. 

 

Tour sequence is the order in which the artist travels. 

 

Any help would be much appreciated! 

 

Thank you

 

Bo

2 REPLIES 2
BenMoss
ACE Emeritus
ACE Emeritus

There's quite a few methods to achieve this.

 

You could use the polybuild to built a line spatial object using the sequence field for each artist. You can then use the spatial info tool to calculate the total distance.

 

Alternatively you could use the multirow formula tool to calculate the distance between the active row and the row beneath, and then use the summerize tool to get your total distance.

 

Example workflow attached with both solutions.

 

Note, the latitudes and longitudes are completely made up. 

 

Ben

jesuisbo
8 - Asteroid

Thank you Ben - this works perfectly! 

Labels