Forum Discussion
Rolling 12 Month Average for Injuries
- 6 years ago
Hi,
sry for delay, busy times.
Here is the code:
TRIR-Rolling = CALCULATE ( DIVIDE ( CALCULATE(COUNT ( INJ[Incident Type] ); 'INJ'[Incident Type] IN { "Recordable Injury" }) * 200000; SUM ( 'Hours'[Hours] )) ; DATESINPERIOD ( 'Date Table'[Date]; LASTDATE ( 'Date Table'[date] ); -12; MONTH ) )As seen here:
File is here (ps. added some measures for validation).
Hope this works for you, is so pls mark as solution.
Kind regards, Steve.
stevedep Just checking back in with this to see if anyone had a chance to try and figure this out? I worked through the weekend on it and am no further than I was before. It's showing the same exact error in the sample I provided as well as the real dataset. Any help is greatly appreciated.
Hi, was busy, but will look today for sure.
- stevedep6 years ago
Memorable Member
Hi,
sry for delay, busy times.
Here is the code:
TRIR-Rolling = CALCULATE ( DIVIDE ( CALCULATE(COUNT ( INJ[Incident Type] ); 'INJ'[Incident Type] IN { "Recordable Injury" }) * 200000; SUM ( 'Hours'[Hours] )) ; DATESINPERIOD ( 'Date Table'[Date]; LASTDATE ( 'Date Table'[date] ); -12; MONTH ) )As seen here:
File is here (ps. added some measures for validation).
Hope this works for you, is so pls mark as solution.
Kind regards, Steve.
- sfalk7816 years ago
Helper II
Steve - fantastic! It works and I would have never figured it out without your help.
- kkureska2 years agoNew Member
Hello Steve
I ran across your post for calculating 12 month rolling for TRIR, but cannot open the file. Is there anyway you can send it differently with the columns and formulas. I am not an expert on excel
Thank you
- mguidry52 years agoNew Member
How did you tie the injury table and the hours table together using the "Site" column? This would be a many-many relationship, and it won't let me establish this with both the hours and injuries tables having relationships to the Date Table.
Right now, my version of this is summing ALL the hours and injuries, regardless of site.