Forum Discussion
Weighted Moving Average
Can you post sample data in text so that we can experiment on it. I'm also not clear on what you are expecting as a result. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
- Anonymous6 years agoNot applicable
I have provided a sample of my data table 'GPS Data Unpivoted'.
This would have multiple players across multiple dates and metrics.
Below is the exponentially weighted average calculation that I am trying to recreate.EWMA(t) = a * x(t) + (1-a) * EWMA(t-1)Where
- EWMA(t) = moving average at time t
- a = degree of mixing parameter value between 0 and 1
- x(t) = value of signal x at time t
I am trying to create this calculation over a 7 day period and a 28 day period.
Using the example of a 7 day EWMA;
a = 2/(7+1)
x(t) = would be the value for each day (including days where players have no data)
EWMA(t-1) = the EWMA rolling average for previous day
Within the sample data I have created an EWMA 7 day column which is my expceted results.
I hope that helps a bit more?