4 Replies Latest reply on Mar 1, 2017 5:18 AM by Michal Mazur

    Get Tableau to recognize dates

    Erin Mather

      I have a sales table that has sales by fiscal year and month arranged by city and data.  For example:

         

      CityFYDataOctoberNovemberDecemberJanuaryFebruaryMarchAprilMayJuneJulyAugustSeptember
      New York2015Projection $7,609.48 $6,001.47 $8,419.64 $8,825.45 $5,653.33 $9,479.77 $3,758.11 $9,902.70 $8,800.91 $7,245.92 $1,443.47 $4,372.41
      New York2015Reported $6,884.07 $1,465.95 $8,949.93 $9,913.44 $7,190.30 $6,875.52 $2,684.66 $ 448.21 $9,303.48 $5,763.61 $9,049.33 $ 25.37
      San Fransisco2015Projection $6,296.36 $ 383.86 $2,640.69 $ 103.14 $4,326.63 $2,164.79 $4,779.66 $6,348.35 $7,496.37 $ 317.37 $1,100.98 $3,142.65
      San Fransisco2015Reported $6,432.69 $7,379.49 $3,820.88 $5,063.53 $4,241.19 $6,104.20 $3,556.73 $6,199.25 $7,914.61 $2,304.01 $1,912.41 $ 613.52

       

       

      I'm trying to put it in Tableau to get a graph of how sales data changes over time, by fiscal year and by month.  However Tableau can't seem to recognize the relationship between the months and the years.  At first I rearranged the data like so:

       

         

      CityFYMonthProjectionReported
      New York2015October $7,609.48 $6,884.07
      New York2015November $6,001.47 $1,465.95
      New York2015December $8,419.64 $8,949.93
      New York2015January $8,825.45 $9,913.44
      New York2015February $5,653.33 $7,190.30

       

      But Tableau still can't do it.  I assume the answer is some sort of calculated field?  This seems like it should have a simple solution.

        • 1. Re: Get Tableau to recognize dates
          Emily Le Coz

          Try combining the months and years into one column in Excel. So instead of a separate column for months and a separate column for years, create one column that reflects both the month and the year (10/2015, for example).

          1 of 1 people found this helpful
          • 2. Re: Get Tableau to recognize dates
            anoop.mohandas.0

            Erin,

             

            Tableau considers and reads the fields as separate as you understand it. So either you need to manipulate your source for tableau to read it or you would need to write a calculated field by combining the date and month.

             

            Good Luck with data,

            Anoop

            • 3. Re: Get Tableau to recognize dates
              Erin Mather

              Could you give an example of a calculated field that would result in a date like you mention?  I assume it's some sort of DATE() or MAKEDATE()

              • 4. Re: Get Tableau to recognize dates
                Michal Mazur

                Hello,

                 

                I have a table with combined month and year:

                 

                KPI     01-01-2017     01-02-2017     01-03-2017

                KPI1          1                      2                     3

                KPI2          1                      2                     3

                KPI3          1                      2                     3

                 

                Excel converts view of 01-01-2017 into Jan-17 (but the value is 01-01-2017)

                 

                Tableau does not recognize names of the columns as dates but as text. Hence sorting chronologically is not working

                How to set up excel dates so tableau recognizes or what to do in Tableau?

                 

                I would really appreciate answer.

                 

                Best Regards,

                Michal