How to calculate moving 12 month average base on two differnt tables

Mavericks334

Active Member
Joined
Jan 26, 2011
Messages
280
Hi,

I have two table, one that gives me the total attrition and the other the headcount?

The attrition % is calculated by divinding the the total attrition/headcount

I need to calcualte a moving 12 month average. I tried David Churchward moving averages post, however i am unable to get the result.

Probably because i have two different tables and the calculations is based on these tables.

Could some one help me out.

Tables are HC: {Dept Id, Month, Headcount} Attrition:{Dept Id, Month, Headcount}, Date Table {Date, Month-end, Next month Startdate}
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Hello

Can you post waht you have tried so far?

I'm thinking that if you want to know the value as at today, then you can use a sumif formula to add the attrition values that occured in the past 12 months. Repeat for headcount and divide attrition by headcount, e.g. something like this : Sumif(Attrition!MonthRange, ">=" & Now()-365) / Sumif(HC!MonthRange, ">=" & Now()-365)
That isn't the actual formula, jut a guideline.

If however you want the value between two date values of which one is not today, then that would be a different formula.

Andrew

P.S. Whoops - I just saw this was a question in the powerpivot forum. My solution has nothing to do with powerpivot whatsoever, just a simple Excel solution.
 
Last edited:
Upvote 0
=CALCULATE([Value_Corrected1],datesbetween(Dates[Date],[Selected_Moving_Month_End_Date],Year_Period[Selected_Month_End_Date]),Gives me the hc for the last 13 month, then i divide it by 13 to get the average. headcount during that period

Selected_Moving_Month_End_Date = =lastdate(dateadd(Year_Period[Previous_Month_End_Date],-1,YEAR))
Selected_Month_End_Date = lastdate(Year_Period[Month_End_Date]) to get my data.
 
Upvote 0

Forum statistics

Threads
1,224,072
Messages
6,176,213
Members
452,715
Latest member
DebbieCox

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top