Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

EWMA Calculation front end

Hi guys,

I have an interesting question regarding an calculation in the front end. I don't know if this is possible in the front end. I know this can be done in the backend with the Peek function but I need the analytics dynamically cause of the select-able dimension.

Here is the dataset. Exponential weighted moving average (EWMA) Is de formula: First record is value (starting point). The second EWMA record = 0.2*Value+0.8*previous EWMA

   

DimensionTimeValueEWMA
A1-1-20161010
A2-1-20161110,2
A3-1-20161310,76
A4-1-2016910,408
A5-1-201689,9264
A6-1-2016109,94112
A7-1-20161410,7529
A8-1-20161511,60232
A9-1-20161612,48185
A10-1-20161713,38548

Can this be done with a set analysis?

Best regards,

Rob

1 Reply
marcus_sommer

You could with interrecord-functions like above/below/before/after access other rows/colums within a chart. In your case you could try something like:

if(rowno(total) = 1, Value, rangesum(Value*0.2, above(EWMA)*0.8))

- Marcus