Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
rsimpson318
Frequent Visitor

Calculate Route Stop Based on Distance/Duration

Hello,

 

I'm trying to figure out a DAX or calculated column to determine a route stop based on the duration and distance traveled (or not). I have a table with a list of points and the time each point was received. I was able to calculate the approximate distance between each point and the duration.

 

I would like to be able to determine when the vehicle is stationary and when it moves again. It could be stationary several times throughout the day and the duration can flucuate. Below is an example data set. Any help would be greatly appreciated.

 

OperatorLatitudeLongitudeDate/TimeTimeReceivedDistanceDuration
Driver 1Lat1Long14/29/2022 7:22:46 AM4/29/2022 7:22:47 AM0.000:00:20
Driver 2Lat1Long14/29/2022 7:23:06 AM4/29/2022 7:23:07 AM0.000:00:20
Driver 3Lat1Long14/29/2022 7:23:26 AM4/29/2022 7:23:27 AM0.000:00:20
Driver 4Lat1Long14/29/2022 7:23:46 AM4/29/2022 7:23:47 AM0.000:00:20
Driver 5Lat1Long14/29/2022 7:24:06 AM4/29/2022 7:24:07 AM0.000:00:20
Driver 6Lat1Long14/29/2022 7:24:26 AM4/29/2022 7:24:27 AM0.000:00:20
Driver 7Lat1Long14/29/2022 7:24:46 AM4/29/2022 7:24:47 AM0.000:00:20
Driver 8Lat1Long14/29/2022 7:25:06 AM4/29/2022 7:25:07 AM0.000:00:20
Driver 9Lat1Long14/29/2022 7:25:26 AM4/29/2022 7:25:27 AM0.000:00:20
Driver 10Lat1Long14/29/2022 7:25:46 AM4/29/2022 7:25:47 AM0.000:00:20
Driver 11Lat2Long24/29/2022 7:26:06 AM4/29/2022 7:26:07 AM0.010:00:21
Driver 12Lat3Long34/29/2022 7:26:27 AM4/29/2022 7:26:27 AM0.060:00:20
Driver 13Lat4Long44/29/2022 7:26:47 AM4/29/2022 7:26:47 AM0.050:00:19
Driver 14Lat5Long54/29/2022 7:27:06 AM4/29/2022 7:27:07 AM0.000:00:20
Driver 15Lat6Long64/29/2022 7:27:26 AM4/29/2022 7:27:27 AM0.000:00:21
Driver 16Lat7Long74/29/2022 7:27:47 AM4/29/2022 7:27:47 AM0.140:00:20
Driver 17Lat8Long84/29/2022 7:28:07 AM4/29/2022 7:28:07 AM0.180:00:20
Driver 18Lat9Long94/29/2022 7:28:27 AM4/29/2022 7:28:27 AM0.170:00:20
Driver 19Lat10Long104/29/2022 7:28:47 AM4/29/2022 7:28:47 AM0.020:00:20
Driver 20Lat11Long114/29/2022 7:29:07 AM4/29/2022 7:29:07 AM0.020:00:19
Driver 21Lat12Long124/29/2022 7:29:26 AM4/29/2022 7:29:27 AM0.000:00:20
Driver 22Lat13Long134/29/2022 7:29:46 AM4/29/2022 7:29:47 AM0.040:00:20
Driver 23Lat14Long144/29/2022 7:30:06 AM4/29/2022 7:30:07 AM0.350:00:20
Driver 24Lat15Long154/29/2022 7:30:26 AM4/29/2022 7:30:27 AM0.370:00:20
Driver 25Lat16Long164/29/2022 7:30:46 AM4/29/2022 7:30:47 AM0.210:00:21
Driver 26Lat17Long174/29/2022 7:31:07 AM4/29/2022 7:31:07 AM0.000:00:19
Driver 27Lat18Long184/29/2022 7:31:26 AM4/29/2022 7:31:27 AM0.000:00:20
Driver 28Lat19Long194/29/2022 7:31:46 AM4/29/2022 7:31:47 AM0.000:00:20
Driver 29Lat20Long204/29/2022 7:32:06 AM4/29/2022 7:32:07 AM0.010:00:21
Driver 30Lat21Long214/29/2022 7:32:27 AM4/29/2022 7:32:27 AM0.070:00:20
Driver 31Lat22Long224/29/2022 7:32:47 AM4/29/2022 7:32:47 AM0.140:00:20
Driver 32Lat23Long234/29/2022 7:33:07 AM4/29/2022 7:33:07 AM0.170:00:20
Driver 33Lat24Long244/29/2022 7:33:27 AM4/29/2022 7:33:27 AM0.220:00:20
Driver 34Lat25Long254/29/2022 7:33:47 AM4/29/2022 7:33:47 AM0.190:00:20
Driver 35Lat26Long264/29/2022 7:34:07 AM4/29/2022 7:34:07 AM0.150:00:20
Driver 36Lat27Long274/29/2022 7:34:27 AM4/29/2022 7:34:27 AM0.090:00:20
Driver 37Lat28Long284/29/2022 7:34:47 AM4/29/2022 7:34:47 AM0.010:00:20
Driver 38Lat29Long294/29/2022 7:35:07 AM4/29/2022 7:35:07 AM0.160:00:20
Driver 39Lat30Long304/29/2022 7:35:27 AM4/29/2022 7:35:27 AM0.080:00:20
Driver 40Lat31Long314/29/2022 7:35:47 AM4/29/2022 7:35:47 AM0.160:00:20
Driver 41Lat32Long324/29/2022 7:36:07 AM4/29/2022 7:36:07 AM0.170:00:19
Driver 42Lat33Long334/29/2022 7:36:26 AM4/29/2022 7:36:27 AM0.050:00:21
Driver 43Lat34Long344/29/2022 7:36:47 AM4/29/2022 7:36:47 AM0.010:00:20
Driver 44Lat35Long354/29/2022 7:37:07 AM4/29/2022 7:37:07 AM0.000:00:20
Driver 45Lat35Long354/29/2022 7:37:27 AM4/29/2022 7:37:27 AM0.000:00:19
Driver 46Lat35Long354/29/2022 7:37:46 AM4/29/2022 7:37:47 AM0.000:00:21
Driver 47Lat35Long354/29/2022 7:38:07 AM4/29/2022 7:38:07 AM0.000:00:20
Driver 48Lat35Long354/29/2022 7:38:27 AM4/29/2022 7:38:27 AM0.000:00:20
Driver 49Lat35Long354/29/2022 7:38:47 AM4/29/2022 7:38:47 AM0.000:00:19
Driver 50Lat35Long354/29/2022 7:39:06 AM4/29/2022 7:39:07 AM0.000:00:21
Driver 51Lat35Long354/29/2022 7:39:27 AM4/29/2022 7:39:27 AM0.000:00:20
Driver 52Lat35Long354/29/2022 7:39:47 AM4/29/2022 7:39:47 AM0.000:00:20
Driver 53Lat35Long354/29/2022 7:40:07 AM4/29/2022 7:40:07 AM0.000:00:20
Driver 54Lat35Long354/29/2022 7:40:27 AM4/29/2022 7:40:27 AM0.000:00:19
Driver 55Lat35Long354/29/2022 7:40:46 AM4/29/2022 7:40:47 AM0.000:00:20
Driver 56Lat35Long354/29/2022 7:41:06 AM4/29/2022 7:41:07 AM0.000:00:21
Driver 57Lat35Long354/29/2022 7:41:27 AM4/29/2022 7:41:27 AM0.000:00:20
Driver 58Lat35Long354/29/2022 7:41:47 AM4/29/2022 7:41:47 AM0.000:00:19
Driver 59Lat35Long354/29/2022 7:42:06 AM4/29/2022 7:42:07 AM0.000:00:21
Driver 60Lat35Long354/29/2022 7:42:27 AM4/29/2022 7:42:27 AM0.000:00:20
Driver 61Lat35Long354/29/2022 7:42:47 AM4/29/2022 7:42:47 AM0.000:00:19
Driver 62Lat35Long354/29/2022 7:43:06 AM4/29/2022 7:43:07 AM0.000:00:21
Driver 63Lat35Long354/29/2022 7:43:27 AM4/29/2022 7:43:27 AM0.000:00:20
Driver 64Lat35Long354/29/2022 7:43:47 AM4/29/2022 7:43:47 AM0.000:00:19
Driver 65Lat35Long354/29/2022 7:44:06 AM4/29/2022 7:44:07 AM0.000:00:21
Driver 66Lat35Long354/29/2022 7:44:27 AM4/29/2022 7:44:27 AM0.000:00:20
Driver 67Lat35Long354/29/2022 7:44:47 AM4/29/2022 7:44:47 AM0.000:00:20
Driver 68Lat35Long354/29/2022 7:45:07 AM4/29/2022 7:45:07 AM0.000:00:20
Driver 69Lat35Long354/29/2022 7:45:27 AM4/29/2022 7:45:27 AM0.000:00:20
Driver 70Lat35Long354/29/2022 7:45:47 AM4/29/2022 7:45:47 AM0.000:00:20
Driver 71Lat35Long354/29/2022 7:46:07 AM4/29/2022 7:46:07 AM0.000:00:20
Driver 72Lat35Long354/29/2022 7:46:27 AM4/29/2022 7:46:27 AM0.000:00:20
Driver 73Lat35Long354/29/2022 7:46:47 AM4/29/2022 7:46:47 AM0.000:00:19
Driver 74Lat35Long354/29/2022 7:47:06 AM4/29/2022 7:47:07 AM0.000:00:20
1 ACCEPTED SOLUTION

