i am trying to work out the length of contract by month , I have a start date: 27/09/2016 and end date : 26/06/2017, i have done a calculation field below to count the lenth of contact
IF DATEDIFF('month',[Start Date],[End Date]) < 1 THEN 1
ELSE DATEDIFF('month', [Start Date], DATEADD('day', 15, [End Date])) END
fo the above dates i am getting 10 but i need this to be 9 as it is 9 months
can anyone help me fix this?
Not sure why you are adding 15 days to End Date but this will solve your answer
ELSE DATEDIFF('month', [Start Date], [End Date]) END
Become a Viz Whiz on the Forums!
Support the Community and master Tableau.
Retrieving data ...