The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi Wonderful People,
I need help creating a rolling Turnover % Calculation for our HR Team.
For Each Year and Month,
The average number of Active Staff we had for each year, And the Total Terminations for Each Year, So I can use these two variables, to calculate the Turnover %.
This way, i can use a line chart with Year-Month & the Turnover % and Drill down by Division.
I have Three Tables modelled below.
1.) Employee Data Table = Employee ID | Hire Date | Termination Date | Division. (this table has all employees for the past 8 Years)
2.) Date Table 1 = Connected to Hire Date
3.) Date Table 2 = Connected to Termination Date.
My current Rolling Head Count Calculation= This calculation appears to be correct.
"
If the Employee is not Terminated- I fill in the Blank Term Date with a Static Date of 01/01/2050.
All Terminations Calculation = This Calculation is correct when i validate.
"
What do you think would be the best approach to this.
I think it would be best to create a Custom Table, for each Year/Month, with Total Staff at End of Year, and Total Terminations at End of Year, then add a calculated column from there to determine the Turnover %.
But i do not know how to do this 😞
Thank you
Solved! Go to Solution.
Hi @HRAnaly123
Based on your description, I think your calculations are correct. You've calculated your annual and monthly rolling headcount and termination totals. To calculate turnover, simply divide the total number of terminations by the number of rolling heads and multiply by 100.
You can create a custom table using the DAX function SUMMARIZE. This function allows you to group your data by year and month, and apply calculations to each group. For example, you can use this formula to create a custom table with the rolling head count, total terminations, and turnover % for each year and month:
CustomTable =
SUMMARIZE(
ADP_CurrentActive,
DATETABLE_DIM[Year],
DATETABLE_DIM[Month],
"Rolling Head Count", [Rolling Head Count Calculation],
"Total Terminations", [All Terminations Calculation],
"Turnover %", DIVIDE([Total Terminations], [Rolling Head Count], 0) * 100
)
You can then use this custom table to create a line chart with Year-Month on the x-axis and Turnover % on the y-axis. You can also add a slicer or a filter to drill down by Division.
If you're still having problems, provide some dummy data and the desired outcome. It is best presented in the form of a table.
Regards,
Nono Chen
If this post helps, then please considerAccept it as the solution to help the other members find it more quickly.
Hi @HRAnaly123
Based on your description, I think your calculations are correct. You've calculated your annual and monthly rolling headcount and termination totals. To calculate turnover, simply divide the total number of terminations by the number of rolling heads and multiply by 100.
You can create a custom table using the DAX function SUMMARIZE. This function allows you to group your data by year and month, and apply calculations to each group. For example, you can use this formula to create a custom table with the rolling head count, total terminations, and turnover % for each year and month:
CustomTable =
SUMMARIZE(
ADP_CurrentActive,
DATETABLE_DIM[Year],
DATETABLE_DIM[Month],
"Rolling Head Count", [Rolling Head Count Calculation],
"Total Terminations", [All Terminations Calculation],
"Turnover %", DIVIDE([Total Terminations], [Rolling Head Count], 0) * 100
)
You can then use this custom table to create a line chart with Year-Month on the x-axis and Turnover % on the y-axis. You can also add a slicer or a filter to drill down by Division.
If you're still having problems, provide some dummy data and the desired outcome. It is best presented in the form of a table.
Regards,
Nono Chen
If this post helps, then please considerAccept it as the solution to help the other members find it more quickly.
I would like to help but I'm a little unclear about your requirements.
Can you show the following?
1) Please provide sample data that covers your issue or question completely.
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
2) Please show the expected outcome based on the sample data you provided.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
3) Please explain how you would expect to get from step 1 to 2.
4) If possible, please show your past attempts at a solution.
I hope this helps.
RandEMPCode Hire Date Termination Date
I have written three measures
User | Count |
---|---|
15 | |
8 | |
6 | |
6 | |
6 |
User | Count |
---|---|
24 | |
14 | |
13 | |
8 | |
8 |