@rsimpson318 
Hello agian
I had some free time to do work on it. Here is a sample file folr your reference https://we.tl/t-WjszOERm4s
My proposed solution involves adding calculated columns:

Start Time = 
VAR CurrentDistance =
    Routes[Distance]
VAR LocationTable =
    CALCULATETABLE ( Routes, ALLEXCEPT ( Routes, Routes[Latitude], Routes[Longitude] ) )
RETURN
IF ( 
    CurrentDistance = 0 && COUNTROWS ( LocationTable ) > 1,
    MINX ( 
        LocationTable,
        Routes[Date/Time] 
    )
)
End Time = 
VAR CurrentDistance =
    Routes[Distance]
VAR LocationTable =
    CALCULATETABLE ( Routes, ALLEXCEPT ( Routes, Routes[Latitude], Routes[Longitude] ) )
RETURN
IF ( 
    CurrentDistance = 0 && COUNTROWS ( LocationTable ) > 1,
    MAXX ( 
        LocationTable,
        Routes[Date/Time] 
    )
)
Stop = 
VAR StopNumber =
    RANKX ( FILTER ( Routes, NOT ISBLANK ( Routes[Start Time] ) ), Routes[Start Time],, ASC, Dense )
RETURN
    IF ( 
        NOT ISBLANK ( Routes[Start Time] ),
        "Stop - " & StopNumber
    )

