Forum Discussion
Anonymous
3 years agoNot applicable
3 Month Rolling Average Measure
Hello looking for help adding a rolling 3-month average to the below table in power bi. Dummy values in the Rolling Avg 3M column im attempting to populate via a measure. For the retention rate (...
- 3 years ago
Hi, Anonymous
You can try the following methods.
Measure:Rolling Avg 3M = Var _N1=SUMMARIZE(FILTER(ALL('Table'),[Date]<=SELECTEDVALUE('Table'[Date])),[Date],"Sum",SUM('Table'[Value])) Var _N2=TOPN(3,_N1,[Date],DESC) Return DIVIDE(SUMX(_N2,[Sum]),COUNTROWS(_N2))Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-zhangti
Community Support
3 years agoHi, Anonymous
You can try the following methods.
Measure:
Rolling Avg 3M =
Var _N1=SUMMARIZE(FILTER(ALL('Table'),[Date]<=SELECTEDVALUE('Table'[Date])),[Date],"Sum",SUM('Table'[Value]))
Var _N2=TOPN(3,_N1,[Date],DESC)
Return
DIVIDE(SUMX(_N2,[Sum]),COUNTROWS(_N2))
Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
3 years agoNot applicable
Looks great v-zhangti Thank you for taking the time to help, its much appreciated.