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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.