Then the measure would be

Stop Duration = 
VAR Duration =  
    DATEDIFF ( MAX ( Routes[Start Time] ), MAX ( Routes[End Time] ), SECOND )
RETURN
    QUOTIENT ( Duration, 60 ) & "Min and " & MOD ( Duration, 60 ) & " Sec"

One last step would be to filter the table in order to remove the blank row
1.png
The report looks like this
2.png
I hope this satisfies your requirement.

View solution in original post

14 REPLIES 14
tamerj1
Super User
Super User

Hi @rsimpson318 
You did not reply to my question. Not sure if you are still interested in the solution. Anyway, please refer to the sample file with the updated solution https://we.tl/t-so64yQQdvX

I started with grouping latitude and longitude in one column for the ease of calculation

 

Location = Routes[Latitude] & " : " & Routes[Longitude]

 

As the location keeps changing despite the vehicle is considered not moving, then the location need to be updated to accommodate with our our moving/stopping criteria 

 

Adjusted Location = 
IF ( 
    Routes[Distance] <= 0.06,
    VAR PreviousTable = FILTER ( Routes, Routes[Date/Time] < EARLIER ( Routes[Date/Time] ) )
    VAR PreviousStopTable = FILTER ( PreviousTable, Routes[Distance] <= 0.06 )
    VAR PreviousMoveTable = FILTER ( PreviousTable, Routes[Distance] > 0.06 )
    VAR EarliestStopTime = MINX ( PreviousStopTable, Routes[Date/Time] )
    VAR EarliestStopLocation = MINX ( FILTER ( PreviousStopTable, Routes[Date/Time] = EarliestStopTime ), Routes[Location] )
    VAR EarlierStopTime = MAXX ( PreviousStopTable, Routes[Date/Time] )
    VAR EarlierStopLocation = MAXX ( FILTER ( PreviousStopTable, Routes[Date/Time] = EarlierStopTime ), Routes[Location] )
    VAR EarlierMoveTime = MAXX ( PreviousMoveTable, Routes[Date/Time] )
    VAR CurrentStopTime = MAXX ( FILTER ( PreviousMoveTable, Routes[Date/Time] < EarlierMoveTime ), Routes[Date/Time] )
    VAR CurrentStopLocation = MAXX ( FILTER ( PreviousMoveTable, Routes[Date/Time] = CurrentStopTime ), Routes[Location] )
    RETURN
        COALESCE ( IF ( ISBLANK ( EarlierMoveTime ), EarliestStopLocation, CurrentStopLocation ), Routes[Location] )
)

 

