5 Replies Latest reply on Jun 14, 2018 7:36 AM by Sebastian Sofariu

    Too many missing values for forcast


      I am trying to use the forecast function, and while I can click "Show Forecast," no forecast data shows on the viz. When I select "Edit Forecast," it tells me "A forecast cannot be computed because of too many missing values." I have checked the underlying data, and there are no nulls in either of the measures that are being forecast. I am confused as to if there is anything that I can do about this, as I think that the data source is solid. I have attached the viz to look at. Any thoughts?

        • 1. Re: Too many missing values for forcast
          Ramon Martinez



          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.




          1 of 1 people found this helpful
          • 2. Re: Too many missing values for forcast

            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.

            • 3. Re: Too many missing values for forcast
              Ramon Martinez



              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.




              • 4. Re: Too many missing values for forcast
                Puneet Sharma

                Hi Ramon,


                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.



                • 5. Re: Too many missing values for forcast
                  Sebastian Sofariu

                  Hi Daleen,


                  The online help article below may also help.


                  Resolving Forecasting Errors