#17 Maps distance calculation 🗺️ in Qlik Sense

Empower your Qlik maps with distance calculation 🗺️


Let's go exploring Map capabilities using only built in features in Qlik Sense ! No Geo Analytics required

In this example, purple points can represents customers and greys one are Shop. Quite handy to have a distance field for selection or Custom coloring no ?

I have many other ideas to explore with Maps, do you like and want to see more about it ? Let me know in the comment !

No magic formula but some math with acos(), sin(), cos(), pi() and Preceding Load for readability 🧙‍♂️

❓How To❓

In the table I have 4 fields : lat1 lat2 long1 and long2 for each row
Load script below witll calculate distance in kilometers between 2 points.

load *,
acos(sin(radlat1)*sin(radlat2)+cos(radlat1)*cos(radlat2)*cos(radtheta))*180/pi()*60*1.1515*1.609344 as Distance
;
load *,pi() * theta/180 as radtheta
;
LOAD *,pi()*lat1/180 as radlat1,
pi()*lat2/180 as radlat2,
long1-long2 as theta

Downlaod QVF

DQC17.gif