Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hello,
I am tasked with making a calculation of what percentage of people has left the company group for each period using the PowerBI. The link to the mock data is as follows: https://docs.google.com/spreadsheets/d/1ZsPW3WywsKEvOK7mcY0MUcXG7nC_kjtcEF1cnPtkkOo/edit?usp=sharing. The HR has agreed to use the following calculation:
Employee turnover = (number of employees leaving the company / ((Total employees at the beginning of the period + Total employees at the end of the period) / 2)) * 100%
While it may seem easy, apparently it got me stuck because of several problems:
I believe this creates duplicates which I need to address by making a separate table with only the Employee Code and Employee Name which then I must link to the data table. However, they want to count employee on problem #2 as 2 separate counts.
What they want to see:
Hi @Anonymous
I have tried to give you the DAX:
Total_Employees_Start =
CALCULATE(
COUNTROWS(EmployeeTable),
FILTER(EmployeeTable, EmployeeTable[StartDate] <= MIN(DateTable[Date]))
)
Total_Employees_End =
CALCULATE(
COUNTROWS(EmployeeTable),
FILTER(EmployeeTable, EmployeeTable[StartDate] <= MAX(DateTable[Date]))
)
Employees_Leaving =
CALCULATE(
COUNTROWS(LeaveEventTable),
FILTER(LeaveEventTable, LeaveEventTable[LeaveDate] >= MIN(DateTable[Date]) && LeaveEventTable[LeaveDate] <= MAX(DateTable[Date]))
)
Turnover_Percentage =
DIVIDE(
[Employees_Leaving],
DIVIDE([Total_Employees_Start] + [Total_Employees_End], 2)
) * 100
Did I answer your question? Mark my post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to drop me a "Kudos" 🙂
Kind Regards,
Poojara
Data Analyst | MSBI Developer | Power BI Consultant
Consider Subscribing my YouTube for Beginners/Advance Concepts: https://youtube.com/@biconcepts?si=04iw9SYI2HN80HKS
Hi @Poojara_D12 ,
Thank you for the prompt response.
Could you please elaborate what do you mean by LeaveEvent table?
Additionally, the formula countrows counts duplicates which i have (as shown on the mock data). I assume you mean distinctcount() instead?
Regards,
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.
User | Count |
---|---|
14 | |
13 | |
11 | |
10 | |
10 |