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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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.