Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
yalomari
New Member

DATEDIFF, Calculate Age, Issue for Age less than one Year .

Hi Dears , 

 

I'm trying to calculate the age of the patient's list (what his/her Age was on the exam Date ) , using DAX 
DOB = birthdate
ExamDate = ExamDate

 

so the code was 

DATEDIFF('TableName'[DOB],[ExamDate],YEAR)
 
So, I have a case that 
 
DOB= 20-DEC-2022
ExamDate = 02-AUG-2023

 
The expected result is = 0 because this age must be 8 months, but it returns 1 instead 
Does anyone have a clue why and how to solve this? 
1 REPLY 1
eliasayyy
Memorable Member
Memorable Member

due to it bein 8 months , it will round up hence the one 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.