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
Anonymous
Not applicable

Employee turnover

Hello,

 

I want to calculate the number of employees starting and leaving each month.

Employees can start new at the company or starting at another region, team or unit within a company, same for leaving.

A unit is part of a team, a team is part of a region and a region is a part of the company.

Employees can start or leave at one or several units at the same time, same for leaving.

 

I have a table with a row per employee, day and unit. The employee doesn't excist on a day if there is no active employment.

Attatched a example of the table I have got.

I think the solution must be something like searching for a row per employee, per unit, per day one day ealier or later. When this doesn't exists there must be a count.

 

I hope the example works and the question is clear.

 

Luuk

 

2 REPLIES 2
v-xicai
Community Support
Community Support

Hi @Anonymous ,

 

I am not sure what desired result would you want, could you please share your desired output screenshots for further analysis? You can also upload sample pbix to OneDrive and post the link here. Do mask sensitive data before uploading.

 

Please read this post to get your answer quickly: How to Get Your Question Answered Quickly.

 

Best Regards,

Amy

Anonymous
Not applicable

Hi @v-xicai 

 

Thank you for your answer.

 

I added a tab with the desired output.

 

For example employee 9236064:

Exists for the first time on 2019-04-20, so starting at Company, Region, Team and Unit in the month april.

On may 31th this employee moves to another Unit and Team but within the same Region. So in may this employee will be counted as a leaver for the Team 20030 and Unit 23803. This employee will be counted as a starter in june for the Team 20310 and Unit 20044. On Region and Company level there are no changes for this employee. Exists for the last time on 2019-08-10, so starting at Company, Region, Team and Unit in the month april.

 

Probably I am searching for an DAX query which counts on Unit, Employee and Date level whether a row exists a day earlier or later.

 

Luuk

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.