Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
benz-fsproduce
Frequent Visitor

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 created a table to show all dates. I inserted my graph and my fields. I tried to create a relationship, but when I do it messes up all of my graphs on my other pages, so I'd prefer not to use relationships.

benzfsproduce_0-1658328265313.png

benzfsproduce_1-1658328416395.png

 

1 ACCEPTED SOLUTION
v-yalanwu-msft
Community Support
Community Support

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.

View solution in original post

3 REPLIES 3
v-yalanwu-msft
Community Support
Community Support

Hi, @benz-fsproduce ;

Is your problem solved? If so, kindly mark the proper reply as a solution to help others having the similar issue and close the case. If not, let me know and I'll try to help you further.


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.

v-yalanwu-msft
Community Support
Community Support

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.

Anonymous
Not applicable

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.