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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Points on map with distance from an other point

Hello,

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)*

  pi()/180))))*180/pi())*60*1.1515

Please help me.

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

Kind regards,

Christophe

1 Reply
Anonymous
Not applicable
Author

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