Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Recent discussions are temporarily down — we're working on it and will be back shortly.
cancel
Showing results for 
Search instead for 
Did you mean: 
JP281990
Contributor
Contributor

QGA Closest Operation - Distance and Route by Car/Truck - Not Returning Expected Results

Experts - 

I am attempting to use the Closest function via Car to calculate distances of many customer locations to a much smaller number of manufacturing locations. I am really looking for just driving miles, so that I can take into account less favorable locations in terms of highway access that distance by bird would not account for. 

I can get the Closest function to work as expected when I mark my distance type as "Bird", but when I run Closest with "Car" - the query doesn't return the proper results. I am using the same inputs in both cases. 

In the example attached, I have created a test example with just one location that I am trying to map back to 4 manufacturing locations to highlight the problem. If you run the scrip by "Bird" you will get 4 distances as expected. When running the QGA script by "Car", only 2 distances are returned - for reasons that are beyond what I can gather. 

Please see attached. 

Any ideas? 

1 Solution

Accepted Solutions
Patric_Nordstrom
Employee
Employee

I would check that start and end points are not too far from a road, that's the most common reason when closest by road is not return. Closest by bird distance always returns a value.

Thanks,

Patric 

View solution in original post

2 Replies
Patric_Nordstrom
Employee
Employee

I would check that start and end points are not too far from a road, that's the most common reason when closest by road is not return. Closest by bird distance always returns a value.

Thanks,

Patric 

Dan36
Contributor II
Contributor II

Hey Patric - bit late to the party here but I am wondering if there is anything we can do when the point is too far from a road? I am looking at some remote locations and most get results but I need to do something with the few 100 that do not get results.

I have been using the centroids of shapes then getting road distance to closest office - can I convert my centroids into the location for the nearest road or something or are there options where I can give it a bit more tolerance or anything? Would prefer to not have to manually adjust the ones that are too far off. 

Always appreciate your posts, thanks in advance.