I need to calculation Overall Attrition, Attrition by Exit type (Involuntary or Voluntary), Attrition by Business Head.
I was able to achieve Overall Attrition but unable to get Attrition by Exit type, by Business Head
DataSource - Using SQL. Leavers are in one table and Headcount is in other table. Have done a union all query. Created a variable to show the difference as Action_type= Leavers, Action_type= Headcount (as of now I'm using excel with same kind just to send here),
Attrition Calculation :
(Leavers)/ (Avg.Headcount) * 12/(No.of months)
where
Leavers = Running total ( Example : Jul =10 , Aug = 20, Sep=5) then output should be Jul =10, Aug=30, Sep=35.(Basically Running Total) - Achieved this
Avg.Headcount = Sum of Headcount number/Total no.of months ( Example : Jul = 100 , Aug=250, Sep=280) then output should be Jul=100 . Aug=175 , Sep=210 -(Basically Moving Average) Achieved this
No.of months = Our fiscal year is from Jul-jun. So, Jul=1, Aug=2 ... etc - Achieved this
By exit type - If you see below image, I need Headcount to be shown in the Involuntary and Voluntary categories but it is altogether showing in NULL. In 'Moving avg. Headcount' column, I get some wrong numbers.
I need Headcount to be grouped by Involuntary and Voluntary. May be by doing Pane calculations. Tried LOD but not sure how to get it.
Similarly by Business Head, Output should be like this
Can someone please help getting Avg.Headcount by Exit type, By Business Head calculating correct Attrition.
Request you to help. Attached workbook
Duplicate post of one already open/active: https://community.tableau.com/s/question/0D58b0000Ak40LJCQY/lod-for-attrition Please post only once.
Best, Don
(Please, don't forget to click Select as Best or Upvote !)