7 Replies Latest reply on Sep 15, 2017 10:03 AM by eliza suzuki

    Tableau forecasting with R

    shwetha sarma

      Hello,

      My date starts from Jan 1, 2015 and I’m trying to use the example from https://boraberan.wordpress.com/2014/01/19/using-r-forecasting-packages-from-tableau/.

      I need to forecast month on month trend for rest of this year. But,I would still like to keep the parameter “periods to Forecast”.

      Here is my code:

      SCRIPT_REAL(“library(forecast);l<-length(.arg1);u<-.arg1[1:(l-.arg2[1])];
      n<-length(u);u[n]=.arg1[l];jjearnts <- ts(u, delta = 1/,frequency = 30,start=c(2017,90));
      fcast <- forecast(jjearnts, h=.arg2[1]);
      append(u,fcast$mean, after = n)",SUM([Sales]),[PeriodsToForecast])

      I'm unable to get my result. I also created the shift table as mentioned in the workbook. I'm new to R language and need help.