Calculate Age in DAX from Birthday

The correct way to calculate age in DAX is by using the YEARFRAC() function instead of DATEDIFF() because we can get a more accurate age by using fractions.


Age = INT( YEARFRAC([birthdate], TODAY() ) )

Create a calculated column named Age

You also might want to wrap this calc around an IF statement to account for when some birth dates are blank.

Blank rows result in age 119

To protect your end users from confusion it would be best to do the below and leave the age as blank too.


Age = IF( 
	ISBLANK([birthdate]), 
	BLANK(), 
	INT( YEARFRAC([birthdate], TODAY() ) ) 
	) 

Handling blank rows.