1 Reply Latest reply on Dec 31, 2013 10:44 AM by Peter Gilks

    running sum of forecast

    Taylor Marr

      Hello,

       

      Does anyone know of a good way to forecast in Tableau and return a running sum with the original values and forecast values? I really like the exponential smoothing of the built in Tableau forecasting but it doesn't allow any table calculations. I tried working around this by doing a HoltWinters forecast in R with the R integration, however, I keep receiving errors because of the complexity of passing the data back and forth for the forecast. If there is a calculated fields (or many calc fields) I can create to recreate the Tableau forecast that would be preferred. Need to forecast through the end of the current month for revenue.

       

      Thanks

       

      For reference here is my R script I tried using:

      //

      SCRIPT_REAL(

      "library(forecast);

      df<-data.frame(.arg1,.arg2)

      ts<-ts(df[,2],frequency=7);

      ts.forecasts<-HoltWinters(ts);

      ts.prediction<-forecast.HoltWinters(ts.forecasts, h=7);

      ts.prediction$mean;"

      ,

      max(day([Date]))),

      sum([Revenue]))

      //

        • 1. Re: running sum of forecast
          Peter Gilks

          This isn't a perfect solution, but if you build a regular tableau forecast time series chart, hit CTRL C, open a new Tab and hit CTRL V you will have the estimates, upon which table calculations such as running total can be performed.

          3 of 3 people found this helpful