<?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 Re: How do I use latitude and longitude values to find near by records in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-do-I-use-latitude-and-longitude-values-to-find-near-by/m-p/457277#M489092</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Fantastic!&amp;nbsp; thanks for your help on this topic!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 27 Nov 2012 00:57:37 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-11-27T00:57:37Z</dc:date>
    <item>
      <title>How do I use latitude and longitude values to find near by records</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-use-latitude-and-longitude-values-to-find-near-by/m-p/457271#M489086</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi community,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have attached a sample QVW file that I need some direction on.&amp;nbsp; In the QVW file, I've loaded some sample retail account information for the San Francisco area.&amp;nbsp; What I would like to do is be able to search and select one (or more) stores/accounts and then have another chart (straight&amp;nbsp; table) display all the accounts that are within X distance from the selections.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anybody know how to do this?&amp;nbsp; I have the latitude and longitude information for each account as part of the sample data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="25442" class="jive-image-thumbnail jive-image" height="542" onclick="" alt="Location question.jpg" src="/legacyfs/online/25442_Location question.jpg" width="881" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Nov 2012 16:29:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-use-latitude-and-longitude-values-to-find-near-by/m-p/457271#M489086</guid>
      <dc:creator />
      <dc:date>2012-11-21T16:29:45Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use latitude and longitude values to find near by records</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-use-latitude-and-longitude-values-to-find-near-by/m-p/457272#M489087</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please check John's excellent post here:&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" class="loading" href="https://community.qlik.com/message/137084#137084" title="http://community.qlik.com/message/137084#137084"&gt;http://community.qlik.com/message/137084#137084&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Nov 2012 16:43:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-use-latitude-and-longitude-values-to-find-near-by/m-p/457272#M489087</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-11-21T16:43:42Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use latitude and longitude values to find near by records</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-use-latitude-and-longitude-values-to-find-near-by/m-p/457273#M489088</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi swuehl,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;John's post is really great but there is an issue with it that I won't be able to resolve using his solution.&amp;nbsp; John's example uses 5 points (locations).&amp;nbsp; My store/account database has over 1M records.&amp;nbsp; John's solution is precalculating all the possible combinations.&amp;nbsp; This won't be possible if you have large number of records like I do.&amp;nbsp; I have attached an example of just a small set of accounts (city of San Mateo in California).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my example (using John's haversine solution), whenever you select an account, the second chart object will return all the accounts that are within 1 km of the selection.&amp;nbsp; this is achieve by pre-calculating all the combinations for each account relative to one another.&amp;nbsp; Not a viable solution if you are dealing with hundreds of thousands of accounts.&amp;nbsp; Is there a way to calculate on the fly based on the users account selection?&amp;nbsp; Or load data on the fly so that we don't have to do precalculations?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Nov 2012 01:01:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-use-latitude-and-longitude-values-to-find-near-by/m-p/457273#M489088</guid>
      <dc:creator />
      <dc:date>2012-11-22T01:01:39Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use latitude and longitude values to find near by records</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-use-latitude-and-longitude-values-to-find-near-by/m-p/457274#M489089</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;as John mentioned, you should be able to do the same in the frontend, calculating the distances on the fly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've done this quick&amp;amp;dirty in attached sample. There's probably plenty of room for improvements, f.e. I would precalculate as many stuff as possibe (e.g. the degree to radian calculations) in the script or as global variable (if depending on the vLat1 and vLon1).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Nov 2012 10:29:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-use-latitude-and-longitude-values-to-find-near-by/m-p/457274#M489089</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-11-22T10:29:44Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use latitude and longitude values to find near by records</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-use-latitude-and-longitude-values-to-find-near-by/m-p/457275#M489090</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the reply swuehl. I got another issue related to the result set of the nearby retail stores.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way where I can filter the result set of the chart titled "Stores nearby" using the Channel listbox?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Right now the Channel listbox is tied to the "Selected store" chart object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to be able to select, for example "Supermarket" from the channel listbox and have it only return the supermarket accounts that are nearby.&amp;nbsp; I have attached a sample qvw.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Nov 2012 22:20:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-use-latitude-and-longitude-values-to-find-near-by/m-p/457275#M489090</guid>
      <dc:creator />
      <dc:date>2012-11-26T22:20:03Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use latitude and longitude values to find near by records</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-use-latitude-and-longitude-values-to-find-near-by/m-p/457276#M489091</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe like attached (using an alternate state AS1 to filter the results)?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Nov 2012 22:41:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-use-latitude-and-longitude-values-to-find-near-by/m-p/457276#M489091</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-11-26T22:41:04Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use latitude and longitude values to find near by records</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-use-latitude-and-longitude-values-to-find-near-by/m-p/457277#M489092</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Fantastic!&amp;nbsp; thanks for your help on this topic!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Nov 2012 00:57:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-use-latitude-and-longitude-values-to-find-near-by/m-p/457277#M489092</guid>
      <dc:creator />
      <dc:date>2012-11-27T00:57:37Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use latitude and longitude values to find near by records</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-use-latitude-and-longitude-values-to-find-near-by/m-p/457278#M489093</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi suehl;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have taken this implementation one step further by adding a Google Map extension which maps the street locations of the nearby stores that are selected however&amp;nbsp; I did notice that when you make the nearby stores&amp;nbsp; selection ,&amp;nbsp; the original store location upon which the distance formula is based is not included . Is there way to concatenate the original&amp;nbsp; reference location to the resulting nearby stores locations so it can then also be placed as marker on the map for reference.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 Jan 2013 15:17:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-use-latitude-and-longitude-values-to-find-near-by/m-p/457278#M489093</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-01-13T15:17:42Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use latitude and longitude values to find near by records</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-use-latitude-and-longitude-values-to-find-near-by/m-p/457279#M489094</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; I managed to solve&amp;nbsp; by changing the distance formula as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if($(vCalc) &amp;gt;=0 and $(vCalc) &amp;lt;= 1,$(vCalc))&amp;nbsp; .This allows the originating location&lt;/P&gt;&lt;P&gt;&amp;nbsp; which has to be zero to show up&amp;nbsp; with all other values in the range specified&amp;nbsp; . Note&lt;/P&gt;&lt;P&gt;&amp;nbsp; leaving out&amp;nbsp; an alternate value in the if statement&amp;nbsp; produces a null by default&amp;nbsp; which &lt;/P&gt;&lt;P&gt;&amp;nbsp; prevents it from showing up in the straight table whic is what I needed it to do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Thanks for Original Formula et al&amp;nbsp; saved me a lot of time &lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Mike &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jan 2013 00:50:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-use-latitude-and-longitude-values-to-find-near-by/m-p/457279#M489094</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-01-14T00:50:36Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use latitude and longitude values to find near by records</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-use-latitude-and-longitude-values-to-find-near-by/m-p/457280#M489095</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great job, thanx!&lt;/P&gt;&lt;P&gt;Corrado&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 20 Jan 2013 21:18:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-use-latitude-and-longitude-values-to-find-near-by/m-p/457280#M489095</guid>
      <dc:creator />
      <dc:date>2013-01-20T21:18:18Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use latitude and longitude values to find near by records</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-use-latitude-and-longitude-values-to-find-near-by/m-p/457281#M489096</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi mpejskar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've been trying to do exactly this for my build.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At the moment I have a Google Maps extension on my screen which pin points any company that is selected onto the map.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also have a table which shows the surrounding companies of the selected company.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I am trying to achieve is to also have the surrounding companies show up on the map.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would you be able to provide any insight into how you went in achieving this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it a matter of altering the Google maps expressions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help on this matter will be greatly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tony.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Sep 2013 04:26:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-use-latitude-and-longitude-values-to-find-near-by/m-p/457281#M489096</guid>
      <dc:creator />
      <dc:date>2013-09-30T04:26:12Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use latitude and longitude values to find near by records</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-use-latitude-and-longitude-values-to-find-near-by/m-p/457282#M489097</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mike, May I know how did you capture the latitude and logitude information for each account here?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Feb 2014 05:43:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-use-latitude-and-longitude-values-to-find-near-by/m-p/457282#M489097</guid>
      <dc:creator />
      <dc:date>2014-02-12T05:43:43Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use latitude and longitude values to find near by records</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-use-latitude-and-longitude-values-to-find-near-by/m-p/457283#M489098</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Tony,&lt;/P&gt;&lt;P&gt;I think I'm trying to do just what you do. Would you mind uploading your qvw document or send it to me? I'd be thankful.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Netanel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Feb 2014 13:03:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-use-latitude-and-longitude-values-to-find-near-by/m-p/457283#M489098</guid>
      <dc:creator />
      <dc:date>2014-02-25T13:03:50Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use latitude and longitude values to find near by records</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-use-latitude-and-longitude-values-to-find-near-by/m-p/457284#M489099</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Swuehl,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to implement your logic in script level, but in my case I have lack of data if I do outer join it's going to hang stage and even computer takes 100% memory and system is going to hang.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my scenario I have to give radius dynamically for pickup city &amp;amp; Delivery city in the two separate input boxs. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;kindly suggest me some alternative solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ashok.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Apr 2016 08:19:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-use-latitude-and-longitude-values-to-find-near-by/m-p/457284#M489099</guid>
      <dc:creator />
      <dc:date>2016-04-21T08:19:52Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use latitude and longitude values to find near by records</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-use-latitude-and-longitude-values-to-find-near-by/m-p/457285#M489100</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You would need to give some more details about your setting to understand the difference between yours and the one discussed here.&lt;/P&gt;&lt;P&gt;And why do you use two input boxes (two radii) for the two cities? Are you trying to find other cities that are located in the intersecting area?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Apr 2016 08:44:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-use-latitude-and-longitude-values-to-find-near-by/m-p/457285#M489100</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-04-21T08:44:46Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use latitude and longitude values to find near by records</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-use-latitude-and-longitude-values-to-find-near-by/m-p/457286#M489101</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;I have latitude and longitude for both pick up city and delivery city, and the scenario is I need to calculate radius for both pickup and delivery &amp;amp; both radius should change dynamically.. so how shall I proceed wid this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Apr 2016 08:57:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-use-latitude-and-longitude-values-to-find-near-by/m-p/457286#M489101</guid>
      <dc:creator />
      <dc:date>2016-04-21T08:57:14Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use latitude and longitude values to find near by records</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-use-latitude-and-longitude-values-to-find-near-by/m-p/457287#M489102</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, I don't understand how you want to calculcate the radius.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would suggest that you create a new thread, and post as much information as possible:&lt;/P&gt;&lt;P&gt;Your current data model, some sample lines of data, your current chart and your expected result for the sample data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Apr 2016 09:03:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-use-latitude-and-longitude-values-to-find-near-by/m-p/457287#M489102</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-04-21T09:03:03Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use latitude and longitude values to find near by records</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-use-latitude-and-longitude-values-to-find-near-by/m-p/457288#M489103</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Swuehl,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As u provided formula for km is below one&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;atan2(sqrt(sqr(sin((only({1}Latitude)*PI()/180-vLat1)/2))+cos(vLat1)*cos(only({1}Latitude)*PI()/180)*sqr(sin((only({1}Longitude)*PI()/180-vLon1)/2)))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,sqrt(1-(sqr(sin((only({1}Latitude)*PI()/180-vLat1)/2))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; +cos(vLat1)*cos(only({1}Latitude)*PI()/180)*sqr(sin((only({1}Longitude)*PI()/180-vLon1)/2)))))*2*6371&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My requirement is user will enter miles instead of kilometers,so what should i do change in above formula.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ashok. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Apr 2016 10:37:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-use-latitude-and-longitude-values-to-find-near-by/m-p/457288#M489103</guid>
      <dc:creator />
      <dc:date>2016-04-21T10:37:05Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use latitude and longitude values to find near by records</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-use-latitude-and-longitude-values-to-find-near-by/m-p/457289#M489104</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stefan,&lt;/P&gt;&lt;P&gt;I have data a below, i want to calculate the distance using latitude and longitude, please help me out.&lt;/P&gt;&lt;P&gt;I tried the way you did but by distance in expression is showing zero&lt;/P&gt;&lt;P&gt;Please help me out wite below link&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/message/1166590"&gt;Calculating distance using Latitude and Longitude&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 399px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="20" style="border: 0px black; border-image: none;" width="64"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;employeid&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 0px black; border-image: none;" width="64"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;name&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 0px black; border-image: none;" width="79"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;state&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 0px black; border-image: none;" width="64"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;District&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 0px black; border-image: none;" width="64"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;Latitude&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 0px black; border-image: none;" width="64"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;Longitude&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20" style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;john&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;asd&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;newyork&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;22.37&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;114.12&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20" style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;2&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;ricky&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;adsd&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;carolina&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;22.36&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;114.13&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20" style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;3&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;patrik&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;affdf&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;WDC&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;22.32&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;114.21&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20" style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;4&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;micheal&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;agffsf&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;London&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;22.32&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;114.16&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20" style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;5&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;harry&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;addsdsdfs&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;Hong Kong&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;22.28&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;114.18&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 27 Nov 2016 15:16:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-use-latitude-and-longitude-values-to-find-near-by/m-p/457289#M489104</guid>
      <dc:creator />
      <dc:date>2016-11-27T15:16:12Z</dc:date>
    </item>
  </channel>
</rss>

