Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not 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 (rr) is 50 for feb as seen below, so the Rolling Average should show 50. 

The next month march is 60, so the Rolling Average should show 50+60/2 = 55

Then apr which is 70,  so the Rolling Average should show 50+60+70/2 = 60

Once we move into May, then the rolling average should do March/Apr/May, and so on. 

twiles_2-1675919738750.png

table name rrate

1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

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))

vzhangti_0-1676267706118.png

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.

 

View solution in original post

2 REPLIES 2
v-zhangti
Community Support
Community Support

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))

vzhangti_0-1676267706118.png

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
Not applicable

Looks great @v-zhangti Thank you for taking the time to help, its much appreciated. 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.