1 Reply Latest reply on Jun 24, 2018 9:15 PM by Chris McClellan

    Calculating multiple duration using timestamp with filters condition

    wc chua

      Hi,

       

      I have have a file that contains few hundred thousands row of data. Within the data, the parameters includes "Timestamp, Vehicle Model,lat,long, etc".

      Each file represents 1 day worth of data.

      Within the day, there could be multiple models of vehicle's data captured. As my system and visualization is for vehicle monitoring, I would like to

      capture their journey duration. As of now, I am able to calculate the total duration of each vehicle by using the method from this link:

      http://www.vizzingdata.com/tableau-tips-datetime-difference-in-the-format-ddhhmmss/

       

      But by using such method, It actually look at the 1st timing and the last timing of the day of the vehicle to calculate the total duration.

      The challenges faced right now is that within the 1st and last timing of the day, the vehicle might go idle or disconnected for hours.

      But this"idle/disconnect" period is included in the total duration as it does not minus away the "disconnected/idle" time.

      I would like to seek advice on this issue, if i can do a filter that tells me that, if my vehicle (from the current row timing to the next timing) has

      a time duration difference of more than 10mins, then i will disregard this duration into my total duration(which uses WINDOW_SUM([count]) ).

       

      My idea right now is to check if tableau is smart enough to calculate timing based on row to row entry instead of the 1st timing to the last timing of the day.

      Thank you for your time!

        • 1. Re: Calculating multiple duration using timestamp with filters condition
          Chris McClellan

          Hello again, much the same as before - it gets difficult when there's no flag to show the different trips but it can be done based on an "idle window" like your example of 10 mins.

           

          Can you please supply some sample data that would show several vehicles for a day and that also contains some "idle time" to show how the different trips are calculated.  This can be completely dummy data, just as long as you know that there's some trip breaks and other examples in the data.