1 2 Previous Next 28 Replies Latest reply on Feb 14, 2019 1:41 AM by Mihai Constantinescu

    Datediff Calculation with Blending

    Nimit Bhardwaj

      I'm trying to run a DATEDIFF calculation to calculate the Average Response time to a Client query.


      *1-to-1 blend* *Case Number is distinct in these two sources*  * EDIT : 1-to-M Blend. Case number is distinct in the Primary, multiple rows in both the secondary sources *


      Primary Data source fields : Case Number, Opened [Date & Time], etc.

      Secondary Data source fields : Case Number, First Response [Date & Time], etc.


      I want to calculate the average response time, which would mean calculating at the most granular level, the difference of First Response - Opened and aggregating (average) to the highest level.


      When trying to calculate this, Tableau is throwing different errors like 'cannot use aggregate and non aggregate together'. I got a valid calculation with "DATEDIFF('hour',MIN([Opened]),ATTR([Secondary Data].[First Response]))" but it did not make sense to me and showed wrong results.


      *Tableau Version 2018.2* *Cannot share workbook, sensitive information* * EDIT - Dummy Data attached  *

        1 2 Previous Next