CASE [Creation YTD Switch]
WHEN True THEN
(IF DATEPART(‘month’,[Start Date 2])> DATEPART(‘month’,[Start Date 1])
THEN DATEADD(‘month’,DATEPART(‘month’,TODAY())-DATEPART(‘month’,[Start Date 2]),[Fictional Start Date 1])
ELSE DATE([Start Year 1]+‘-’+DATENAME(‘month’,TODAY())+‘-’+DATENAME(‘day’,TODAY()))
END)
WHEN FALSE THEN DATEADD(‘month’,[Parameters].[Creation Period Length],[Start Date 1])
END
Hello @Hunny, I am unfamiliar with tableau calculations. What exactly are you wanting to accomplish with the calculated field? It looks like you will be using an ifelse statement, with some other date related calculations like addDateTime, extract, and truncDate.
With some more information about the expected output, I should be able to guide you further. Thank you!
Hello @Hunny, since we have not heard back from you, I will mark @robdhondt’s response as the solution. Please let us know if you have any further questions on this topic and we can guide you further. Thank you!