-
1. Re: Those pesky date functions
Shawn Wallwork Aug 24, 2012 11:08 AM (in response to Nathan Brown)Nathan I think it's a problem with the way your data is formatted in Excel. If you remove the extract, or post the Excel file I'll take a look for you.
--Shawn
-
2. Re: Those pesky date functions
Nathan Brown Aug 24, 2012 11:25 AM (in response to Shawn Wallwork)Thanks! Here's the Excel file.
-
3. Re: Those pesky date functions
Shawn Wallwork Aug 24, 2012 11:55 AM (in response to Nathan Brown)Hi Nathan,
When you just have years listed as numbers in Excel then that's not recognized as a date per se. When you tell Excel it is a date, then Excel looks the numbers you've got list and takes 1985 (days) and adds it to the 'origin' date (I forget what that is) and comes up with 6/7/1905. That's how you're getting that weird date.
Solution:
- Change all the years to 1/1/1985 etc. and when you bring it into Tableau declare it a date, then use the date formats to get the display you want
- Leave it the way it is, bring it into Tableau and change it from a Date Type to a String type (see sheet 4).
Hope this helped.
--Shawn
-
Seattle Crime 1985-2011-SW.twbx.zip 106.9 KB
-
4. Re: Those pesky date functions
Jonathan DrummeyAug 24, 2012 11:53 AM (in response to Shawn Wallwork)
1 of 1 people found this helpfulAnother alternative is to have the Year as a numeric datatype, and set it to be a Discrete Dimension. That's how I'd tend to set it up, since it won't run into the date padding issue that happens sometimes with complex table calculations.
Jonathan
-
5. Re: Those pesky date functions
Shawn Wallwork Aug 24, 2012 11:58 AM (in response to Nathan Brown)Nathan, I'd listen to Jonathan, he knows a lot more about this stuff (especially padding issues) than I do.
--Shawn
-
6. Re: Those pesky date functions
Jonathan DrummeyAug 24, 2012 12:06 PM (in response to Shawn Wallwork)
You mean how to turn your 8K rows of Superstore Sales data into 1.2M rows of crosstab?
A bit more seriously, though, using text or number for the datatype is fine, it's the dates that can cause Tableau to do some serious padding when you want to do running totals and suchlike. Which is desirable in some situations like a line chart, not so desirable in others.
Jonathan
-
7. Re: Those pesky date functions
Nathan Brown Aug 24, 2012 12:29 PM (in response to Jonathan Drummey)Thanks to you both! That fixed it... This date stuff takes a while to get the hang of...
Best,
Nathan