<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Show distance between two points in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Show-distance-between-two-points/m-p/561286#M1130448</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone know and/or anyone tried to show distance between 2 longitude and latitude points on a map in an application?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is possible, using the haversine formula and plenty of pages and calculators out there on the internet to do it. However, can this formula be written in the script somehow so when you clicked 2 points/results on the map something would highlight distance betwen them?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 11 Dec 2013 15:21:07 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-12-11T15:21:07Z</dc:date>
    <item>
      <title>Show distance between two points</title>
      <link>https://community.qlik.com/t5/QlikView/Show-distance-between-two-points/m-p/561286#M1130448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone know and/or anyone tried to show distance between 2 longitude and latitude points on a map in an application?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is possible, using the haversine formula and plenty of pages and calculators out there on the internet to do it. However, can this formula be written in the script somehow so when you clicked 2 points/results on the map something would highlight distance betwen them?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Dec 2013 15:21:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Show-distance-between-two-points/m-p/561286#M1130448</guid>
      <dc:creator />
      <dc:date>2013-12-11T15:21:07Z</dc:date>
    </item>
    <item>
      <title>Re: Show distance between two points</title>
      <link>https://community.qlik.com/t5/QlikView/Show-distance-between-two-points/m-p/561287#M1130450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chris,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have calculated distances between LAT/LON pairs for a flight application I built. In this case I made the calculations in the load script as pushing this kind of thing into the front end is likely to cause poor performance. I had the following fields for each flight, which had a FlightID as my unique dimension:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Origin Latitude]&lt;/P&gt;&lt;P&gt;[Origin Longitude]&lt;/P&gt;&lt;P&gt;[Destination Longitude]&lt;/P&gt;&lt;P&gt;[Destination Latitude]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I could then calculate the distance in KM with the following, which I think is based on the Haversine Formula&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ACOS(SIN([Origin Latitude]*Pi()/180)*SIN([Destination Latitude]*Pi()/180)+COS([Origin Latitude]*Pi()/180)*COS([Destination Latitude]*Pi()/180)*COS(([Destination Longitude]*Pi()/180)-([Origin Longitude]*Pi()/180)))*6371 as [Distance (km)],&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now the challenge for you would be to work out how you enable the ability to click on two points on a map and then get the distance out of that. I suppose that depends on how your data model is put together but hopefull the above will give you some ideas to get started.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Adam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Dec 2013 15:34:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Show-distance-between-two-points/m-p/561287#M1130450</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-12-11T15:34:35Z</dc:date>
    </item>
    <item>
      <title>Re: Show distance between two points</title>
      <link>https://community.qlik.com/t5/QlikView/Show-distance-between-two-points/m-p/561288#M1130452</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Adam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers for this. I have testing this with a few results - see attached application. Can you advise where I add in formula you refer to?:&lt;/P&gt;&lt;P&gt;(ACOS(SIN([Origin Latitude]*Pi()/180)*SIN([Destination Latitude]*Pi()/180)+COS([Origin Latitude]*Pi()/180)*COS([Destination Latitude]*Pi()/180)*COS(([Destination Longitude]*Pi()/180)-([Origin Longitude]*Pi()/180)))*6371 as [Distance (km)],)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Even if I can't get it on a map if a field documented the distance it would be great.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Dec 2013 14:50:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Show-distance-between-two-points/m-p/561288#M1130452</guid>
      <dc:creator />
      <dc:date>2013-12-13T14:50:21Z</dc:date>
    </item>
    <item>
      <title>Re: Show distance between two points</title>
      <link>https://community.qlik.com/t5/QlikView/Show-distance-between-two-points/m-p/561289#M1130454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chris,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This function is used in the load script to make a field containing the distance. The data model is a little complex but the simple version related to just this function is as follows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I start with two tables. One contains the flight ID and the Origin and Destination ports. The other contains the ports and their Lat and Lon.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Next I do two joins, first to link the Lat and Lon for the origin port and name these as Origin Latitude and Origin Longitude and then I repeat this to create the Destination Latitude and Destination Longitude. This gives me:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FlightID&lt;/P&gt;&lt;P&gt;Origin Port&lt;/P&gt;&lt;P&gt;Destination Port&lt;/P&gt;&lt;P&gt;Origin Latitude&lt;/P&gt;&lt;P&gt;Origin Longitude&lt;/P&gt;&lt;P&gt;Destination Latitude&lt;/P&gt;&lt;P&gt;Destination Longitude&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once I have those fields in a table I can then do the Haversine formula above to add in the distance in KM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Dec 2013 10:00:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Show-distance-between-two-points/m-p/561289#M1130454</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-12-16T10:00:47Z</dc:date>
    </item>
    <item>
      <title>Re: Show distance between two points</title>
      <link>https://community.qlik.com/t5/QlikView/Show-distance-between-two-points/m-p/561290#M1130455</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Adam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for getting back to me. Apologies if I sound really silly here but please see attached. I've tried to follow instructions but getting stuck on how to do the 2 joins? Also when this works where do you insert the formual..on the script or on the table box in the app or on a chart?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On the attached you will see our data and what that relates to in terms of your headings above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Appreciate any further guidance...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Dec 2013 07:57:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Show-distance-between-two-points/m-p/561290#M1130455</guid>
      <dc:creator />
      <dc:date>2013-12-18T07:57:06Z</dc:date>
    </item>
    <item>
      <title>Re: Show distance between two points</title>
      <link>https://community.qlik.com/t5/QlikView/Show-distance-between-two-points/m-p/561291#M1130456</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you have everything you need in the second sheet of your spreadsheet. The only bit missing is some kind of ID number for each row, which I have created using a RecNo() function and called RowID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD RecNo() as RowID,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Address,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Destination,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Latitude,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Longitude,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dest Latitude,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dest Longitude,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.800000190734863px;"&gt;ACOS(SIN([Latitude]*Pi()/180)*SIN([Dest Latitude]*Pi()/180)+COS([Latitude]*Pi()/180)*COS([Dest Latitude]*Pi()/180)*COS(([Dest Longitude]*Pi()/180)-([Longitude]*Pi()/180)))*6371 as [Distance (km)]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, header is 1 lines, table is Sheet2);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will create a new field with the distance in it for each row of your second sheet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can test the distance formula out in your current data model by placing it as an expression in a table as written above (without the 'as [Distance (km)]' part)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE bgcolor="#ffffff" border="1" cellpadding="2" cellspacing="0" style="font-size: 9pt;"&gt;&lt;TBODY&gt;&lt;TR bgcolor="#f5f5f5"&gt;&lt;TH nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;Address&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;TH nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;Destination&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;TH nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;Distance (KM)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR bgcolor="#f5f5f5"&gt;&lt;TD bgcolor="#f5f5f5"&gt;&lt;/TD&gt;&lt;TD bgcolor="#f5f5f5"&gt;&lt;/TD&gt;&lt;TD bgcolor="#f5f5f5"&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff" nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;5 Addison Road&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Area Housing Office, 7 Wesley Street&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;7.6&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff" nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;5 Chatley Road&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Area Housing Office, 19/25 Hulton District Centre&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;6.2&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff" nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;8 Ackworth Road&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Area Housing Office, 7 Wesley Street&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;0.6&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff" nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;17 Farnham Drive&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Area Housing Office, 7 Wesley Street&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;9.0&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Area Housing Office, 7 Wesley Street&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Area Housing Office, 19/25 Hulton District Centre&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;5.7&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Dec 2013 09:24:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Show-distance-between-two-points/m-p/561291#M1130456</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-12-18T09:24:10Z</dc:date>
    </item>
    <item>
      <title>Re: Show distance between two points</title>
      <link>https://community.qlik.com/t5/QlikView/Show-distance-between-two-points/m-p/561292#M1130457</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Adam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works…amazing!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Last question is do you know the amends needed to show distance in miles?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris Fray (BA (Hons), PgDip, MA, MCIH)&lt;/P&gt;&lt;P&gt;Business Intelligence Manager&lt;/P&gt;&lt;P&gt;Business Excellence Team&lt;/P&gt;&lt;P&gt;City West Housing Trust&lt;/P&gt;&lt;P&gt;0161 605 7236&lt;/P&gt;&lt;P&gt;chris.fray@citywest.org.uk&amp;lt;mailto:chris.fray@citywest.org.uk&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Dec 2013 09:42:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Show-distance-between-two-points/m-p/561292#M1130457</guid>
      <dc:creator />
      <dc:date>2013-12-18T09:42:42Z</dc:date>
    </item>
    <item>
      <title>Re: Show distance between two points</title>
      <link>https://community.qlik.com/t5/QlikView/Show-distance-between-two-points/m-p/561293#M1130458</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; &lt;SPAN style="color: #1f497d; font-family: 'Calibri','sans-serif'; mso-bidi-font-size: 11.0pt; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-themecolor: dark2;"&gt;Hi Adam,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d; font-family: 'Calibri','sans-serif'; mso-bidi-font-size: 11.0pt; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-themecolor: dark2;"&gt;This works…amazing!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d; font-family: 'Calibri','sans-serif'; mso-bidi-font-size: 11.0pt; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-themecolor: dark2;"&gt;Last question is do you know the amends needed to show distance in&lt;BR /&gt;miles?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d; font-family: 'Calibri','sans-serif'; mso-bidi-font-size: 11.0pt; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-themecolor: dark2;"&gt;Cheers&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d; font-family: 'Calibri','sans-serif'; mso-bidi-font-size: 11.0pt; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-themecolor: dark2;"&gt;Chris&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Dec 2013 09:42:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Show-distance-between-two-points/m-p/561293#M1130458</guid>
      <dc:creator />
      <dc:date>2013-12-18T09:42:55Z</dc:date>
    </item>
    <item>
      <title>Re: Show distance between two points</title>
      <link>https://community.qlik.com/t5/QlikView/Show-distance-between-two-points/m-p/561294#M1130459</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think the 6371 is the radius if the Earth in KM. You should just be able to change that to 3959 and get your results in miles.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Glad this is sorted out, spherical geometry is nobody's friend. Please mark the answer as correct so others can find it and use it as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Adam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Dec 2013 09:52:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Show-distance-between-two-points/m-p/561294#M1130459</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-12-18T09:52:21Z</dc:date>
    </item>
    <item>
      <title>Re: Show distance between two points</title>
      <link>https://community.qlik.com/t5/QlikView/Show-distance-between-two-points/m-p/561295#M1130460</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's been a while since I've done this kind of development but I suspect there are two approaches. One would be to make a table in the load script of Origins and Destinations and the distance between them. This could either be a complete list of distances between pairs, a flag to say if it is above or below the limit (flag_is_within_5km = 1) or you could limit the load to only those under 5km. The other approach is to do this on the fly in the application but that might have quite an overhead as every selection means you would be doing a lot of calculations.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 May 2017 16:13:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Show-distance-between-two-points/m-p/561295#M1130460</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-12T16:13:06Z</dc:date>
    </item>
    <item>
      <title>Re: Show distance between two points</title>
      <link>https://community.qlik.com/t5/QlikView/Show-distance-between-two-points/m-p/2080483#M1223985</link>
      <description>&lt;P&gt;Hi All,&lt;BR /&gt;BELOW IS FOR QLIK SENSE&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Highlevel overview:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;IF you have a requirement to plot 2 areas (latitudes and longitudes) and if you want to draw circles around then within a said radius, please see the below.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;All you need, is a latitude 1, longitude 1 and latitude 2, longitute 2, with key fields in these 2 tables.&lt;/P&gt;
