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
alushchyk
Frequent Visitor

Need help with headcount transition between companies

Ho all,

fairly new to PBI, so scratching my head how to approach the following.

I have list of employees, with employees statistics - i.e. date of hire, date when left and transtion date (whenever employee changed position, department or company inside of a group). For each employee I have a unique id code, and for each employee moevement within the group we have a separate line in excel datasource.  See example below:

CompanyEmployee codeEmployee nameEmployee last nameHire dateLast dateTransition dateTransition ID
A112JohnDoe1/12020   
A112JohnDoe  1/12/20211001
A112JohnDoe  6/30/20211002
A112JohnDoe 5/16/2023  
B112JohnDoe  1/12/20212002
B112JohnDoe  6/30/20212001

We also have a separate table for movement IDs

Transition IDTransition reason
1001moved out company A
1002moved in company A
1003moved to part-time
1004moved between departments
2001moved out company B
2002moved in company B
2003moved to part-time
2004moved between departments
1 REPLY 1
alushchyk
Frequent Visitor

List of employees is connected with automatic calendar, and table with transition IDs in PBI.

Calendar and list of employees have indirect connections.

 

Q: how to create a mesaure to reflect quanity of total headcount and quantity of headcount that was transitioned in a given period?

 

For a regular measure, when I need to count headcount based on hire and last date, I have the following: 

Count of employees = COUNTROWS ( VALUES ( Employees_Total[Employee key]))
 
Headcount = CALCULATE([Count of employees], filter(Employees_Total, (Employees_Total[Employment date]<= MAX('Calendar'[Date]) && Employees_Total[Termination date] > MAX('Calendar'[Date]) || (Employees_Total[Employment date]<= MAX('Calendar'[Date]) && isblank(Employees_Total[Termination date])))))
 
but these measures do not include any transaitions between companies nad dates of those transitions

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.