Forum Discussion

benz-fsproduce's avatar
benz-fsproduce
Frequent Visitor
4 years ago
Solved

Employee New Hire

Hi I am trying to calculate new employee hires monthly. I have hire date, term date, and employee name. I tried a bunch of different formulas for new hires, but I cannot seem to get it. I also create...
  • v-yalanwu-msft's avatar
    4 years ago

    Hi, benz-fsproduce ;

    Try it.

    newemploy =
    VAR _old =
        SUMMARIZE (
            FILTER (
                ALL ( 'page' ),
                EOMONTH ( [Last Hire Date], 0 ) < EOMONTH ( MAX ( 'Date'[Date] ), 0 )
            ),
            [Employee ID]
        )
    VAR _new =
        SUMMARIZE (
            FILTER (
                ALL ( 'page' ),
                EOMONTH ( [Last Hire Date], 0 ) = EOMONTH ( MAX ( 'Date'[Date] ), 0 )
            ),
            [Employee ID]
        )
    RETURN
        COUNTROWS ( EXCEPT ( _new, _old ) )
    

    If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

    How to upload PBI in Community


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