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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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