3 Replies Latest reply on Jul 13, 2018 8:52 AM by Ken Flerlage

    DateDiff Help

    Emily Skoraczewski

      This one is probably an easy question for some of you super users, but I am struggling and cannot find anything online that would tell me what I want.


      I'm using the datediff function, trying to calculate the total number of hours between two date/time stamps.  I want the TOTAL number of hours. Below is an example of my data, and what I see.


      I'm using the following two calculated fields to calculate my numbers below.


      Rapid Check:

      IIF([Status Changed To Hold Auth At] > [Asset Checked In At], DATEDIFF('hour',[Asset Checked In At],[Status Changed To Hold Auth At]),Null)


      LOD Function: {FIXED [Case Id]: AVG([Rapid Check])}


      The 86.615 is correct, however, if you look at the data below, you will notice that it is an average of the rounded hours!

      The yellow highlighted field is what I calculate in Excel, which is what I would like to see in Tableau.  Here you can see the TOTAL number of hours for each case.  In the Blue section, it is only giving me the hours, not anything past the decimal point.

      How can I get the EXACT number of hours, like in the yellow column to show in Tableau?  I've tried changing it to minutes, and it does the same thing (minutes: 5,187.00)!



      Any help would be greatly appreciated.