5 Replies Latest reply on Jul 22, 2013 6:58 AM by David Garritt

    Time Between Events

    David Garritt

      I need some help trying to create a calculated field.  I apologize in advance if there is an obvious answer, which I suspect there is.


      I have a large table containing a series of events.  Each event contains a DateTime stamp.  If I sort the table chronologically, I would like to create a measure that showing the duration between the current event and the previous event.  I also have a measure called CreateTime, which is the time created in millisecond based on UNIX time.


      All I need to do is subtract the current "createTime" from the previous "createTime", but I can't seem to figure out how to do that.  The function PREVIOUS_VALUE seemed to be the ticket, but it only works with aggragate values.


      It's a piece of cake in Excel....:)


      Thanks for the help.  File attached.