I have a table with just the YEAR (ex -2005) column and want to calculate the difference in number of years using DATEDIFF compared to TODAY. Tableau does not identify just YEAR as a date field. Any sugesstions on how to handle this.
I plan to use DATEDIFF('year', YEAR, TODAY()) to calculate the difference (to get the number of years elapsed compared to TODAY)
Thanks much, I appreciate any help.
You have another request almost identical to this. You need to either:
1. Convert the YEAR field to a date by building a new calculated field converting it to a date, something like DATE('01-01-' + STR([YearField]))
2. Change the calculation from DATEDIFF to a simple minus calc. i.e. YEAR(TODAY()) - [YearField]