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

Employee Turnover by month

Hi all,

 

I'm trying to have the turnover of employee by month (number of arrival - number of departure).

I have two columns : Arrival date and Departure date (note that this column is empty if the employee is still here).

I want to create a measure to have the difference between number of arrival and number of departure.

Exemple :

 

EmployeeArrival DateDeparture Date
A2021/01/01 
B2021/02/012021/05/01
C2021/03/012021/07/01

 

My measure should get me : 

- January : 1

- February : 1

- March : 1

- April : 0

- May : -1

- June : 0

- July : -1

 

Can someone help me?

 

Thank you in advance

1 ACCEPTED SOLUTION
selimovd
Super User
Super User

Hey @ADN75 ,

 

you should create a date table and connect it with one of the dates, for example Arrival Date. Then you can use the month from the date table and just count the rows of arrival to get the first measure.

 

For the second measure (departure), you have to change the relationship in the measure with the USERELATIONSHIP function, count the rows and mulitply by -1.

Then you should have the result you want.

 

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

View solution in original post

3 REPLIES 3
Ahammedjaleel
Frequent Visitor

 

Please find same kind of report here

 

https://www.linkedin.com/posts/ahammed-jaleel-33772b5b_employee-performance-and-attrition-analysis-a...

 

the dax I used for turnover ration is as follows

Employee Turnover Ratio =
Var _Selectedvalue = [SelectedYear]
var _Lastyearcount = CALCULATE(COUNT(HRDataset_Final[EmpID]),HRDataset_Final[DateofHire - Year]<=_Selectedvalue-1)
var _CurrentYearCount = CALCULATE(COUNT(HRDataset_Final[EmpID]),HRDataset_Final[DateofHire - Year] <=_Selectedvalue)
var _ResignedEmployee = CALCULATE([Employees Terminated],FILTER(HRDataset_Final,HRDataset_Final [DateofHire - Year]=_Selectedvalue))
var _Avg= DIVIDE(_Lastyearcount+_CurrentYearCount,2,0)
RETURN
DIVIDE(_ResignedEmployee,_Avg,0)
let me know if you need any more  details
selimovd
Super User
Super User

Hey @ADN75 ,

 

you should create a date table and connect it with one of the dates, for example Arrival Date. Then you can use the month from the date table and just count the rows of arrival to get the first measure.

 

For the second measure (departure), you have to change the relationship in the measure with the USERELATIONSHIP function, count the rows and mulitply by -1.

Then you should have the result you want.

 

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

It works, thank for your help !

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.