0 Replies Latest reply on Jan 15, 2014 8:07 AM by Brian Zive

    trend model and continuous dates - finding avg rise

    Brian Zive

      I am trying to use the Trend Model to determine what my monthly rise is in sales. 

      My columns is a continuous date field, which I am looking at by month.

      My rows are cumulative sales.

      I know, from simply calculating my average, that I avg. about $51,000 in sales per month.

      But the Trend Model in Tableau shows my linear regression as

      y = 1987.44*[Month of gift_date] - 75,141,800

       

      It appears Tableau is taking the numeric value of the month of the gift date to calculate y.

      So, the numeric value of 2/1/2004 is 38018, so y = 1987.44*38018 - 75,141,800 y = 416,693 which is close to what the trend line graphs (8th month at 51,000 per month = $408,000)

      [I have confirmed that this is what Tableau does in this post on these forums: How do I get a linear trend line model to show the correct y-axis intercept value?

       

      What I am trying to figure out, is how can I get Tableau to create a Trend Model that counts months in sequence (i.e. If I were looking at data for July 2003 through June 2004, then February 2004 as month 8), instead of 37834, so the Trend Model would be

      y = [true_avg_rise]*month_number_seq + constant

       

      I am using Tableau 8.1.