14 Replies Latest reply on Mar 31, 2020 8:05 AM by swaroop.gantela Branched to a new discussion.

    Calculating Attrition Rate w/a Variable Period

    Charlie Napa

      Hi Everyone,

       

      I have a data source that contains 'Date Hired' & 'Date Terminated' as well as a hierarchy.   I'm having trouble when it comes to creating a calculation that works for more than a one month period.

       

      Calculation we are using for Attrition:

      # of terminations during the period / (# Active employees at start of period + # of employees hired during the period)

       

      Below is a snapshot of our calculation in Tableau working as intended for a 1 month period of time.

      Attrition 1 Month.PNG

      Below is what happens when we select multiple periods of time.  The issue is the 'Starting Headcount' aggregates all the periods of time instead of taking the 'Starting Headcount' for the initial period selected.  It's also aggregating the 'Ending Headcount' instead of giving the actual 'Ending Headcount' desired.

       

      The desired 'Attrition %' for this calculation should be 22.85%.  402/(1484 + 322)

       

      Attrition 3 Months.PNG

       

      Ultimately, I'd need to be able to create the proper calculation with any period of time selected, let it be 2 months, 1 quarter or 1 year's worth of time.  I've done some research and think I need to use a LOD expression but I'm unsure of how to write the calculation. 

       

      I've attached a sample of my data source.

       

      Any and all help will be greatly appreciated.

       

      Regards,

       

      Charlie