3 Replies Latest reply on Jun 21, 2018 3:40 PM by Don Wise

    Calculating TIMEDIFF from Duplicate rows

    James White

      Hello all,

      I'm trying to calculate "total time worked" in a 2018.1 tableau workbook.



      each row of data contains a PK "chat ID" as well as a Key that links to a "live agent session" table that contains a time stamp for login and logout.

      (each session has many chats)

      Ultimately i want to be able to calculate, 'hours per day', 'hours per agent', 'chats per hour' and 'chats per hour per agent.'



      My TIMEDIFF function returns a value as if every chat instance had its own session length.

      In other words in the primary table 80 chats link to the same session that lasted 6 hours. Instead of returning 6 hours it returns 480 (6*8)



      How can I create a calculation that will return an aggregate of the length of each sessions without duplicating the time stamps across individual chat instances



      (Hours per week should end up at about 11k)