Qlik Community

Qlik FinServ

A private group designed to enable innovation, share best practices and educate QlikView users in the Financial Services industry. You will not see any content if you are not a member, you can request to join by pressing "Join the Group"

Highlighted

Re: Calculation of Exponentially Weighted Moving Average EWMA on chart expression

I would avoid the recursive Above() approach, of the simple fact that it doesn't work for data sets with 100+ values.

Instead, I think that your first approach with the Aggr() can be made to work also when you have a date as dimension: Add a sorted dimension (date,Numeric) in the Aggr() function, and use RangeSum(Above()) on the array of values that Aggr() creates.

Something like

Sqrt(
(1-$(vLambda))*
Sum(
Aggr(
RangeSum(Above(
Sqr(Sum([value]))*
pow($(vLambda),Count(distinct total [date])-RowNo()),
0,RowNo()))
,
(date,Numeric)
)
)

AntonBaranchuk
New Contributor

Re: Calculation of Exponentially Weighted Moving Average EWMA on chart expression

> By the way, the Anycharts extensions are very nice.

Thank you!

I think we have a solution that will work for your task. Let's discuss it. please ping me at technical.indicatrs@anychart.com