6 Replies Latest reply on Aug 31, 2016 9:18 AM by Mia Lee

    Trend lines

    David Southgate

      I am very new to Tableau and struggling to add a trend line as getting following message:

      'a trend line cannot be computed. Typically, each axis should be either a number or a date'

       

      After some searching I understand that I need to change my date from discrete (blue) to continuous (green) by  the "Continuous" option, however this option is not available as I am using custom dates.

       

      See screenshots below, can someone help?

       

      Thanks

        • 1. Re: Trend lines
          Łukasz Majewski

          Why don't you use Continuous  MONTH format?

          • 2. Re: Trend lines
            David Southgate

            Thanks for quick response. I am using data over a number of years so if I use month format then it groups months together into 12 month calendar as opposed to between 2014-2016, see below:

             

            • 3. Re: Trend lines
              Łukasz Majewski

              Please pay attention to the two sets of date parts and select month with year from the lower set.

              1 of 1 people found this helpful
              • 4. Re: Trend lines
                Stephane Marx

                Hi David,

                As Lukasz mentioned please do mind the type of date you're using. Tableau gives you 2 options: continuous or discrete.

                You can only use trend lines with continuous dates.

                Discrete options "buckets up" or "groups" the date on a common date format (month, weeks, etc) without real chronological logic. Right click the date field you brought in the view and choose the date part at the top.

                Example: Discrete monthly sales

                > all my sales are bucketed up by month (you see that each bar of the chart contains several years sales that have happened in this specific month).

                While continuous will plot a single point of data for each range of date you chose (every week, every month, every year, etc).

                Here I chose continuous month and I see every month sales across time:

                More explanations from Tableau here:

                Continuous and Discrete

                 

                Hope this helps,

                1 of 1 people found this helpful
                • 5. Re: Trend lines
                  David Southgate

                  Great thanks Stephane and Lukasz I have changed the date format.

                   

                  A couple more questions:

                   

                  I also have to turn off stack marks for me to utilise the trend lines:

                  When I do this it allows me to have a trend line but it skews my data:

                   

                  Is there a way to prevent this so that it counts all my data by month or can I only remedy this by removing the bucket priority functionality (blue = high, green = medium & low = orange) as per the below?

                  Lastly, is there a way I can format so that I can see every month on x axis or abbreviate to Nov, Dec, Jan etc?

                   

                  Thanks again.

                  • 6. Re: Trend lines
                    Mia Lee

                    use right click and format to set the date format

                     

                    Hope this helps.

                     

                    Mia

                    1 of 1 people found this helpful