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
pjukone
Frequent Visitor

Calculation of year of retirement

Being new to DAX, I researched various calculations of the age although I was specifically after calculating the year of retirement for a large dataset so that I could chart the staff demographics and profile. 

 

I found the suggestion from Marco Russo (thank you Marco!) of the QUOTIENT method, which gives an accurate calculation of the age, and modified this to calculate the year of retirement as per the below.  I hope you find this useful and if there are any enhancements, please do let me know.

 

Year of Retirement =

-- Please change the next variable from 65 to your organisation's retirement age

VAR RetirementAge = 65
VAR Birthdate = [Date of Birth]

VAR ThisDay = DATE(YEAR(TODAY()), 12, 31)

VAR IntBirthdate = YEAR ( Birthdate ) * 10000 + MONTH ( Birthdate ) * 100 + DAY ( Birthdate )

VAR IntThisDay = YEAR ( ThisDay ) * 10000 + MONTH ( ThisDay ) * 100 + DAY ( ThisDay )

VAR Age = QUOTIENT ( IntThisDay - IntBirthdate, 10000 )

VAR CheckedAge = DIVIDE ( Age, NOT ISBLANK ( Birthdate ) )

VAR YearstoRetirement = RetirementAge - CheckedAge

VAR ExpectedRetirementYear = YEAR(TODAY()) + YearstoRetirement

RETURN

ExpectedRetirementYear

1 REPLY 1
v-zhangti
Community Support
Community Support

Hi, @pjukone 

 

Thank you for sharing. You could reply yourself and then accept your reply as solution. An answered thread is searched more easily than an open one. Others will learn more from your sharing.

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.