Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Find multiple nearest location to a place or point

msaxen2
7 - Meteor

Hi, 

 

I m trying to find nearest chain locations around a location. I m looking to output nearest Starbucks, Chick-Fil-A, walgreens, 7 eleven etc. I have a list of all the chains and their location and i want to output all nearest chains to a point. Is there a way i can do this with find nearest tool?

 

I have tried using distance tool to find distance from a point to all the chains and then group them by to choose the minimum distance from that point to each chain. This is easy for a small set but when i m trying to implement this on multiple locations it becomes time consuming. 

 

Eg: i want to look at nearest distance of Walgreen's, Chick-Fil-A, Starbucks to all the Motel 6 in USA.   

 

1 REPLY 1
danilang
19 - Altair
19 - Altair

Hi @msaxen2 

 

Since the Find Nearest tool doesn't have any group by capability, it can only give you the the closest object not the closest object by type.  To get this you'll you need a batch macro.  Pass the motel and chain information into 2 separate Macro inputs and the unique list of chains into the control parameter.  In the macro, filter the chains by one specific one, i.e. Starbucks and use the control parameter to modify the filter on each iteration.  Hook the motel info into the T input of the find nearest tool and the filtered chain info into the U and set the tool to return only 1.  The output of this macro will be one record for each hotel/chain combo.

 

If you can provide some sample data, I'm sure that one of us community keeners will build something to get your started.

 

Dan   

Labels