Forum Discussion

rpinxt's avatar
rpinxt
Solution Sage
2 years ago

Count time between rows

Probably not that difficult but still I am strugling.

Here is the issue:

I want to make a measure that shows me how many time each step took.

So second line would be 7:34 -/- 7:32 resulting in 2 minutes.

 

Etc.

 

6 Replies

  • rpinxt's avatar
    rpinxt
    Solution Sage

    Thanks Greg_Deckler bit more difficult then I was expecting.

     

    Tried it like this but no luck yet :

    Time Spent =
    VAR __Current = MAX('Table 1'[Time])
    VAR __PreviousDate = MAXX(FILTER('Table 1','Table 1'[Time] < EARLIER(MAX('Table 1'[Time]),1)

    VAR __Previous = MAXX(FILTER('Table 1','Table 1'[Time]=__PreviousDate),[Value])
    RETURN
      __Current - __Previous
     
    But it starts to go wrong in the EARLIER part....
      • rpinxt's avatar
        rpinxt
        Solution Sage

        Greg_Deckler  you mean like this?

         

        DateNameTimeProcess
        01-02-24ALHAJJX 07:32:47Sumtotal
        01-02-24ALHAJJX 07:34:54Apply
        01-02-24ALHAJJX10:32:36Pauze Uit
        01-02-24ALHAJJX10:51:13Pauze Uit
        01-02-24ALHAJJX11:24:17Apply
        01-02-24ALHAJJX12:30:54Pauze In
        01-02-24ALHAJJX13:05:07Pauze Uit
        01-02-24ALHAJJX15:01:02Pauze In
        01-02-24ALHAJJX15:19:09Pauze Uit
        01-02-24ALHAJJX15:36:23Apply
        01-02-24ALHAJJX15:57:11Stop