Reply
Parczynska
New Member
Partially syndicated - Outbound

Attrition Graph ion Power BI

Hello Everybody 🙂 


I am new to Power Bi but tried to build a few report already. 

 

Now i am working on Resource Planning Dashboard and one of the graph that management would like to have is attrition graph. 

The source is table with names of employees their start date; end date; indication if they are active or left, leave reason etc. 

 

I would like to show the attrition and come up with this measure:

 

Attrition = DIVIDE(AVERAGE('EMPLOYEES_ALL'[Left]), ((AVERAGE('EMPLOYEES_ALL'[Active])+(AVERAGE('EMPLOYEES_ALL'[Left]))))*100)
 
In the graph 
 
Attrition looks like in attached picture 
Parczynska_0-1690978632435.png

But what i would like to have should look a little bit different - i would like that everymonth the % would show not a percentege in this particular month but Average attrition from last 12 months. 

COuld you please support what should i do? Maybe i should have some different table in order to do it? 

1 ACCEPTED SOLUTION
avatar user
Anonymous
Not applicable

Syndicated - Outbound

Hi @Parczynska ,

Please have a try.

Create a new table.

AttritionLast12Months =
VAR Last12Months =
    DATESINPERIOD (
        'EMPLOYEES_ALL'[Start Date],
        LASTDATE ( 'EMPLOYEES_ALL'[Start Date] ),
        -12,
        MONTH
    )
RETURN
    ADDCOLUMNS (
        Last12Months,
        "Attrition",
            DIVIDE (
                AVERAGE ( 'EMPLOYEES_ALL'[Left] ),
                ( AVERAGE ( 'EMPLOYEES_ALL'[Active] ) + AVERAGE ( 'EMPLOYEES_ALL'[Left] ) ) * 100
            )
    )

You can use the new table as the data source for the graph and then use the month column as the x-axis and the attrition column as the y-axis. 

 

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

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
Ashish_Mathur
Super User
Super User

Syndicated - Outbound

Hi,

Share the download link of the PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
avatar user
Anonymous
Not applicable

Syndicated - Outbound

Hi @Parczynska ,

Please have a try.

Create a new table.

AttritionLast12Months =
VAR Last12Months =
    DATESINPERIOD (
        'EMPLOYEES_ALL'[Start Date],
        LASTDATE ( 'EMPLOYEES_ALL'[Start Date] ),
        -12,
        MONTH
    )
RETURN
    ADDCOLUMNS (
        Last12Months,
        "Attrition",
            DIVIDE (
                AVERAGE ( 'EMPLOYEES_ALL'[Left] ),
                ( AVERAGE ( 'EMPLOYEES_ALL'[Active] ) + AVERAGE ( 'EMPLOYEES_ALL'[Left] ) ) * 100
            )
    )

You can use the new table as the data source for the graph and then use the month column as the x-axis and the attrition column as the y-axis. 

 

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

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

 

 

 

avatar user

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)