7 Replies Latest reply on Aug 28, 2018 5:37 AM by Ben Bird

    Calculate the difference of DateTime

    Marc Hasenfratz

      Hello toghter,

       

      I really hope somebody can help me with my issue.

      My Data look like this…

       

      DateTime                     Status         Var1     Var2

      07.09.2017 15:31:10     1                A          100

      07.09.2017 15:32:10     0                A          100

      07.09.2017 15:32:16     1                A          200

      07.09.2017 15:42:19     0                A          200

      07.09.2017 16:42:21     1                B          100

      07.09.2017 17:04:18     0                B          100

      08.09.2017 16:05:55     1                C          400

      08.09.2017 16:35:57     0                C          400

      08.09.2017 16:36:03     1                C          400

      08.09.2017 16:37:00     0                C          400

      08.09.2017 17:49:06     1                D          600

      08.09.2017 18:43:04     0                D          600

       

      I want to calculate the difference between the DateTime. For example

       

      (DateTime;Status;Var1;Var2)

       

      (07.09.2017 15:32:10;0;A;100) - (07.09.2017 15:31:10;1;A;100)

      (07.09.2017 15:42:19;0;A;200 )- (07.09.2017 15:32:16;1;A;200)

      (08.09.2017 17:49:06;1;D;600) - (08.09.2017 18:43:04;0;D;600)

       

      I have to admit that I use tableau since a few weeks so i hope for a good advice

      Thx in advance