Problem in your configuration of the chart for forecast
As you are using MDY(Week Ending) in axis X (Columns), The forecast model can not be applied becasue it considers there are null values between every value in axis X, for instance from January 4, 2013 to January 11, 2013 there are six missing values.
To solve the problem, you need to define the time variable on Columns or axis X as weeks using the function WEEK. See the workbook attached.
Follow the steps:
1.- Change the date function of the field Week Ending on Columns from MDY(Week Ending) to WEEK(Week Ending)
2.- Go to Forecast Options.. and change the Forecast Model from Automatic to Trend and Seasonal
See the implementation in the view sample Forecast Case v2
I hope this help.
Sample Forecast.twbx.zip 5.8 MB
Wow. That was very helpful. Thank you, Ramon. Worked like a charm. A few follow-up questions:
1) I changed the columns from MDY(Week Ending) to WEEK(Week Ending) as you said, but doing so changed the dates displayed on the axis from my calculated dates that I had (the Friday of every week) to the default dates (the Sunday of every week). Is there a way that I can change that back so it's displaying Fridays' dates?
2) As I am using a dual axis line graph here with each line being a different color, when I employ the forecast, it automatically changes both my lines to be the same color. Can I have a forecast on both measures while having the measures' colors be different from each other?
3) I have another similar graph on a different sheet in the workbook, but the measures are from two different data sources that I have linked. I am having trouble being able to forecast both of them on the same sheet. Is there a way I can do this?
Thanks again for your help.
I've been exploring a solution to your question 1) but with no success. The concept here is that we need to work with weeks instead of days as a continuous variable in order the forecast works properly.
Regarding question 2). It seems there is no way to assign a different color to each line as Forecast Indicator is used for Color. If Forecast Indicator is remove from Color it is possible to assign a different color to each line but under this scenario we don't have a way to distinguish the forecast values.
3) You need to make sure that you are linking both data sources by the time variable you are using in axis X (independent variable). If you share a workbook with the situation you discribed in questioin 3, I can try to come up with a solution.
Your response to the above question was very helpful! Thanks
I am new to Tableau, and i am in similar situation but my problem is not with weeks but with months. I have three months- September, January and May which are under terms- Fall, Winter, Spring. if i use only year, forecasting works perfectly fine but if i want to see by months- September, January, May, forecast does not work and gives the error of too many missing values. I understand that it is because of missing values of other months but the Daterunc function that you used in above example does not work on month. I also tried, domain padding and densification but could not perform forecasting.
Your help in this will be highly appreciated.
Forecast-TableauCommunity.twbx 27.5 KB