Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Showing results for 
Search instead for 
Did you mean: 

Rolling correlations possible?

Hi all

Wondering if anyone has come across a correlation calculation that is able to handle rolling correlations?

I use a correlation calculation that is calculated like this:

correl(aggr(avg([Measure1]),Dim1, Dim2, etc),aggr((avg(Measure1)),Dim1, Dim2, etc))

This is fine at the current point in time being assessed but I saw the rolling correlation function on R here: http://www.business-science.io/timeseries-analysis/2017/07/30/tidy-timeseries-analysis-pt-3.html

Is there a way to do this in Qlik too, either being done all in the one file or via a multiple number of files but having those automated (perhaps with some VB script)?

Keen to see if anyone has tackled/solved how to do this?

Thanks folks!

rolling correl.png

1 Reply
MVP & Luminary
MVP & Luminary

With interrecord-functions like above() could you access within a chart other rows and columns and for handling more than one return-value you need a range-function. Maybe something like this might work for you:

rangecorrel(above(aggr(avg([Measure1]),Dim1, Dim2, etc), 0, 2), above(aggr((avg(Measure1)),Dim1, Dim2, etc), 0, 2))

If not take a look in the help for further explanations and examples.

- Marcus