Forum Discussion

AlperenA's avatar
AlperenA
Regular Visitor
2 years ago
Solved

Calculate Employee Capacity

Hello, I need to calculate employee capacity. For this, I have a calendar table and an employee table. My employee table includes hire and termination dates. In my calendar table, I have marked w...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi AlperenA ,

    You can create a calculated column in Employee table as below to get it, please find the details in the attachment.

    Work Days = 
    CALCULATE (
        COUNT ( 'Date'[Date] ),
        FILTER (
            'Date',
            'Date'[Work Day] = 1
                && 'Employee'[Hire Date] <= 'Date'[Date]
                && IF (
                    ISBLANK ( 'Employee'[Termination Date] ),
                    TODAY (),
                    'Employee'[Termination Date]
                ) >= 'Date'[Date]
        )
    )

    Best Regards