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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Need help with DAX formula to calculate attrition %

Hi All,

 

I need help in calculating overall YTD attrition %. Below is the data

 

SiteMonthTotal Attrition HCYTD Attrition %
Site 11-Sep-191361225%
Site 21-Sep-19741220%
Site 11-Oct-191571625%
Site 21-Oct-191150424%
Site 11-Nov-191970928%
Site 21-Nov-191450827%
Site 11-Dec-191868429%
Site 21-Dec-19951825%
Site 11-Jan-201560929%
Site 21-Jan-2012486.526%
Site 11-Feb-202351932%
Site 21-Feb-20843726%
Site 11-Mar-20945231%
Site 21-Mar-20643624%
Site 11-Apr-20343429%
Site 21-Apr-201464.522%
Site 11-May-20243627%
Site 21-May-20249220%
Site 11-Jun-20541126%
Site 21-Jun-20349618%
Site 11-Jul-20638826%
Site 21-Jul-20248417%
Site 11-Aug-20438825%
Site 21-Aug-20248315%
Site 11-Sep-20335510%
Site 21-Sep-201347.53%
Site 11-Oct-20435512%
Site 21-Oct-2033457%

 

The calculation on excel goes as below (for FY21, i.e. from Sep'20):

YTD % = (Cumulative Sum (Total) / Cumulative Average (HC)) * (12/2) ----- divided by 2 because FY21 starts from Sep'20

 

Cumulative sum and average would start from Sep'20 as well. So in short if i have to calculate Overall YTD attrition % for both sites the formula would be,

YTD % = (3+1+4+3) / Average (355+355, 347.5 + 345) * (12/2) = 9 %

 

Also it is done cumulatively so that when we map the monthly attrition it should give us the YTD attrition for that month.

 

Let me know if i am unclear and need to explain it in a better way.

 

Looking for help in this.

 

2 REPLIES 2
V-pazhen-msft
Community Support
Community Support

@Anonymous 

Just not clear, regarding to the solution, do you want to create a measure of an overall YTD attrition or just FY 21 Ytd? Can you just show the expected output in a table and the logic?

 

I don't understand the excel calculation logic, why do you divide by 2 if for FY21 that starts on Sep 20, what about FY20, and FY19? Also, do you calculation site 1 and site 2 together?

 

Regards
Paul

Anonymous
Not applicable

Yes, i want to create a measure for overall YTD attrition %. That way if i map the attrition % for the last 12 months then till Aug'20 it should be calculated basis FY20 and from Sep'20 the calculation should be basis FY21.

 

For FY21 i have divided by 2 since i have data until Oct'20 which is the 2nd month in FY21. Similarly when we move on to Nov we will divide it by 3 and so on. I need the calculation for both sites, i.e. if both sites are selected it should calculate overall by adding respective numbers and if a single site is selected then calculation should be shown for that site.

 

I hope i am clear. Let me know if you have any further questions

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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