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
GMireles
Regular Visitor

Tenure Calculation

I am trying to calculate tenure and I believe my Dax is right because when I use my slicers to pick out an individual, for example myself, the calculation is correct. Yet when it is aggregated and takes into account the enitre employee populatiuon, it is off by like .5

 

Here is my dax 

 

Average Tenure (Years) = AVERAGEX('1',DATEDIFF('1'[Hire Date], TODAY(), YEAR))
 
And the way I am doing outside of BI is the following 
  • Days between start date and end date 
  • Days /365.25

Does anyone have any insight? Happy to share more

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @GMireles ,

Since you divided by 365.25 in the manual calculation to account for leap years, you can modify the DAX formula to first calculate the number of days and then convert it to years by dividing by 365.25. This may help reduce the differences.

Average Tenure (Years) =
AVERAGEX(
'1',
DATEDIFF('1'[Hire Date], TODAY(), DAY) / 365.25
)

 

If your Current Period does not refer to this, please clarify in a follow-up reply.

 

Best Regards,

Clara Gong

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

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @GMireles ,

Since you divided by 365.25 in the manual calculation to account for leap years, you can modify the DAX formula to first calculate the number of days and then convert it to years by dividing by 365.25. This may help reduce the differences.

Average Tenure (Years) =
AVERAGEX(
'1',
DATEDIFF('1'[Hire Date], TODAY(), DAY) / 365.25
)

 

If your Current Period does not refer to this, please clarify in a follow-up reply.

 

Best Regards,

Clara Gong

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

I was definitely overthinking it!! Thank you😀

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.