Forum Discussion

AvanderKnijff's avatar
AvanderKnijff
New Member
3 years ago
Solved

Tracking dashboard

Hi Guys,   I want to create a dashboard showing the rides of assets. I have a table listing tracking events like start, moving, stop. So a typical Ride for one device has a start, one or more movin...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi AvanderKnijff ,

     

    Group the table by stop time:

    Column = 
    var _end = CALCULATE(MIN('Table'[Time]),FILTER('Table','Table'[eventType]="stop"&&'Table'[Time]>=EARLIER('Table'[Time])&&'Table'[DeviceID]=EARLIER('Table'[DeviceID])))
    return
    IF(ISBLANK(_end),'Table'[Time],_end)

    Then rank the group in same device ID.

    Column = 
    var _end = CALCULATE(MIN('Table'[Time]),FILTER('Table','Table'[eventType]="stop"&&'Table'[Time]>=EARLIER('Table'[Time])&&'Table'[DeviceID]=EARLIER('Table'[DeviceID])))
    return
    IF(ISBLANK(_end),'Table'[Time],_end)

     

    Best Regards,

    Jay