Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
Hello BI Community!
I want to calculate employees' average tenure for each year and if possible average tenure for each gender and ethnicity group. I appreciate it if someone could help me with this. Here are the dataset and the pbix file.
pbix: https://drive.google.com/file/d/1P_aQGCShF-tVLIlprMN91yAkm8NS7xot/view?usp=sharing
Hi @Nzadeh ,
Have trouble to follow, do you want datediff/years or (sum of tenure/ count of Employees) each year?
Best Regards,
Jay
@Nzadeh , Try a Meausre like
Avg Stay =
CALCULATE(AVERAGEX(FILTER(Employees,Employees[Hire_Date]<=MAX(Dates[Date]) && (ISBLANK(Employees[Termination_Date]) || Employees[Termination_Date]>MAX(Dates[Date]))), DATEDIFF([Hire_Date],if(ISBLANK(Employees[Termination_Date]) || Employees[Termination_Date]>MAX(Dates[Date]), max('Dates'[Date]),Employees[Termination_Date]), MONTH )))
Or a column, that will always give based on today or termination date
Tenure = datediff([Hire_Date], COALESCE([Termination_Date], TODAY()),MONTH)
and then take avg
Thank you so much @amitchandak ! I used both of these options, but I got different results.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
User | Count |
---|---|
11 | |
6 | |
3 | |
3 | |
3 |
User | Count |
---|---|
11 | |
9 | |
8 | |
8 | |
7 |