Forum Discussion
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:
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?
- Anonymous3 years ago
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 _ RongtieIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 Replies
- AnonymousNot applicable
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 _ RongtieIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Ashish_Mathur
Super User
Hi,
Share the download link of the PBI file.