Forum Discussion

cgallegos's avatar
cgallegos
Regular Visitor
4 years ago
Solved

Headcount over time

Hello, I am needing help calulating employee headcount overtime using hire and term dates. However, some of our employees have both a hire and rehire date. For example:   ID EE Status Hire D...
  • v-zhangti's avatar
    v-zhangti
    4 years ago

    Hi, cgallegos 

     

    You can refer to the following methods.

    Occurence = 
    CALCULATE (
        COUNT ( 'Table'[Action] ),
        FILTER (
            'Table',
            [Name] = EARLIER ( 'Table'[Name] )
                && [Effective Date ] <= EARLIER ( 'Table'[Effective Date ] )
                && [Action] = EARLIER ( 'Table'[Action] )
        )
    )

    Is this the result you expect?  If the method I provided above can't solve your problem, what's your expected result? You can advance a display chart of your desired results or a simple PBIX file for testing.

     

    Best Regards,

    Community Support Team _Charlotte

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.