Forum Discussion

diederd's avatar
diederd
Helper II
6 years ago
Solved

Employee turnover/total headcount

Hello.     I have recently received a request in which our HR Dept would like to have a report displaying the following:   - total employees/head count for a date period (broken down by year) -...
  • v-lid-msft's avatar
    6 years ago

    Hi diederd ,

     

    We can create a measure using following formula to meet your requirement:

     

    HeadCount = 
    COUNTROWS (
        DISTINCT (
            SELECTCOLUMNS (
                FILTER (
                    'Table',
                    OR (
                        AND (
                            'Table'[End Date] >= MAX ( 'calendar'[Date] ),
                            'Table'[Start Date] <= MIN ( 'calendar'[Date] )
                        ),
                        AND ( ISBLANK ( 'Table'[End Date] ), [Start Date] <= MIN ( 'calendar'[Date] ) )
                    )
                ),
                "Name", [Name]
            )
        )
    )

     

    If it doesn't meet your requirement, kindly share your sample data and expected result to me if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.

     


    BTW, pbix as attached.

     

    Best regards,

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