Solved

HR statistics - employee average age calculation

  • 14 September 2022
  • 2 replies
  • 147 views

Badge +1
  • Newly Minted Pigmenteer
  • 1 reply

Hi community,

HR team asked us an interesting modelling question

They want to know the employee average age within the company. As TODAY() function doesn’t exist yet in Pigment, the only option I found so far is to :

1/ Create a metric with today’s day that will need to be updated when required

2/ Allocate a date of birth to each employee in a transaction list or similar

Question : How to write the right formula to get an age (like 36 for 36 yo) result per employee per month taking in consideration the employee base changes over the years, and then be able to determine an average ?

Thank you for your help,

Erwan

icon

Best answer by Nathan 14 September 2022, 12:07

View original

2 replies

Userlevel 6
Badge +11

Hi Erwan,

 

you can automate TODAY to the last month loaded if you timestamp your data loads.

 

You can then just do the difference between the two dates and divide by 365.

Badge +1

Indeed, I thought it would not work, thank you very much!

Reply