Qlik Community

Qlik Server Side Extensions Discussions

Discussion Board for collaboration on Server-Side Extensions and Advanced Analytics Integration.

HSPrim
New Contributor

Forecasting with ARIMA models in Qlikview using SSE-R plugin

I installed the SSE-R plugin and it works in the R_BasicExample file in the plugin directory.

Now I'm trying to use the plugin to forecast revenue.

I've got a chart in Qlikview which displays the transaction revenue per week with the following expression: 

 

SUM([Transaction Revenue])

 

The required code in R to make a forecast:

 

Revenue.ts = ts(Transaction_Revenue, start=c(2016,1), end=c(2018,52), frequency = 52)
Revenue.arima = auto.arima(Revenue.ts)
Revenue.fc = forecast(Revenue.arima, h=52)

Now the question: How do I make the predictions in Qlikview, using the R script? Github gives the following function setup: 

<EngineSSEName>.<FunctionName>(Script [,Parameter...])

But I'm unsure what is needed to get this working. Do I need to place this code in the expression of the graph or in the script of the document? Is there any other code needed to get this working?

Hopefully someone is able to help me. If you need more information, please tell me.

Thanks in advance.

 

Labels (5)