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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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