Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Not applicable

Points on map with distance from an other point


Sorry for my bad english .

I have data of customers with latitude and longitude in a table.

I have also a list of city in a table with latitude and longitude (alternate state named "AS1").

I wish see on a map the list of customers near a city (in the alternate state). With the distance adjustable with a slider.

Example : I want to see all custumers 30 miles from New York.

I have this function to calculate distance from 2 point :

=((acos(sin((only({AS1}Latitude)*pi()/180)) *

  sin((Latitude*pi()/180))+cos((only({AS1}Latitude)*pi()/180)) *

  cos((Latitude*pi()/180)) * cos(((only({AS1}Longitude)- Longitude)*


Please help me.

PS: I have personal edition and i can't open other .qvw.

Kind regards,


1 Reply
Contributor III

Re: Points on map with distance from an other point

Hi Christophe,

do you have a question in general how to build a map in QlikView or how to show only customers closest to a City of choice? So user will select a City in listbox and then you want to see on a map that city and customers within 30 miles?

Are going to use a scatter chart with background image technique for your map or any extensions? I would do a scatter chart and put x and y expressions with outer IF statement like that:

if( distance>30, customer_lat)

if( distance>30, customer_lon)

where distance would be your formula above. so the idea is to show a point on scatter chart, only if that customer lat/lon within 30 miles of a selected city

Community Browser