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

Non-Weighted Running Average

Hello friends.

I have a Fact table of sales with Price and Cost = Profit

I have a disconnected Date Table.

I have a calculated AverageProfit Measure that for any given filter calculates the Average Profit for all the transactions.

I need to build a Non-Weighted 6 months Running Average that for any chosen Month (from disconnected Date Table) will calculate the simple average of the AverageProfits of the 6 preceding months.

Let's say AverageProfit for: January - 20%, Feb - 30% Mar - 40% Apr - 35% May - 25% June - 30%

I need the new measure to show 30% for June, notwithstanding the number of sales in each month.

Thank you!

Michael

1 ACCEPTED SOLUTION
GilbertQ
Super User
Super User

Hi @Anonymous

 

I am going to assume that you have got a date in your Fact table?

 

If you do, and you have got the May version of Power BI Desktop you can then right click on your Fact table and select Quick measures.

 

One of the options is shown below to create a Rolling Average as you require.

 

A-PBI Community.png

 

Once this is created, you can then see the DAX formula which you can then use going forward.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

View solution in original post

1 REPLY 1
GilbertQ
Super User
Super User

Hi @Anonymous

 

I am going to assume that you have got a date in your Fact table?

 

If you do, and you have got the May version of Power BI Desktop you can then right click on your Fact table and select Quick measures.

 

One of the options is shown below to create a Rolling Average as you require.

 

A-PBI Community.png

 

Once this is created, you can then see the DAX formula which you can then use going forward.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

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.