Forum Discussion

VikasD10's avatar
VikasD10
Frequent Visitor
3 years ago

Calculate strike rate

Hello,

I want to calculate strike for each employee .

Employee daily production target is 100.

I have 20 employees in my team, i want to calculate strike for each one( if Employee A worked 20 days in month and out of these two day he didn't do production as there target, then strick rate is =(Total number of working days -number of missed days)/total number of working days

 

2 Replies

  • bhelou's avatar
    bhelou
    Icon for Responsive Resident rankResponsive Resident

    To calculate the strike rate for each employee based on the number of missed days, you can use the following DAX formula in Power BI:

    Strike Rate = (1 - DIVIDE(COUNTROWS(FILTER('Table', 'Table'[Missed Days] > 0)), COUNTROWS(FILTER('Table', 'Table'[Total Days] > 0))))

    Here, 'Table' refers to the name of the table in your data model that contains the employee data.

    Assuming that you have columns named 'Employee', 'Total Days', and 'Missed Days' in your table, the formula works as follows:

    • The COUNTROWS function with a FILTER condition 'Table'[Missed Days] > 0 returns the number of rows in the table where an employee has missed a production day.
    • The COUNTROWS function with a FILTER condition 'Table'[Total Days] > 0 returns the total number of working days for each employee.
    • The DIVIDE function calculates the ratio of the number of missed days to the total number of working days for each employee.
    • Subtracting this ratio from 1 gives you the strike rate.

    You can then use this calculated strike rate field in your Power BI visuals, such as a table or a card, to display the strike rate for each employee.