Forum Discussion

mpbi's avatar
mpbi
New Member
4 years ago

Exponential Weighted Moving Average DAX

Hello, I am new to DAX and trying to calculate Exponential Weighted Moving Average for one of my report.
Please find below attached data element and expected result which I have calculated manually into excel and would like to replicate same logic to DAX so I can utilize into my Power BI report.
For very first month from selection it should use mean value for calculation as shown in below table and for all upcoming months calculated result value from previous month would be used instead of mean.

Row Labels(A) Percent Meeting(B) CountSumMean(F)Par1(G)Par2(H)Result(I)Formula
7/1/20170.52303989 94.2150791050.468340.20.80.479281676(G2*B2)+(H2*F2)
8/1/20170.453555986    0.20.80.474136538(G3*B3)+(H3*I2)
9/1/20170.442665891    0.20.80.467842409(G4*B4)+(H4*I3)
10/1/20170    0.20.80.374273927(G5*B5)+(H5*I4)
11/1/20170.75    0.20.80.449419142(G6*B6)+(H6*I5)
12/1/20170    0.20.80.359535313(G7*B7)+(H7*I6)
1/1/20180.411053307    0.20.80.369838912(G8*B8)+(H8*I7)
2/1/20180.914832191    0.20.80.478837568(G9*B9)+(H9*I8)
3/1/20180.719931841    0.20.80.527056422(G10*B10)+(H10*I9)