Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Prediction function in QlikView

Hello,

I was wondering if there is any function in QlikView which can predict, what data will be in the future in relation of data pattern?

I have already google it, but I didn't find anything useful. Maybe I wasn't looking with correct string.

Thank you,

Luka S.

25 Replies
rajni_batra
Specialist
Specialist

Any Luck guys ???

Anonymous
Not applicable
Author

Hi, Do you know the integration of R with qlikview. If yes then i am trying the below macro code and doing the prediction part using R. Please help me in the below code:

sub test

'create a COM object representing R

Set R = CreateObject("StatConnectorSrv.StatConnector")

R.Init "R"

'Pass data to R from csv

R.EvaluateNoReturn "setwd('C:\\R\\')"

R.EvaluateNoReturn "RSAS1<-read.csv('RSAS.csv')"

R.EvaluateNoReturn "attach(RSAS1)"

R.EvaluateNoReturn "R_fit <- arima(RSAS1$R)"

R.EvaluateNoReturn "R_forecast <- forecast(R_fit, h=10)"

R.EvaluateNoReturn "'(RMean<-R_forecast$mean)'"

R.EvaluateNoReturn "'(RMean1<-RMean$Point.Forecast)'"

R.EvaluateNoReturn "'(DisplayResult<-data.frame(RMean1))'"

RResult=R.GetSymbol("DisplayResult")

msgbox(DisplayResult)

R.EvaluateNoReturn "write.csv(DisplayResult,'Rmean2.csv')"

'Close R connection

R.close

end sub

Not applicable
Author

Hi Prashant,

If you haven't already solved your issue, I would first run each line of the code within R (or R studio if you prefer) to see if the code is failing which you won't be able to know when running the macro inside QV.

I found it was usually something to do with the working directory not set correctly.

Cheers,

TG

Anonymous
Not applicable
Author

Thanks Thomas,

But I have resolved my issue.

Regards,

Prashant

sumitjadhav
Creator II
Creator II

thanks deepak it was very helpfull.

laxmanqlik
Creator II
Creator II

can we do the same in Qlik Sense