Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

% Staff Turnover Measure

Hi there,

 

I am still fairly new to Power BI. Whilst I am now more familar with how to calculate Monthly Staff Turnover and YTD Staff Turnover. I am not sure how to work out the number of employees at the beginning of the month and end of the month to be able to input these values into the staff turnover formula.

 

I have two tables:

1. Current Staff Data

2. Leaver Staff Data 

 

Both tables are the exact same structure (leaver data is simply a cut and paste of the employee entry in the current staff data) - one represents leavers and one represents currently hired staff. The only difference is the Leavers Table contains an Actual Post End Date column.

 

The data looks like this (with all identifying information removed):

1. Current Staff Data

Employee NoDomainTeamCurrent Post End Date 
11004439SASStrategy, Architecture and Support/Strategy and Architecture/Business Analysis  
2153456PASMProduct and Service Mgmt/Service Operations/Deskside Support  
9402751ENGEngineering/Infrastructure/Datacentres  
10095216PASMProduct and Service Mgmt/Service Operations/Deskside Support01/03/2022 
11182695PASMProduct and Service Mgmt/Service Operations/Support Centre16/07/2022 
10283718ENGEngineering/Platforms and Innovation/CRM29/07/2022 
10990597PASMProduct and Service Mgmt/Service Operations/Support Centre31/08/2022 
10227025ENGEngineering/Infrastructure/Datacentres  
10798077RITResearch IT/Research Lifecycle Programme  

 

2. Leaver Staff Data

Employee NoDomainTeamCurrent Post End DateActual Post End Date
10318971ODITIT Supplier Management01/01/202201/01/2022
10765145ODITProject Management/PMO03/01/202203/01/2022
5189438TIONetworks and Security/Networks16/01/202216/01/2022
10615129ODITMarketing and Comms26/01/202226/01/2022
9248303SIAMService Delivery/Service Delivery Management03/02/202203/02/2022
7473469ODITProject Management/PMO16/03/202216/03/2022
9840817SDATesting31/03/202231/03/2022
10864015SIAMService Operations/Deskside Support31/03/202231/03/2022
10525288SDATesting05/04/202205/04/2022

 

Any advice would be greatly appreciated! Thank you.

1 ACCEPTED SOLUTION
v-henryk-mstf
Community Support
Community Support

Hi @Anonymous ,

 

There seems to be something wrong with the data you gave.

vhenrykmstf_0-1658394274569.png

 

If you want to count the number of employees from the beginning to the end of the month, you can try the following formula.

last_mount =
VAR selectedDate =
    LASTDATE ( 'Date'[Date] )
VAR selectedDateMonthsBefore =
    NEXTDAY ( DATEADD ( selectedDate, -1, MONTH ) )
RETURN
    SUMX (
        'Employees',
        IF (
            [End Date] >= selectedDateMonthsBefore
                && [End Date] <= selectedDate,
            1,
            0
        )
    )

 

related link


If the problem is still not resolved, please provide detailed error information and test data. Looking forward to your reply.


Best Regards,
Henry


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Thank you! This worked. 

v-henryk-mstf
Community Support
Community Support

Hi @Anonymous ,

 

There seems to be something wrong with the data you gave.

vhenrykmstf_0-1658394274569.png

 

If you want to count the number of employees from the beginning to the end of the month, you can try the following formula.

last_mount =
VAR selectedDate =
    LASTDATE ( 'Date'[Date] )
VAR selectedDateMonthsBefore =
    NEXTDAY ( DATEADD ( selectedDate, -1, MONTH ) )
RETURN
    SUMX (
        'Employees',
        IF (
            [End Date] >= selectedDateMonthsBefore
                && [End Date] <= selectedDate,
            1,
            0
        )
    )

 

related link


If the problem is still not resolved, please provide detailed error information and test data. Looking forward to your reply.


Best Regards,
Henry


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.