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
Dhavales
New Member

Attrition Formula

MonthHC
End of M-1
TotalNon
Voluntary
VoluntaryMonthly
Attrition
%
Annual
Attrition
%
Jun 19782215162.05%0.00%
Jul 197628710.13%0.00%
Aug 19752266202.66%0.00%
Sep 19748185131.74%0.00%
Oct 197738170.91%0.00%
Nov 1978113760.77%0.00%
Dec 19807175121.49%17.60%
Jan 208125140.49%16.32%
Feb 208362010101.20%16.28%
Mar 20834153121.44%16.36%
Apr 20850174131.53%16.40%
May 208545050.59%14.98%
May 20854505=E19/B19=SUM(F8:F19)
       
   Monthly % = (Total - Non Voluntary)/Head Count for the month
   Annual % = Sum(past 12 months monthly%)

 

Hi Friends,

I am trying to calculate the above in Power BI.. above example is done in excel.

How do i get the Annual% rolling past 12 months in a measure?

 

The one in Green colour is the formula of excel..

 

Please help

Thanks

Sachin

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Dhavales ,

 

Based on my understanding,Annual %= Sum(past 12 months monthly%) should be a summarize of the pasting 12 months,I dont understand why from Jun 19 to Nov 19,the result returns 0?And why the value in Dec 19 is higher than the later values.

I made a sample .pbix file to calculate the total value if I didnt understand wrong,pls see below:

Create a measure as below:

 

Annual Attrition% = 
var _mindate=CALCULATE(MAX('Table'[Date]),DATEADD('Table'[Date],-12,MONTH))
Return
SUMX(FILTER(ALL('Table'),'Table'[Date]>=_mindate&&'Table'[Date]<=MAX('Table'[Date])),'Table'[Monthly %])

 

And you will see:

Annotation 2020-06-10 121542.png

For the related .pbix file,pls click here.

 

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Dhavales ,

 

Based on my understanding,Annual %= Sum(past 12 months monthly%) should be a summarize of the pasting 12 months,I dont understand why from Jun 19 to Nov 19,the result returns 0?And why the value in Dec 19 is higher than the later values.

I made a sample .pbix file to calculate the total value if I didnt understand wrong,pls see below:

Create a measure as below:

 

Annual Attrition% = 
var _mindate=CALCULATE(MAX('Table'[Date]),DATEADD('Table'[Date],-12,MONTH))
Return
SUMX(FILTER(ALL('Table'),'Table'[Date]>=_mindate&&'Table'[Date]<=MAX('Table'[Date])),'Table'[Monthly %])

 

And you will see:

Annotation 2020-06-10 121542.png

For the related .pbix file,pls click here.

 

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!

 

Dear Kelly..

 

Super cool.... it definitely helped 

 

Thanks for the quick solution..

 

Regards

Sachin Dhavale

 

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.