Skip to main content

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.

 

Using Group by Calculations in Tableau 

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.

 

image 

Similarly by Business Head, Output should be like this

 

image 

Can someone please help getting Avg.Headcount by Exit type, By Business Head calculating correct Attrition.

 

Request you to help. Attached workbook

1 answer
0/9000