7 Replies Latest reply on Mar 16, 2012 10:59 AM by matt.lukoff.0

    Date coming in as Null - why?


      I have an Excel Workbook with some dates, dimensions and metrics. When I connect my Excel Workbook with Tableau and view the data from Tableau the Date Field is full of Nulls and I'm unable to create any reports. I formatted the Excel dates as such, metrics as number and dimensions as text. Can anyone advise?

        • 1. Re: Date coming in as Null - why?
          Ryan Shirley

          Are you connecting Live or saving the Excel file into a Tableau Extract? I had the same issue where I was using an Extract, and I kept changing formatting and underlying data, and it wasn't doing anything in Tableau...it wasn't until I rememberd to Refresh the Extract under the data menu that my changes actually took effect. Inside Tableau is your date field being recognized as a date field (ie: having the calendar icon)? If not you may have to change the data type inside Taleau, or even using a calculated field to change it to a recognizable date.

          • 2. Re: Date coming in as Null - why?



            I'm connecting Live. I've narrowed it down further and it seems to change to Null AFTER I define date as a date-field in Tableau - which makes this problem even stranger

            • 3. Re: Date coming in as Null - why?
              Jonathan Drummey

              I just ran into this yesterday and got a pointer from Alex Kerin. Excel can show a value as a date, but hand it off to Tableau as either a date type or a numeric type. If I understand this properly, if it's a numeric type and you set Tableau's data type to date, then Tableau shows Null instead of a value.


              Try setting the datatype in Tableau to numeric and see if the data shows up.



              • 4. Re: Date coming in as Null - why?
                Ryan Shirley

                That was going to be my next suggestion. Seems like if a "date" in your data is 20111225, and you apply a date format in Excel it will come up as 12/25/2011 (or whatever format you use). But when you import to Tableau it sees it as a number...so I had to do a calculated field with the Date function to get Tableau to read it as a date correctly. I know there are a few forum posts on this Date function since I read a few to correct my issues as well.

                1 of 1 people found this helpful
                • 5. Re: Date coming in as Null - why?

                  Thanks Jonathan, I just tried changing to a numeric data type in Tableau to no avail. I also removed all formatting in Excel and tried to set as Date in Tableau - also didn't work. Here's a glimpse of my Excel:


                  DateFacebook DimensionMetric
                  JanuaryPeople Talking About This0
                  FebruaryPeople Talking About This0
                  MarchPeople Talking About This0


                  also tried with this data to no avail:


                  People Talking About This

                  Additional Facebook Likes272349289
                  Total Facebook Fans8,0268,3538,642
                  • 6. Re: Date coming in as Null - why?
                    Ryan Shirley

                    Unless I am mistaken, it seems that your date field is really only a text month field...in which case Tableau reads it as a String and not a Date.


                    This forum post may be of help: http://community.tableau.com/thread/116587


                    It shows how to take a Month string and turn it into a useable Date field in tableau by using a Calculated Field.

                    1 of 1 people found this helpful
                    • 7. Re: Date coming in as Null - why?



                      You are even more correct. Excel was ok calling that a date field but I had to change January to 1/1/12 in order for it to work in Tableau.