&lt;P&gt;Then you need to join both the tables to get them into one table for calculating the distance.&lt;/P&gt;
&lt;P&gt;Further, use the haversine formula (just copy paste) and change the fields as required and inline with you data.&lt;BR /&gt;&lt;STRONG&gt;Haversine formula:&amp;nbsp;&lt;/STRONG&gt;&lt;A href="https://community.qlik.com/t5/QlikView-App-Dev/Haversine-formula-to-find-distance-between-two-lat-long-points/td-p/234630/page/2" target="_blank" rel="noopener"&gt;https://community.qlik.com/t5/QlikView-App-Dev/Haversine-formula-to-find-distance-between-two-lat-long-points/td-p/234630/page/2&lt;/A&gt;&lt;BR /&gt;use the response with code from kevinpintoka &lt;EM&gt;(thanks to him)&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Go the GeoAnalytics and use the 'Travel Areas' option.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Script Section:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Cost Value: 10 (in my example 10 km radius)&lt;BR /&gt;Cost Field: Blank&lt;BR /&gt;Cost Unit: Kilometers (from the above input it will now be 10 KM)&lt;BR /&gt;Transportation: Bird&lt;BR /&gt;Name: No Change&amp;nbsp;&lt;SPAN&gt;( leave as it is)&lt;/SPAN&gt;&lt;BR /&gt;Type: Loaded table&lt;BR /&gt;Table Name: specify the table name that contains the distance calculated (from haversine formula) above.&lt;BR /&gt;Table Fields: Key field, Latitude1, Longitude1 (i am using latitude 1 since I want to draw circles around this geo point. If you want you can change to latitude 2, longitude 2&lt;BR /&gt;Geometry Type: Latitude and Longitude Point&lt;BR /&gt;Only load distinct: YES&lt;BR /&gt;Location ID Suffix: No change ( leave as it is)&lt;/P&gt;
&lt;P&gt;Click Next.&lt;BR /&gt;Select the travel areas in the next wizard window.&lt;BR /&gt;Insert script and reload.&lt;BR /&gt;Note that you may need to reduce the chunk size based on license limitation you have.&lt;BR /&gt;&lt;BR /&gt;If you get an error stating: "dataset is higher than maximum allowed by license", then follow the below link&lt;BR /&gt;&lt;A href="https://community.qlik.com/t5/Official-Support-Articles/GeoAnalytics-getting-error-QVX-SYNTAX-ERROR-Size-of-dataset-is/ta-p/1715348" target="_blank" rel="noopener"&gt;https://community.qlik.com/t5/&lt;STRONG&gt;Official-Support-Articles&lt;/STRONG&gt;/GeoAnalytics-getting-error-QVX-SYNTAX-ERROR-Size-of-dataset-is/ta-p/1715348&lt;/A&gt;&lt;BR /&gt;&lt;EM&gt;(another thanks to this author)&lt;/EM&gt;&lt;BR /&gt;Front End:&lt;BR /&gt;Create Geo Map&lt;BR /&gt;Add point layer -&amp;gt; add the geopoint_lat1_long1&lt;BR /&gt;Add area layer -&amp;gt; add geo_lat2_long2&lt;BR /&gt;Add density layer -&amp;gt; &lt;SPAN&gt;add the geopoint_lat1_long1&lt;/SPAN&gt;&lt;BR /&gt;tip:&amp;nbsp; under this layer -&amp;gt; properties/appearance/radius (here you can specify in meters)/scale (turn default off and switch custom on/change the weight factor to 45) -&amp;gt; this will change the heatmap and rather appear as circles.&lt;BR /&gt;Add line layer -&amp;gt; add the distance_km -&amp;gt; under From, To, width/add lat1_long1 AND lat2_long2 like a from an to line. under properties/appearance/change the line width/ change arrow style and arrow curviness. addtionally you can add the label under label section and just add the distance_km. this will show the actual distance on the gep graph.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Hope that helped someone.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Cheers&lt;/P&gt;
&lt;P&gt;Kind Regards,&lt;/P&gt;
&lt;P&gt;Robinson&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jun 2023 08:52:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Show-distance-between-two-points/m-p/2080483#M1223985</guid>
      <dc:creator>robyn369</dc:creator>
      <dc:date>2023-06-06T08:52:23Z</dc:date>
    </item>
  </channel>
</rss>

