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
Jersey
New Member

Listing Employees Onboarding Offboarding the next 90 Days

Hi,

I have a problem with Power BI and hope that someone can help me solve it...

 

I have a table containing employee history, where the same resource can have multiple rows due to position changes etc. Each row has a start and end date.

 

IMG_0378.jpeg

 

What I want to show is a list of employees that will be onboarded or offboardes the next  90 days. I could have just filtered on start date/end date in the next 90 days. However, my problem is that I'll then have Employee # 000005 om both in the onboarding and off boarding list. I only want new (or returning employees that hasn't been employed the last 30 days) in the onboarding list and only employees who are actually leaving the company in the offboardinf list. 

So the result I'm looking for is:

IMG_0379.jpeg


Does anyone know how to solve this issue?

 

2 REPLIES 2
amitchandak
Super User
Super User

@Jersey , make sure you have a common date table join to both the dates. bith joins can be inactive or one active. You can use userelationship to switch dates

 

Hired Employee = CALCULATE(COUNT(Employee[Employee Id ]),USERELATIONSHIP(Employee[Start Date],'Date'[Date]) )

 

Terminated Employees = CALCULATE(COUNT(Employee[Employee Id ]),USERELATIONSHIP(Employee[End Date],'Date'[Date]),not(ISBLANK(Employee[End Date])))

 

For the next 90 Days measure the example

 

Rolling 90 hire= CALCULATE([Hired Employee],DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),90,DAY))

 

Rolling 90 Terminated = CALCULATE([Terminated Employee],DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),90,DAY))

 

Power BI: HR Analytics - Employees as on Date : https://youtu.be/e6Y-l_JtCq4
https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...

Thanks @amitchandak, but I don't think it would solve my issue.
Your suggestion would give me the number of persons onboarding the next 90 days right? I'm interested in getting the list of names (Employee #) who will be onboarded/offboarded the next 90 days, not the number of people.

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.