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

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
Hickling
Helper I
Helper I

Rolling calculation measure using countrows

Hi team, long time lurker first time poster. Have a question that has me beat, hoping you can help.

 

My data doesn't involve figures, but rather rows of safety incident details. Most of my measures involve using countrows calculations to track incident rates for the month based on certain parameters.

 

One of these is injury details, where I use a measure count of serious injuries for each department each month, divided by the number of hours worked in a different table, multiplied by 1,000,000 to create a frequency rate which I graph over a 12 month period. I have a separate dedicated date table that I use for the months.

 

However, as well as the monthly rate, I need a 12 month rolling rate that takes each month point on the graph and does a count of the previous 12 months injuries, which I can then divide by the sum of the previous 12 months hours.

 

So for example the point on the graph for April 2019 would be using the totals of May18 to Apr19, then March 2019 would use the totals of Apr18 to Mar19, and so on backwards. It's the last 12 month thing that's got me stumped.

1 REPLY 1
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @Hickling ,

 

Please illustrate your requirement with sample data and expected result.

How to Get Your Question Answered Quickly

 

Best regards,

Yuliana Gu

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

Helpful resources

Announcements
Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors