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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

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 JoiningLast working day 
Alexis Valenzuela16-Mar-20 
Erasmo Gonzalez02-Mar-20 
Michelle Carrasco02-Mar-20 
Lisa Zubia02-Mar-20 
Christopher A Fernandez16-Mar-20 
Donna Hammond26-May-20 
Karen-Gabriela Medina-Gamboa16-Mar-20 

 

MonthsAttritionAttrition%
Jan'206014%
Feb'20112%
Mar'2000%
Apr'2041%
May'2010%
Jun'20275%
Jul'20163%
Aug'2081%
Sep'20212%
Oct'20665%
Nov'20191%
Dec'2000%

 

Here are the excel formula's used to arrive the desired output

AttritionCOUNTIFS(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

1 ACCEPTED SOLUTION
parry2k
Super User
Super 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.

 

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

2 REPLIES 2
parry2k
Super User
Super 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.

 

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

Hi @parry2k ,

 

Thank you for your time and solution. it worked perfectly.

 

Regards,

Pavan

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.