Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
Dimension | Time | Value | EWMA |
A | 1-1-2016 | 10 | 10 |
A | 2-1-2016 | 11 | 10,2 |
A | 3-1-2016 | 13 | 10,76 |
A | 4-1-2016 | 9 | 10,408 |
A | 5-1-2016 | 8 | 9,9264 |
A | 6-1-2016 | 10 | 9,94112 |
A | 7-1-2016 | 14 | 10,7529 |
A | 8-1-2016 | 15 | 11,60232 |
A | 9-1-2016 | 16 | 12,48185 |
A | 10-1-2016 | 17 | 13,38548 |
Can this be done with a set analysis?
Best regards,
Rob
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