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
patri0t82
Post Patron
Post Patron

Creating a Measure - RIF based on Injury Counts and Hours

Hello, there is a metric in the world of industry called RIF (Recordable Injury Frequency), which is the count of injuries * 200,000 divided by the sum of workforce hours for the same particular period.

 

I would like to create a measure that (based on selections), will calculate the RIF.

 

I have two tables in the attached file. 'Recordable' and 'Hours'. I would like to be able to find the RIF for any particular operating area based on injuries that include "Lost Time", "Medical Aid", "Modified Duty" and "Fatality".

 

As a side request, I will also be attempting to combine some companies (for example, Group1 and Group2 will be called TeamA) and I would like to find their RIF as well.

 

Any help with this would be most appreciated.

 

https://drive.google.com/file/d/149AdW0is2UngroFM0kfXpFQ2wznEf4sJ/view?usp=sharing 

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

HI @patri0t82,

You can try to use the following measure expression if it meets your requirement:

 

Measure = 
VAR summary =
    SUMMARIZE (
        Hours,
        [Month / Year],
        [Operating Area],
        "workhour", SUM ( Hours[Hours] ),
        "injury",
            CALCULATE (
                COUNT ( Recordable[Recordable Injury] ),
                FILTER (
                    ALLSELECTED ( Recordable ),
                    Recordable[Recordable Injury] <> ""
                        && Recordable[Incident Date] = EARLIER ( Hours[Month / Year] )
                        && Recordable[Operating Area] = EARLIER ( Hours[Operating Area] )
                )
            )
    )
RETURN
    AVERAGEX ( summary, DIVIDE ( [injury] * 200000, [workhour] ) )

 

4.png

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

2 REPLIES 2
v-shex-msft
Community Support
Community Support

HI @patri0t82,

You can try to use the following measure expression if it meets your requirement:

 

Measure = 
VAR summary =
    SUMMARIZE (
        Hours,
        [Month / Year],
        [Operating Area],
        "workhour", SUM ( Hours[Hours] ),
        "injury",
            CALCULATE (
                COUNT ( Recordable[Recordable Injury] ),
                FILTER (
                    ALLSELECTED ( Recordable ),
                    Recordable[Recordable Injury] <> ""
                        && Recordable[Incident Date] = EARLIER ( Hours[Month / Year] )
                        && Recordable[Operating Area] = EARLIER ( Hours[Operating Area] )
                )
            )
    )
RETURN
    AVERAGEX ( summary, DIVIDE ( [injury] * 200000, [workhour] ) )

 

4.png

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

I'm so sorry I didn't get back to you sooner. Thank you very much for the solution, it's accomplishing what I hoped it would.

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.