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
NumeroENAP
Helper III
Helper III

Average measure with age calculation measure

Hi, 

I want my table to show the average age of each categories (ex : by gender), but I don't want to create a column. So, I created a first measure : 

Age = DATEDIFF(ALL(PERS[date]);TODAY();DAY)
 
After that, I created a second measure, but it seems that I'm in the wrong, because it doesn't work :
AgeAVG = AVERAGEX(ALL(ID);[Age])
 
Thank you
1 ACCEPTED SOLUTION
AlB
Community Champion
Community Champion

Hi @NumeroENAP 

Please show a sample of your tables/data model. Otherwise we waste time. Have a look at these tips for getting your question answered quickly.  Try this measure:

Measure =
AVERAGEX ( VALUES ( Table1[ID] ), DATEDIFF ( Table1[Date of birth], TODAY (), YEAR ) )

 

Please mark the question solved when done and consider giving kudos if posts are helpful.

Cheers  Datanaut

View solution in original post

1 REPLY 1
AlB
Community Champion
Community Champion

Hi @NumeroENAP 

Please show a sample of your tables/data model. Otherwise we waste time. Have a look at these tips for getting your question answered quickly.  Try this measure:

Measure =
AVERAGEX ( VALUES ( Table1[ID] ), DATEDIFF ( Table1[Date of birth], TODAY (), YEAR ) )

 

Please mark the question solved when done and consider giving kudos if posts are helpful.

Cheers  Datanaut

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.