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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
ORS1237
New Member

Moving Average

Hello all,

 

I'm new to Power BI and have a query on some data analysis I'd like to perform. Any help would be much appreciated:

 

I have a table of sales data which details sales at item level. Two of the columns are 'date' and 'item category'. My objective if to identify when particular customers aren't buying a particluar item category by identifying the moving average of monthly sales by category, and looking at customers whose current month's sales (by category) are below this moving average.

 

Acheiving this resutl in excel required creating a pivot table so summarise sales per month and then calculating a moving average of the resuls. I'm unsure how I would go about this in Power BI desktop.

 

Thanks,

 

Oliver

1 ACCEPTED SOLUTION
v-lili6-msft
Community Support
Community Support

HI,@ORS1237

      You can try to use built-in function of Power Query to create a pivot table 

1.PNG

you can also use  DAX to add a calculate Moving Average measure

Reference:https://www.sqlbi.com/articles/rolling-12-months-average-in-dax/

 

Best Regards,

Lin

Community Support Team _ Lin
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-lili6-msft
Community Support
Community Support

HI,@ORS1237

      You can try to use built-in function of Power Query to create a pivot table 

1.PNG

you can also use  DAX to add a calculate Moving Average measure

Reference:https://www.sqlbi.com/articles/rolling-12-months-average-in-dax/

 

Best Regards,

Lin

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

Thanks you for your help Lin.

 

ORS1237

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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