Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
I'm trying to create a rolling/moving average of a measure that is being calculated elsewhere.
This is a matrix I have set up of the items in question. The first column Shipped Count is a count (from one table), Direct_Hrs is just a sum (from a second table), and UnitsPerHour is calculated by dividing the two. The date is from a Date Table.
UnitsPerHour = 
Divide('Table1'[Shipped Count], [Direct_Hrs])
I would like to create a moving average of the previous 6 months UnitsPerHour. I've tried a few different calculations but can't get it to work. I could do it in Excel pretty easily but I can't figure out DAX coding to do it. Any advice?
Solved! Go to Solution.
Hi,
You may download my PBI file from here.
Hope this helps.
Hi,
Please share the PBI file and also show the expected result very clearly.
Alright, I created a quick and dirty sample dataset to show what my report is doing.
Here is a link to the PBI file
Basically, what I want to do is create a moving/rolling average of the UnitsPerHour column. I made a mock-up in Excel to show what I mean:
Units Per Hour is a calculated measure based on the two tables in the report.
UnitsPerHour = 
Divide(RMA[Shipped Count], SUM(Labor[Labor Hrs]))
Hi,
You may download my PBI file from here.
Hope this helps.
That works perfectly thank you! So simple haha
You are welcome.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.