1 Reply Latest reply on Aug 21, 2017 6:26 PM by allam preethi

    day difference

    allam preethi

      Hi

      I'm very new to tableau and i'm stuck at finding date difference between planned and actual( below is the screenshot). i tried using (DATEDIFF('day',LOOKUP(ATTR([End Date]),0),(LOOKUP(ATTR([End Date]),1)))) refer 2nd screenshot),but somehow its not the way i want. The difference is not proper. Please suggest me

      All i need is difference between actual and planned(number of days)

      Thanks

       

        • 1. Re: day difference
          Sushmitha Reddy

          Hi Preethi

           

          I think, I understand your issue here.

          Create the following calculation fields to get the date difference you need.

           

          Actual Date:

           

          IF [Category] = 'Actual' THEN [End Date] END

           

          Planned Date:

           

          IF [Category] = 'Planned' THEN [End Date] END

           

          Date Difference:

           

          DATEDIFF('day', [Planned Date], [Actual Date])

           

          If this calculation didn't resolve your issue. Please send a Package Workbook.