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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.

Reply
meierli
Helper I
Helper I

Calculate 3 Months Moving Average

I would like to calculat 3 months moving average,

 

The month in my Power Pivot are across and not down.

 

In the data model I have created a date table.

 

Any suggestions would be great.

 

UNFORTUNATLY I can't upload/downlad anything from my work PC.

 

 

 

meierli_0-1714502485514.png

meierli_1-1714502549673.png

 

 

 

5 REPLIES 5
meierli
Helper I
Helper I

Asmentioned in the beginning I dont use Power BI nor can I upload and download anything.

 

I figured it out yesterday.

Anonymous
Not applicable

Hi, @meierli 

Thank you very much for your reply. The above is a reference to the DAX expression for calculating the 3-month moving average. Have you solved the current problem? Can you share your solution so that others in the community can quickly find a solution if they encounter a similar problem? 

 

Best Regards

Jianpeng Li

meierli
Helper I
Helper I

Thanks for your reply, but I am not working with Power BI. I am working with Power Pivot in excel.

Anonymous
Not applicable

Hi, @meierli 

Thanks for your reply. You can achieve the effect of a 3-month moving average using the following DAX expression:

3 Month average = 
AVERAGEX(
    DATESINPERIOD(
        'Calender'[Date],
        MAX('Calender'[Date]),
        -3,
        MONTH
    ),
    [Sales amount]
)
    

Here are the results:

vjianpengmsft_0-1714619763120.png

The table on the left is the 3-month moving average that I replied to using the visualization in my previous reply, and the table on the right is the result of the DAX expression created above.

 

 

How to Get Your Question Answered Quickly

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

Best Regards

Jianpeng Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Hi, @meierli 

According to your description, if you want to create a 3-month moving average, you can follow the steps below, here I take sales amount as an example, I have the following two tables, the relationship is shown in the figure below:

vjianpengmsft_0-1714529826522.png

I created a sales amount metric using the following DAX expression, which I need to calculate the 3-month moving average.

Sales amount = SUM(financials[ Sales]) 

 I put the year, month, and sales amount metrics of the date table into the table is visual.

vjianpengmsft_1-1714530036057.png

Right-click on the table visual and create a visual calculation:

vjianpengmsft_2-1714530099538.png

Enter the following DAX expression:

average month line = MOVINGAVERAGE([Sales amount],3,FALSE)

 

vjianpengmsft_3-1714530204482.png

Here are the results:

vjianpengmsft_4-1714530270334.png

If you want to create this moving average on the line chart, this moving average is also a type step.

vjianpengmsft_5-1714530393766.png

 

 

 

 

How to Get Your Question Answered Quickly

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

Best Regards

Jianpeng Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Helpful resources

Announcements
May PBI 25 Carousel

Power BI Monthly Update - May 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

May 2025 Monthly Update

Fabric Community Update - May 2025

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

Top Solution Authors