-
1. Re: Datename function is returining number
Patrick Van Der Hyde Mar 12, 2018 3:42 PM (in response to vikas chowdary)1 of 1 people found this helpfulVikas,
I searched and discoved this is expected behavior for a few data sources. Datename does indeed return an integer for data sources that do not have month names. The conversion actually occurs against the source of the data and in this case there is no call to the DB2 that returns the value of monthname so the numeric value is returned. You could do a Tableau Extract to resolve the issue or work with a calculated field to convert directly in Tableau.
Also - I am curious - the number 10 equal to December. What is going on there? Is that a fiscal calendar you are working with?
Good luck
Patrick
-
2. Re: Datename function is returining number
betsy curbelo Mar 22, 2018 8:44 AM (in response to vikas chowdary)Hi don't know too much of tableau but:
you can use another calculated field
so
Case Datename('month', Date_field_in_Database)
when 1 then 'January'
When 2 then 'February'
.
.
.
When 12 then 'December'
end
I Used to have the same prob in a report and solved with this
hope be helpful for you too.
-
3. Re: Datename function is returining number
vikas chowdary Mar 22, 2018 11:38 PM (in response to Patrick Van Der Hyde)Sorry Patrick. It has to be 12, I missed it
-
4. Re: Datename function is returining number
vikas chowdary Mar 25, 2018 10:06 PM (in response to vikas chowdary)Hi Patrick Thanks for your Suggestion. Yeah extract gives you the Datename, but extract is not an option for us, as we are creating a reports and data has to be live. So can you help in building a calculated filed.
Thanks
Vikas
@Patrick A Van Der Hyde