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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Egemeny
Frequent Visitor

Calculated Column for New Employee

Hi everyone,

 

I would like to create a reporting that shows new employees per month. For that I would like to have a calculated column that works out the 'New Employee' value and returns as '1' if the same employee number doesn not exist in the prior period.

 

Example: 1525 and 1526 return as '1' for 01/12/2019 as these employee code did not exist for 01/11/2019.

 

My challenge is,  mydataset has seperate calender table and employee data table and following DAX did not work.

I believe i need to create a connection.

 

New Employee =
VAR temp =
    FILTER (
        Table1,
        Table1[Employee Number] = EARLIER ( Table1[Employee Number] )
            && Table1[Period] < EARLIER ( Table1[Period] )
    )
RETURN
    IF ( COUNTROWS ( temp ) > 0, 0, 1 )

 

Your help really appreaciated and you can see the example pbix file here.

 

Thanks!

2 REPLIES 2
Thim
Resolver V
Resolver V

Just to make sure I understand the result you want.

 

If an emploee starts on the 02/11-2019, then they should be regarded as new for December 2019?

What if they start on the 31/11-2019?

 

Thank you in advance. 🙂

Egemeny
Frequent Visitor

Hey @Thim ,

thank you for your response and good question. 🙂

 

The result that i would like to see is all employees started a calender month before can be return as 1. 🙂

 

I hope it's clearer and thank you in advance.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.