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! Learn more

Reply
Anonymous
Not applicable

4 week moving average

Hello,

 

I am new to Power BI. And I am trying to create a column with a 4 week moving average. I have been reading other posts about the topic, which hasnt been perfectly helpful, but I tried putting it all together. However, I will either get an error in my new column, or like in the picture, I just end up replicating the orginal values from the Weekly Data column. My ReCreate column is trying to reproduce the same values that are in the 4weekMA column, which is caluculations I did from my excel of the Weekly Data and is correct. In the screenshot, the for 4 rows don't need to have a 4 week moving average, because it wont, so I crossed them out. The data after that in the ReCreate column should match the same numbers in 4weekMA column, and those numbers are just the 4 week moving average of the Weekly Data. This was meant to be a simple exercise for me, but it's proven to be difficult. 

 

I will appreciate any help on the matter. I must be overlooking something simple or leaving out some more code. I feel like I am close to my goal. Also, I have been having trouble doing a year-over-year column as well. 

 

4MApic.PNG

1 ACCEPTED SOLUTION
2 REPLIES 2
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Anonymous ,

Have you solved your problem?

If you have solved your problem, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.

If you still need help, please show your sample data in text-tabular format in addition to (or instead of)  screen captures. That allows people trying to help to readily copy the data and run a quick test, plus it increases the likelihood of your question being answered. Just use 'Copy table' in Power BI and paste it here. Or, ideally, share the pbix (beware of confidential data).

Best Regards

Cherry

 

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.

Top Solution Authors