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

Alteryx designer Discussions

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

The latest release includes several enhancements designed to improve your Community experience!

Learn More

Find distance between one address row and every other address row

Alteryx Partner

I have a table that has a list of addresses.
For every address, I need to find other addresses in the same table that are within 5km distance.

 

I used find nearest tool, distance tool and multi-row formula but nothing seems to give the correct output.

 

What am I missing?

Alteryx Certified Partner
Alteryx Certified Partner

You have addresses,  but do you have spatial objects? The spatial functions in Alteryx require spatial objects. If you have an address and want the spatial information, you'll need to geocode those addresses to return latitude/longitude values (which can be turned into spatial objects). 

 

There is a geocoding macro and dataset available from Alteryx, but it is a paid add-on and not included with the base Designer installation. Alternatively, if there aren't that many records, you could just manually Google each one and obtain the latitude/longitude values from Google. 

 

Once you have latitude/longitude values, you can use the Create Points tool in Alteryx to create spatial objects. From there, there's a couple ways to obtain the within 5km matches you're looking for that we'll talk about once we have those spatial objects. 

Alteryx Partner

Yes, I have all the required licenses and I've created centroids for those addresses.
It is the 'find distance between one point and every other point within the same table' that I'm unable to get.

 

Thanks!

Alteryx Certified Partner
Alteryx Certified Partner

Ok great! I've put together the attached example to show a few different ways the spatial process can be achieved with different spatial (and non-spatial) tools. Check it out and let me know if any of these work for you. 

Labels