Calculate Employee Attrition Rate for Rolling 12-Month (1 Year) Period
Hello - I am new to Qlickview, and trying to build a variable to calculate employee attrition but running into issues. Any insights appreciated. Thanks.
Calculate Attrition Rate for 12 Month (1 Year) Period – Current Period (eg, through the Month ending Jan 2017) and Year Ago Period (eg, through the month ending Jan 2016)
Period rolls forward with each successive month
Display the 12 month rate for the period (not the 12 month rate for each month). In other words, the rate from the last month in the period back 12 months.
To be used as a variable, with other dimensions (job type, etc).
Turnover Formula: Turnover Rate = Total terminations / Average Headcount
Total Terminations for the 12 Month Period -- RangeSum(Above(totalsum([Termination Count]),0,12))
Average Headcount for the 12 Month Period -- RangeAvg(Above(totalsum([Ending Headcount]),0,12))
Term Rate - RangeSum(Above(totalsum([Termination Count]),0,12)) / RangeAvg(Above(totalsum([Ending Headcount]),0,12))
When I display both Record Year and Record Month, everything works. Total Terminations, Average Headcount, and Term Rate yield correct results (verified against Excel spreadsheet).
When I click on the table to take Record Month out of the display, leaving just Record Year, which is what I am after, Total Terminations calculate correctly, but Average Headcount sums all the records in the data set rather than averaging the monthly sums. Which of course throws off the Term Rate.