Help

Complex formula to calculate age

775 1
cancel
Showing results for 
Search instead for 
Did you mean: 
Michael_Kalkows
4 - Data Explorer
4 - Data Explorer

I want to calculate a field with the “age” of people in my database from their birthday BUT there are several extra conditions, which makes it more complicated. So I need some help…

(A1) For most people I have the birthday (day, month, year), e.g. 27.1.1955
(A2) But for some people I only have the birth year, e.g. 1955
(B) And for some I don’t have any birth date at all. In that case, the “age” field should remain blank.
(D1) And furthermore, some people already have died and I have their death day (day, month year). For them I need to calculate the age when they died.
(D2) While for some I have their death year.

So the formula should calculate the age in years for people. What is that formula?

I already got as far as to use this formula:

IF({Birthday}=BLANK(), IF( {Died}, {Died}, {Died Year}-{Birthday Year}),DATETIME_DIFF( IF( {Died}, {Died}, TODAY() ), {Birthday}, ‘years’))

It works but not perfectly.

1 Reply 1

Any chance you could provide some screenshots of the relevant fields of your data?