How to calculate Age in ranges (ex: <25, 25-35, 35-45, >45)

Hello Community.
I was looking to aggregate employees age into ranges such as:

< 25
25-35
35-45
>55
type or paste code here

Since I wasn’t able to find one simple way I came up with a very ugly (but functional) one, if you know about any better way please let me know :slight_smile:

On the meantime, if you are also looking to aggregate ages by range, here is what I did, hope it helps someone to save some time


IF(
(ROUND((DIVIDE((
Days(Today(),{Birth Date})
),365)),0)) < 25, "< 25",

(IF((ROUND((DIVIDE((
Days(Today(),{Birth Date})
),365)),0)) >= 50, "> 50",

(If(AND((ROUND((DIVIDE((
Days(Today(),{Birth Date})
),365)),0)) >=25, (ROUND((DIVIDE((
Days(Today(),{Birth Date})
),365)),0))<=35), "25-35",

"ERROR")))))

The column with the birth date of the employee is of course called {Birth Date} so, if you happen to have the same problem, just create the formula and replace that name with the name given to your column

1 Like