Start and end times for each stop are calculated

 

Start Time = 
VAR CurrentDistance =
    Routes[Distance]
VAR LocationTable =
    CALCULATETABLE ( Routes, ALLEXCEPT ( Routes, Routes[Adjusted Location] ) )
RETURN
IF ( 
    CurrentDistance <= 0.06 && COUNTROWS ( LocationTable ) > 1,
    MINX ( 
        LocationTable,
        Routes[Date/Time] 
    )
)
End Time = 
VAR CurrentDistance =
    Routes[Distance]
VAR LocationTable =
    CALCULATETABLE ( Routes, ALLEXCEPT ( Routes, Routes[Adjusted Location] ) )
RETURN
IF ( 
    CurrentDistance <= 0.06 && COUNTROWS ( LocationTable ) > 1,
    MAXX ( 
        LocationTable,
        Routes[Date/Time] 
    )
)

 

Then the stops 

 

Stop = 
VAR StopNumber =
    RANKX ( FILTER ( Routes, NOT ISBLANK ( Routes[Start Time] ) ), Routes[Start Time],, ASC, Dense )
RETURN
    IF ( 
        NOT ISBLANK ( Routes[Start Time] ),
        "Stop - " & StopNumber
    )

 

1.png

 Finally the measur 

Stop Duration = 
VAR Duration =  
    DATEDIFF ( MAX ( Routes[Start Time] ), MAX ( Routes[End Time] ), SECOND )
RETURN
    QUOTIENT ( Duration, 60 ) & "Min and " & MOD ( Duration, 60 ) & " Sec"

1.png

Good afternoon @tamerj1 .

 

When I try to create the column for Adjusted Location, it gives an error that I've ran out of memory. Did you run into this when you were working on it?

Morning @rsimpson318 

on sample I had no error. But this a heavy calculation and this is expected for big data. Do you have table for each vehicle or all in one table?

@tamerj1 When I ran it, I had approximately 37,000 rows of data. I trimmed that down to one vehicle for one day which was about 1,100 and it did run. It still didn't look like it was calculating correctly but I hadn't had a chance to look into it further.

 

Once complete, I plan to have all the data in a single table, capturing a month at a time. I expect to have around 600,000 rows.

Good morning @tamerj1.

 

I apologize for the late responses. I am still interested in a solution and I'll try this out today and see how the data looks with it.

 

To answer your question regarding "extended period": I wouldn't need to capture small periods where they aren't moving like instances where they were stopped at a traffic light or quickly getting gas. I would say any instance where they have haven't moved more than .05 miles in more than 5 minutes would need to be considered an actual stop. 

v-yanjiang-msft
Community Support
Community Support

Hi @rsimpson318 ,

Is your problem solved?? If so, Would you mind accept the helpful replies as solutions? Then we are able to close the thread. More people who have the same requirement will find the solution quickly and benefit here. Thank you.
Best Regards,
Community Support Team _ kalyj

 

tamerj1
Super User
Super User

@rsimpson318 

Would you please provide sample of the expected results? Thank you

@tamerj1 

It would either be another table or even a card that would show something like:

StopStart TimeEnd TimeDuration
1st Stop4/29/2022 7:22:46 AM4/29/2022 7:26:07 AM3min20sec
2nd Stop4/29/2022 7:37:07 AM4/29/2022 7:47:07 AM10min0sec

 

The formatting doesn't need to be exact. Let me know if this helps or you need more info.

 

Thank you.

@rsimpson318 
Hello agian
I had some free time to do work on it. Here is a sample file folr your reference https://we.tl/t-WjszOERm4s
My proposed solution involves adding calculated columns:

Start Time = 
VAR CurrentDistance =
    Routes[Distance]
VAR LocationTable =
    CALCULATETABLE ( Routes, ALLEXCEPT ( Routes, Routes[Latitude], Routes[Longitude] ) )
RETURN
IF ( 
    CurrentDistance = 0 && COUNTROWS ( LocationTable ) > 1,
    MINX ( 
        LocationTable,
        Routes[Date/Time] 
    )
)
End Time = 
VAR CurrentDistance =
    Routes[Distance]
