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
Anonymous
Not applicable

Employee Turnover by Fiscal Year

Hi all,

 

I'm trying to create a power bi report that monitors the organisations employee turnover rate. The Turnover calculation I'm using is below.

 

No of Leavers Divided by

 

(Headcount Start of Fiscal Year / Headcount End(or latest Period) of Fiscal Year) / 2

 

I've enclosed a spreadsheet with 2 tabs that I hope will explain what I am trying to achieve. Hopefully it makes sense.

 

Spreadsheet containing the Data table==> https://drive.google.com/drive/folders/14bJJqeIeLiB-jNcyWIcdbpIdDCI92PQI?usp=sharing

 

Tab 1 - The sample of Data

Tab 2 - The desired output.

 

I hope someone can help

 

Thanks in advance.

 

1 ACCEPTED SOLUTION
v-frfei-msft
Community Support
Community Support

Hi @Anonymous,

 

Please check the following steps as below.

 

1. Create a date table and create two calculated column in it. Then create relationship between it and the fact table.

 

Table = CALENDARAUTO()
YearMonth = YEAR('Table'[Date])*100+MONTH('Table'[Date])
Year = YEAR('Table'[Date])

2. Create the measures as below.

 

Monthly Turnover = 
VAR SOM =
    CALCULATE ( SUM ( Data[HeadcountStartofMonth] ) )
VAR EOM =
    CALCULATE ( SUM ( Data[HeadCountEndofMonth] ) )
VAR Leav =
    CALCULATE ( SUM ( Data[LeaverinMonth] ) )
VAR result = Leav
    / ( ( SOM + EOM )
    / 2 )
RETURN
    IF ( ISBLANK ( result ), BLANK (), result )
Rolling YTD Turnover = 
IF (
    ISBLANK ( [Monthly Turnover] ),
    BLANK (),
    CALCULATE (
        SUMX (
            FILTER ( ALLSELECTED ( 'Table' ), 'Table'[YearMonth] <= MAX ( 'Table'[YearMonth] ) ),
            [Monthly Turnover]
        ),
        VALUES ( 'Table'[Year] )
    )
)

3. Then we can get the result as below.

Capture.PNG

 

For more details, please check the pbix as attached.

 

Regards,

Frank

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

2 REPLIES 2
v-frfei-msft
Community Support
Community Support

Hi @Anonymous,

 

Please check the following steps as below.

 

1. Create a date table and create two calculated column in it. Then create relationship between it and the fact table.

 

Table = CALENDARAUTO()
YearMonth = YEAR('Table'[Date])*100+MONTH('Table'[Date])
Year = YEAR('Table'[Date])

2. Create the measures as below.

 

Monthly Turnover = 
VAR SOM =
    CALCULATE ( SUM ( Data[HeadcountStartofMonth] ) )
VAR EOM =
    CALCULATE ( SUM ( Data[HeadCountEndofMonth] ) )
VAR Leav =
    CALCULATE ( SUM ( Data[LeaverinMonth] ) )
VAR result = Leav
    / ( ( SOM + EOM )
    / 2 )
RETURN
    IF ( ISBLANK ( result ), BLANK (), result )
Rolling YTD Turnover = 
IF (
    ISBLANK ( [Monthly Turnover] ),
    BLANK (),
    CALCULATE (
        SUMX (
            FILTER ( ALLSELECTED ( 'Table' ), 'Table'[YearMonth] <= MAX ( 'Table'[YearMonth] ) ),
            [Monthly Turnover]
        ),
        VALUES ( 'Table'[Year] )
    )
)

3. Then we can get the result as below.

Capture.PNG

 

For more details, please check the pbix as attached.

 

Regards,

Frank

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
Anonymous
Not applicable

Thank you very much - I tweaked the formula to account for Fiscal year - but it works well.

 

Thanks Again

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.