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

Alteryx Designer Desktop Discussions

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

How to run a loop to get distances from one location to another using x,y coordinates

James_Simpson_125
6 - Meteoroid

Hello, 

 

I currently have two separate lists of coordinates:

1) Store Locations

2) Customer Locations.

 

the 2 lists are formatted as follows - 

Store0001        36.22341      -115.15654

Store0002        36.42131      -116.15

 

Customer1       36.23321      -115.26003

Customer2       36.52132      -116.23589

 

I want to be able to run a formula that essentially calculates the distance by car from Store0001 to Customer1 and Customer 2 as a new column, lets say "Distance from Store0001", then once is done with that calculation, moves on to Store0002 and calculates the distance from Store0002 to Customer 1 and 2 and creates a new column labeled  "Distance from Store0002".

 

Would this require a macro? Or is this a multi-row/multi-field formula tool? How would format this workflow?

 

 

Thanks,

 

 

 

 

 

 

1 REPLY 1
lwolfie
11 - Bolide

See the sample I attached.  I think you could just append the two tables, calculate the distance and then use a cross tab tool. 

Labels
Top Solution Authors