Forum Discussion
monthly attrition % dynamically
Hi All,
I have a table that has Employee name, Date of Joining and Date of Last Working day. I want to calculate the attrition % as mentioned below:
Link for sample data: https://drive.google.com/file/d/1QrL3JvPDh_WgvvVWxiSTtokNKQBetLNb/view?usp=sharing
| Name | Date of Joining | Last working day |
| Alexis Valenzuela | 16-Mar-20 | |
| Erasmo Gonzalez | 02-Mar-20 | |
| Michelle Carrasco | 02-Mar-20 | |
| Lisa Zubia | 02-Mar-20 | |
| Christopher A Fernandez | 16-Mar-20 | |
| Donna Hammond | 26-May-20 | |
| Karen-Gabriela Medina-Gamboa | 16-Mar-20 |
| Months | Attrition | Attrition% |
| Jan'20 | 60 | 14% |
| Feb'20 | 11 | 2% |
| Mar'20 | 0 | 0% |
| Apr'20 | 4 | 1% |
| May'20 | 1 | 0% |
| Jun'20 | 27 | 5% |
| Jul'20 | 16 | 3% |
| Aug'20 | 8 | 1% |
| Sep'20 | 21 | 2% |
| Oct'20 | 66 | 5% |
| Nov'20 | 19 | 1% |
| Dec'20 | 0 | 0% |
Here are the excel formula's used to arrive the desired output
| Attrition | COUNTIFS(Sheet1!$C:$C,">="&A3,Sheet1!$C:$C,"<="&EOMONTH(A3,0)) |
| Attrition% | B3/(COUNTA(Sheet1!$A:$A)-1-COUNTIF(Sheet1!$B:$B,">="&A3)) |
i have created measure "leaverscount = COUNT('MDB Data'[Last working day ])" to get Attrition count, but stuck with Attrition% as it is dynamic.
I tried few things like creating year and month columns, merge as new one and then get the count less than or equal to that month, but couldn't get it.
Any help on this is much appreciated.
Regards,
Pavan
Anonymous solution attached, you can tweak as per your need.
Check my latest blog post Year-2020, Pandemic, Power BI and Beyond to get a summary of my favourite Power BI feature releases in 2020
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
2 Replies
- parry2kSuper User
Anonymous solution attached, you can tweak as per your need.
Check my latest blog post Year-2020, Pandemic, Power BI and Beyond to get a summary of my favourite Power BI feature releases in 2020
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
- AnonymousNot applicable