VAR LocationTable =
    CALCULATETABLE ( Routes, ALLEXCEPT ( Routes, Routes[Latitude], Routes[Longitude] ) )
RETURN
IF ( 
    CurrentDistance = 0 && COUNTROWS ( LocationTable ) > 1,
    MAXX ( 
        LocationTable,
        Routes[Date/Time] 
    )
)
Stop = 
VAR StopNumber =
    RANKX ( FILTER ( Routes, NOT ISBLANK ( Routes[Start Time] ) ), Routes[Start Time],, ASC, Dense )
RETURN
    IF ( 
        NOT ISBLANK ( Routes[Start Time] ),
        "Stop - " & StopNumber
    )

Then the measure would be

Stop Duration = 
VAR Duration =  
    DATEDIFF ( MAX ( Routes[Start Time] ), MAX ( Routes[End Time] ), SECOND )
RETURN
    QUOTIENT ( Duration, 60 ) & "Min and " & MOD ( Duration, 60 ) & " Sec"

One last step would be to filter the table in order to remove the blank row
1.png
The report looks like this
2.png
I hope this satisfies your requirement.

@tamerj1 

Good morning and sorry for the late response. I was out on leave and didn't have a chance to download the file and the link seems to have expired. Would you mind reposting it?

 

Thank you.

@tamerj1 

Good afternoon. Thank you for your help with this. I had a chance to test the solution and it seems to still be a bit off.

It seems to calculate the Start and Stop time if the distance traveled is equal to zero. In my table, the distance can fluctuate ever so slightly. In these instances, it would need to consider the start/stop when the vehicle moves less than .05 miles over an extended period.
I also have multiple vehicles and multiple dates. So you might have one vehicle that has 3 stops on the first day, and 4 on the second, and then another vehicle that also has a few stops one day and so on.

 

