Skip to main content

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

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.


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


Reply