1 Reply Latest reply on Nov 28, 2016 9:10 AM by Tom W

    How to calculate duration

    amit saha

      I need help in finding the formula to determine duration based on status in Tableau.

      We have two columns , Colum 1 :Dat&Time and Column 2: Status

        

      DateStatus
      8/9/10 10:23Normal
      8/9/10 10:23Normal
      8/9/10 13:20Normal
      8/9/10 18:16Normal
      8/9/10 18:16Normal
      8/9/10 18:16Normal
      8/9/10 18:16Alert1
      8/9/10 18:17Normal
      8/9/10 18:17Normal
      8/9/10 18:17Normal
      8/9/10 18:17Normal
      8/9/10 19:17Normal
      8/9/10 19:17Normal
      8/9/10 23:28Normal
      8/9/10 23:28Normal
      8/9/10 23:28Alert1
      8/9/10 23:28Alert1
      8/9/10 23:29Normal
      8/9/10 23:29Normal
      8/9/10 23:29Normal
      8/10/10 4:03Normal
      8/10/10 4:04Normal
      8/10/10 4:04Normal
      8/10/10 4:04Alert1
      8/10/10 4:04Alert2
      8/10/10 4:04Alert2
      8/10/10 4:04Normal
      8/10/10 4:05Normal
      8/10/10 4:24Normal

       

      The result I am expecting somewhat like this

       

        

      DateStatus
      8/9/10 18:16Normal28380
      8/9/10 18:16Alert110
      8/9/10 23:28Normal18700
      8/9/10 23:28Alert120
      8/10/10 4:04Normal16520
      8/10/10 4:04Alert110
      8/10/10 4:04Alert220

       

      Thanks for your help