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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Samiks95
Regular Visitor

Calculate age based on Date of Birth

Hello,

I have a column Date of Birth. And now, I want to calculate Age based on Date of Birth. I also want to do the age grouping.

2 ACCEPTED SOLUTIONS

@Anonymous Thank you Luis! 2-Table1-1.png

I want to create a age range based on the age. Similar to the attached pic.

View solution in original post

Anonymous
Not applicable

Ok, try with this, change "Table (4)"  with the name of the table where you have the column Age
 
Range = IF(AND('Table (4)'[Age]>=0,'Table (4)'[Age]<=16),"Child",IF(AND('Table (4)'[Age]>=17,'Table (4)'[Age]<=30),"Young Adults",IF(AND('Table (4)'[Age]>=31,'Table (4)'[Age]<=45),"Middle-aged Adults","Old-aged Adults")))

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @Samiks95,

 

You can create this column:

Age = DATEDIFF([Date of Birth],TODAY(),YEAR)
 
And i dont understand about the age grouping what do you want to do.

@Anonymous Thank you Luis! 2-Table1-1.png

I want to create a age range based on the age. Similar to the attached pic.

Anonymous
Not applicable

Ok, try with this, change "Table (4)"  with the name of the table where you have the column Age
 
Range = IF(AND('Table (4)'[Age]>=0,'Table (4)'[Age]<=16),"Child",IF(AND('Table (4)'[Age]>=17,'Table (4)'[Age]<=30),"Young Adults",IF(AND('Table (4)'[Age]>=31,'Table (4)'[Age]<=45),"Middle-aged Adults","Old-aged Adults")))

@Anonymous Thank you so much. It worked.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.