10 Replies Latest reply on Sep 11, 2013 1:38 PM by kamran soltani

    DATEDIFF not giving correct number of days difference

    James Truitt

      DATEDIFF('day',[Date Opened],[Date Closed])

       

      When using the above equation, the calculation is not being done as I would like. The equation only gives the difference between the days and does not take into account the month or year ("dd" difference from mm/dd/yyyy). For instance, the equation would give me 1 day difference between 7/1/12 and 9/2/12 because the day fields are only 1 number apart. In reality, there are 2 months between the dates, so it would be 64 days. How do I fix this in Tableau (without making the calculation in Excel first)?