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)
I think, I understand your issue here.
Create the following calculation fields to get the date difference you need.
IF [Category] = 'Actual' THEN [End Date] END
IF [Category] = 'Planned' THEN [End Date] END
DATEDIFF('day', [Planned Date], [Actual Date])
If this calculation didn't resolve your issue. Please send a Package Workbook.