OperatorLatitudeLongitudeDate/TimeTimeReceivedDistanceDurationStop
Driver 1Lat1Long14/29/2022 7:224/29/2022 7:2200:00:20Stop - 1
Driver 1Lat1Long14/29/2022 7:234/29/2022 7:2300:00:20Stop - 1
Driver 1Lat1Long14/29/2022 7:234/29/2022 7:2300:00:20Stop - 1
Driver 1Lat1Long14/29/2022 7:234/29/2022 7:2300:00:20Stop - 1
Driver 1Lat1Long14/29/2022 7:244/29/2022 7:2400:00:20Stop - 1
Driver 1Lat1Long14/29/2022 7:244/29/2022 7:2400:00:20Stop - 1
Driver 1Lat1Long14/29/2022 7:244/29/2022 7:2400:00:20Stop - 1
Driver 1Lat1Long14/29/2022 7:254/29/2022 7:2500:00:20Stop - 1
Driver 1Lat1Long14/29/2022 7:254/29/2022 7:2500:00:20Stop - 1
Driver 1Lat1Long14/29/2022 7:254/29/2022 7:2500:00:20Stop - 1
Driver 1Lat2Long24/29/2022 7:264/29/2022 7:260.010:00:21Stop - 1
Driver 1Lat3Long34/29/2022 7:264/29/2022 7:260.060:00:20Stop - 1
Driver 1Lat4Long44/29/2022 7:264/29/2022 7:260.050:00:19Stop - 1
Driver 1Lat5Long54/29/2022 7:274/29/2022 7:2700:00:20Stop - 1
Driver 1Lat6Long64/29/2022 7:274/29/2022 7:2700:00:21Stop - 1
Driver 1Lat7Long74/29/2022 7:274/29/2022 7:270.140:00:20 
Driver 1Lat8Long84/29/2022 7:284/29/2022 7:280.180:00:20 
Driver 1Lat9Long94/29/2022 7:284/29/2022 7:280.170:00:20 
Driver 1Lat10Long104/29/2022 7:284/29/2022 7:280.240:00:20 
Driver 1Lat11Long114/29/2022 7:294/29/2022 7:290.110:00:19 
Driver 1Lat12Long124/29/2022 7:294/29/2022 7:290.160:00:20 
Driver 1Lat13Long134/29/2022 7:294/29/2022 7:290.040:00:20Stop - 2
Driver 1Lat14Long144/29/2022 7:304/29/2022 7:3000:00:20Stop - 2
Driver 1Lat15Long154/29/2022 7:304/29/2022 7:300.030:00:20Stop - 2
Driver 1Lat16Long164/29/2022 7:304/29/2022 7:300.010:00:21Stop - 2
Driver 1Lat17Long174/29/2022 7:314/29/2022 7:3100:00:19Stop - 2
Driver 1Lat18Long184/29/2022 7:314/29/2022 7:3100:00:20Stop - 2
Driver 1Lat19Long194/29/2022 7:314/29/2022 7:3100:00:20Stop - 2
Driver 1Lat20Long204/29/2022 7:324/29/2022 7:320.010:00:21Stop - 2
Driver 1Lat21Long214/29/2022 7:324/29/2022 7:320.50:00:20Stop - 2
Driver 2Lat30Long304/29/2022 7:354/29/2022 7:350.080:00:20 
Driver 2Lat32Long324/29/2022 7:364/29/2022 7:360.170:00:19 
Driver 2Lat33Long334/29/2022 7:364/29/2022 7:360.050:00:21 
Driver 2Lat34Long344/29/2022 7:364/29/2022 7:360.010:00:20Stop - 1
Driver 2Lat35Long354/29/2022 7:374/29/2022 7:3700:00:20Stop - 1
Driver 2Lat35Long354/29/2022 7:374/29/2022 7:3700:00:19Stop - 1
Driver 2Lat35Long354/29/2022 7:374/29/2022 7:3700:00:21Stop - 1
Driver 2Lat35Long354/29/2022 7:384/29/2022 7:3800:00:20Stop - 1
Driver 2Lat35Long354/29/2022 7:384/29/2022 7:3800:00:20Stop - 1
Driver 2Lat35Long354/29/2022 7:384/29/2022 7:3800:00:19Stop - 1
Driver 2Lat35Long354/29/2022 7:394/29/2022 7:3900:00:21Stop - 1
Driver 2Lat35Long354/29/2022 7:394/29/2022 7:3900:00:20Stop - 1
Driver 2Lat35Long354/29/2022 7:394/29/2022 7:3900:00:20Stop - 1
Driver 2Lat35Long354/29/2022 7:404/29/2022 7:4000:00:20Stop - 1
Driver 2Lat35Long354/29/2022 7:404/29/2022 7:4000:00:19Stop - 1
Driver 2Lat35Long354/29/2022 7:404/29/2022 7:4000:00:20Stop - 1
Driver 2Lat35Long354/29/2022 7:414/29/2022 7:4100:00:21Stop - 1
Driver 2Lat35Long354/29/2022 7:414/29/2022 7:4100:00:20Stop - 1
Driver 2Lat35Long354/29/2022 7:414/29/2022 7:4100:00:19Stop - 1
Driver 2Lat35Long354/29/2022 7:424/29/2022 7:4200:00:21Stop - 1
Driver 2Lat35Long354/29/2022 7:424/29/2022 7:4200:00:20Stop - 1
Driver 2Lat35Long354/29/2022 7:424/29/2022 7:4200:00:19Stop - 1
Driver 2Lat35Long354/29/2022 7:434/29/2022 7:4300:00:21Stop - 1
Driver 2Lat35Long354/29/2022 7:434/29/2022 7:4300:00:20Stop - 1
Driver 2Lat35Long354/29/2022 7:434/29/2022 7:4300:00:19Stop - 1
Driver 2Lat35Long354/29/2022 7:444/29/2022 7:4400:00:21Stop - 1
Driver 2Lat35Long354/29/2022 7:444/29/2022 7:4400:00:20Stop - 1
Driver 2Lat35Long354/29/2022 7:444/29/2022 7:4400:00:20Stop - 1
Driver 2Lat35Long354/29/2022 7:454/29/2022 7:4500:00:20Stop - 1
Driver 2Lat35Long354/29/2022 7:454/29/2022 7:4500:00:20Stop - 1
Driver 2Lat35Long354/29/2022 7:454/29/2022 7:4500:00:20Stop - 1
Driver 2Lat35Long354/29/2022 7:464/29/2022 7:460.160:00:20 

@rsimpson318 
Actually while writing the code, I was trying to figure out the criteria but that was not clear so I assumed and waited for your feedback on the proposed solution.

When you say "it would need to consider the start/stop when the vehicle moves less than .05 miles over an extended period." please define "extended period."

Hi @rsimpson318 

apologies for the late response. 
we're having holidays that shall end today. I will reply to you max by tomorrow morning. 
however, I Need a confirmation on which date column to conside? The Date/Time column or the ToimeReceived Column?

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors