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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Calculating real distance between locations using Longitude and latitude

I have an excel file with longitudes and latitudes, i would like to know if it's possible to get a real representation of the distances between the locations taking into account streets as in Google map. So far i found a way to find the distances but i am wondering if there's a possibility to get distances to be realistic taking into account streets and not just a simple A to B distance. 

1 Solution

Accepted Solutions
micheledenardi
Specialist II
Specialist II

I think the only solution to calculate the real distance between two points is by using Qlik GeoAnalytics.

Routes and travel areas in IdevioMaps

Michele De Nardi
If a post helps to resolve your issue, please accept it as a Solution.

View solution in original post

2 Replies
micheledenardi
Specialist II
Specialist II

I think the only solution to calculate the real distance between two points is by using Qlik GeoAnalytics.

Routes and travel areas in IdevioMaps

Michele De Nardi
If a post helps to resolve your issue, please accept it as a Solution.
richard_pearce6
Partner - Specialist
Partner - Specialist

if you have two lat longs this will convert to km:

DataShort:
Load *

     ,6371 * (2 *
           Atan2( 
                   sqrt((sin(((lat2-lat1) * Pi() /180) /2) * sin(((lat2-lat1) * Pi() /180) /2) +sin(((lon2-lon1) * Pi() /180) /2) * sin(((lon2-lon1) * Pi() /180) /2) * cos(((lat1) * Pi() /180) ) * cos(((lat2) * Pi() /180) )))
               ,  sqrt(1-(sin(((lat2-lat1) * Pi() /180) /2) * sin(((lat2-lat1) * Pi() /180) /2) +sin(((lon2-lon1) * Pi() /180) /2) * sin(((lon2-lon1) * Pi() /180) /2) * cos(((lat1) * Pi() /180) ) * cos(((lat2) * Pi() /180) )))

            ))  AS Distance
Resident Data;