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.
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 :
Employee | Arrival Date | Departure Date |
A | 2021/01/01 | |
B | 2021/02/01 | 2021/05/01 |
C | 2021/03/01 | 2021/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
Solved! Go to Solution.
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.
Please find same kind of report here
the dax I used for turnover ration is as follows
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.
It works, thank for your help !
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
95 | |
80 | |
68 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |