Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Calculate Previous Headcount

Hi Experts, I have the summarized table below and want to create another column to show the previous headcounts. So for example, I want the July 2009 PreviousHeadcounts to start at 0 since there is no previous headcount before it. This step should also take cognizance of the Personnel Area and display its previous count respectively.  So in effect, I want the Aug 2009 figures to pick the total employees from  July 2009 as the previous count, Sep 2009 to read Aug 2009, and so on. This should also look at the Personnel Area and pick its corresponding headcount. So in this case, If July 2009 for Tarkw is 1932, then July 2009 should be 0, and Aug 2009 should pick the 1932 etc. The Personnel Area and the Period is Key in determining the previous headcount.

 

Your quick assistance will be helpful to me. Thank you.

 

 

  • Anonymous's avatar
    Anonymous
    3 years ago

    I have been able to sort this out. The problem was that, there was no relationship to my Dates table

3 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Vannesa, here is the data. This is also the calculation I did to get this table: 

      Monthly_Headcount = SUMMARIZE(Employees,Employees[Period],Employees[Personnel Area],"Total Employees",count(Employees[Personnel Number]))
       
      Below is the data and my desired outcome:
       
      PeriodTotal EmployeesPersonnel AreaPreviousHeadCount
      Jul-2009822Damang0
      Jul-20091932Tarkwa0
      Aug-2009472Damang822
      Aug-20091934Tarkwa1932
      Sep-2009438Damang472
      Sep-20091995Tarkwa1934
      Oct-2009452Damang438
      Oct-20092006Tarkwa1995
      Nov-2009475Damang452
      Nov-20092081Tarkwa2006
      Dec-2009448Damang475
      Dec-20092089Tarkwa2081
      Jan-2010510Damang448
      Jan-20102097Tarkwa2089
      Feb-2010464Damang510
      Feb-20102091Tarkwa2097
      Mar-2010440Damang464
      Mar-20102090Tarkwa2091
      Apr-2010468Damang440
      Apr-20102090Tarkwa2090
  • Anonymous's avatar
    Anonymous
    Not applicable

    I have been able to sort this out. The problem was that, there was no relationship to my Dates table