Forum Discussion

Syndicate_Admin's avatar
Syndicate_Admin
Administrator
2 years ago
Solved

WORKER EVOLUTION

Hello!

I want to make a visual with the evolution of the workers in my company.

I have a Employment_Date column and a Termination_Date column (if it's empty the worker is still active)

And I have a Calendar from the dates of the contracts (Calendar contracts)

I've made the measurement

Employees by year evolution = CALCULATE(COUNTROWS('1-RRHH TOP MANAGEMENT'),FILTER('1-RRHH TOP MANAGEMENT',[Employment_Date]<MIN('Contract calendar'[Date])&&([Termination_Date]>MAX('Contract calendar'[Date])||[Termination_Date]=BLANK())))
The only mistake I get in the visual is that the employee appears to me only when he or she has been active for a year.
For example: the first two employees of the company have Employment Date in 2008 and in the graph they appear in 2009 and so on with all employees

In 2010 there were 3 employees and this third employee does not appear until 2011

Does anyone know where I'm going wrong?

Thank you for your help!!

  • Hi,

    It seems you are on the right track, but what about changing the min to max as there is no reason there should be both min and max in the headcount formula.  Please try swapping min with max and you will get the right output, I suppose.  

    Best regards,

4 Replies

  • Hi,

    It seems you are on the right track, but what about changing the min to max as there is no reason there should be both min and max in the headcount formula.  Please try swapping min with max and you will get the right output, I suppose.  

    Best regards,

    • Syndicate_Admin's avatar
      Syndicate_Admin
      Administrator

      Hello again, I have just seen an error that comes out with this formula: the employees who are registered in the month of May do not appear to me, I imagine that they will be in arrears, but could I add something to my formula so that each employee appears at the time of registration, even if it is the same day?

      I'm using this formula:

      Employees by year evolution = CALCULATE(COUNTROWS('1-RRHH TOP MANAGEMENT'),FILTER('1-RRHH TOP MANAGEMENT',[Employment_Date]<MAX('Contract calendar'[Date])&&([Termination_Date]>MAX('Contract calendar'[Date])||[Termination_Date]=BLANK())))
  • Hello again, I just saw an error that I get with this formula: I have two employees discharged in May and they don't appear in the graph, does anyone know why?

    I'm using this formula:

    Employees by year evolution = CALCULATE(COUNTROWS('1-RRHH TOP MANAGEMENT'),FILTER('1-RRHH TOP MANAGEMENT',[Employment_Date]<MAX('Contract calendar'[Date])&&([Termination_Date]>MAX('Contract calendar'[Date])||[Termination_Date]=BLANK())))