<?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>bredn Tracker</title>
    <link>https://community.fabric.microsoft.com/t5/s/yrjkf47658/tracker</link>
    <description>bredn Tracker</description>
    <pubDate>Thu, 17 Sep 2026 15:18:10 GMT</pubDate>
    <dc:date>2026-09-17T15:18:10Z</dc:date>
    <item>
      <title>Re: Distance calculation with list of coordinates</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Distance-calculation-with-list-of-coordinates/m-p/299054#M132017</link>
      <description>&lt;P&gt;EDIT and Update:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Like I mentioned in the earlier update, I added a copy of the original lat/on columns. Today I tried adding some logic to this, so that it would skip the first entry, thus creating a synthetic start/stop point. The code for this is below (there are several ways of doing this, but this is the approach I went with).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;LongitudeLookup = LOOKUPVALUE('Tracker Status Variables'[longitude];'Tracker Status Variables'[device_id];'Tracker Status Variables'[device_id];'Tracker Status Variables'[Rank];'Tracker Status Variables'[Rank]+1)&lt;/PRE&gt;&lt;P&gt;This uses the previously created rank variable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The result of this is that I get accurate distances&amp;nbsp;&lt;STRONG&gt;per day&lt;/STRONG&gt;. However, this only works for the previous day. For data being transmitted now, the latest entrypoint gets treated as 0, thus the distance is reported to being the radius of the earth (i.e some 6300 KM).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I choosing to edit this post further in case someone else has a similar problem, hopefully this can help in some way.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Nov 2017 15:29:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Distance-calculation-with-list-of-coordinates/m-p/299054#M132017</guid>
      <dc:creator>bredn</dc:creator>
      <dc:date>2017-11-08T15:29:02Z</dc:date>
    </item>
    <item>
      <title>Re: Distance calculation with list of coordinates</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Distance-calculation-with-list-of-coordinates/m-p/298276#M131620</link>
      <description>&lt;P&gt;EDIT and update:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;I have created a table that ranks each incoming event mapped to its vechicle, so that I can get all the events ordered by device. The table and code for creating it looks like this:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Rank = RANKX (
    FILTER (
        'Tracker Status Variables';
        'Tracker Status Variables'[device_id] = EARLIER ( 'Tracker Status Variables'[device_id] )
    );
    RANKX (
        FILTER (
            'Tracker Status Variables';
            'Tracker Status Variables'[device_id] = EARLIER ( 'Tracker Status Variables'[device_id] )
        );
        'Tracker Status Variables'[eventenqueuedutctime];
        ;
        DESC
    )
        + DIVIDE (
            RANKX (
                FILTER (
                    'Tracker Status Variables';
                    'Tracker Status Variables'[device_id] = EARLIER ( 'Tracker Status Variables'[device_id] )
                );
                'Tracker Status Variables'[eventenqueuedutctime];
                ;
                ASC
            );
            (
                COUNTROWS (
                    FILTER (
                        'Tracker Status Variables';
                        'Tracker Status Variables'[device_id] = EARLIER ( 'Tracker Status Variables'[device_id] )
                    )
                )
                    + 1
            )
        )
)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My current distance calculation formula looks like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;VINCENTY = ACOS(COS(RADIANS(90-'Tracker Status Variables'[latitude]))&lt;BR /&gt;*COS(RADIANS(90-'Tracker Status Variables'[lat2]))+&lt;BR /&gt;SIN(RADIANS(90-'Tracker Status Variables'[latitude]))*&lt;BR /&gt;SIN(RADIANS(90-'Tracker Status Variables'[lat2]))*&lt;BR /&gt;COS(RADIANS('Tracker Status Variables'[lon2]-'Tracker Status Variables'[longitude])))*6371&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;lat2 and lon2 represent copies of the original latitude/longitude data, with the first record removed. The hope was that this would allow me to create a distance calculation, and order it by ID. Sadly this is not working. Do any of you know what i could do here? Feel like im at my wits end, any help would be greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2017 16:13:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Distance-calculation-with-list-of-coordinates/m-p/298276#M131620</guid>
      <dc:creator>bredn</dc:creator>
      <dc:date>2017-11-07T16:13:56Z</dc:date>
    </item>
    <item>
      <title>Re: Distance calculation with list of coordinates</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Distance-calculation-with-list-of-coordinates/m-p/296937#M131017</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="6967" data-lia-user-login="v-caliao-msft" class="lia-mention lia-mention-user"&gt;v-caliao-msft&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the reply,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When returning the formula without ACOS I get a value returned, so its not a datatype issue.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you know how I could get this to work for each vehicle and their total distance? I am now getting the same total value for all vehicles, eventhoug they have not driven the same distance.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Nov 2017 08:32:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Distance-calculation-with-list-of-coordinates/m-p/296937#M131017</guid>
      <dc:creator>bredn</dc:creator>
      <dc:date>2017-11-06T08:32:09Z</dc:date>
    </item>
    <item>
      <title>Distance calculation with list of coordinates</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Distance-calculation-with-list-of-coordinates/m-p/295973#M130548</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I currently have a map of several vehicles and their routes throughout the day. The map is plotted by using these coordinates and filtering on the car ID. I need to mention that I do have a timestamp of when the coordinates were sent. The coordinates come at random times and there is no ordering of events by car ID (meaning the list of coordinates contain all IDs at different times).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I want to calculate the total distance the car has driven during the day, and visualise this. I have tried multiple formulas and guides I found on this forum, but with no luck. Do any of you know how to do this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-------&lt;/P&gt;&lt;P&gt;Edit:&lt;/P&gt;&lt;P&gt;I duplicated my lon/lat columns, and artificially removed the first entry, thus to create a simulated starting/end-point. After having done this i tried the following formula:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Distanse =&lt;BR /&gt;VAR R = 6371&amp;nbsp;&lt;BR /&gt;VAR Pi = 3,141592&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;VAR p1='Spørring1'[latitude]*Pi/180&lt;BR /&gt;VAR q1='Spørring1'[longitude]*Pi/180&lt;BR /&gt;VAR p2='Spørring1'[lat2]*Pi/180&lt;BR /&gt;VAR q2='Spørring1'[lon2]*Pi/180&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;VAR DeltaP = ABS(p1-p2)&amp;nbsp;&lt;BR /&gt;VAR DeltaQ = ABS(q1-q2)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;RETURN&lt;BR /&gt;IF(&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;p1 = BLANK()||p2=BLANK()||q1=BLANK()||q2=BLANK()&lt;BR /&gt;;BLANK()&lt;BR /&gt;;ACOS(SIN(p1)*SIN(p2)+COS(p1)*COS(p2)*COS(DeltaQ))*R&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When trying to execute this formula I get the following error message: An argument of function ACOS either has the wrong datatype, or is too large or small.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;All the columns have the same datatype, and I dont see why they would be too large or small, any idea why this occurs?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2017 14:16:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Distance-calculation-with-list-of-coordinates/m-p/295973#M130548</guid>
      <dc:creator>bredn</dc:creator>
      <dc:date>2017-11-03T14:16:16Z</dc:date>
    </item>
  </channel>
</rss>

