1 of 1 people found this helpful
I guess Year is listed under measures now.
Just right click and change the data type to string then drag it to dimensions.
3 of 3 people found this helpful
In my experience that will convert it to a string, but it still won't show up as an actual Date field. When I ran into this my convert to Date turned everything into 1905. However, I resolved it by making a table calculation below:
If you attach your workbook I'll do it for you or just copy and paste this into a table calc and replace [Year] with whatever the name of your dimension is. You will have to change it from a measure to a String though like noted above.
the 1905 error is precisely the error I had. I understood your suggestion. @.Indumon 's suggestion functionally worked but yours allows for further capability (i.e. date range filters)
5 of 5 people found this helpful
Kyle, that approach works but Strings are typically less efficient to work with than pure numbers and dates. Try the following approach instead:
DATEADD('year', [Year]-1900, #1900-01-01#)
is that the right syntax? I got an error. My "year only" values are treated as float.
The error i get is that my calculation is being called with (string, float, date), did I mean (string, integer, datetime)?
I've noticed when how my source file (excel) treats the number makes a difference in how tableau treats it.
the help file shows this as an example:
DATEADD('month', 3, #April 15, 2004#) = #July 15, 2004#
I've also tried the "month day, year" format which also did not work.
4 of 4 people found this helpful
Try this instead: DATEADD('year', INT([Year])-1900, #1900-01-01#)
Thanks! Great solution
Worked for me. Weird how we have to go through this just for Tableau to recognize a year as a year.
I believe the product is improving on a daily, That's why we have updates. You can make this suggestion.