Don't miss your chance to take exam DP-600 or DP-700 on us!
Request nowLearn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hi experts,
I am working on a project i have an doubt ,if i have an joining date and resigned date
how to calculate the working experiences of they employees of given data.
| Joining date | Resigned date |
| 02-03-2020 | 11-03-2024 |
| 03-02-2021 | 12-03-2024 |
| 04-05-2020 | 03-03-2023 |
| 05-08-2020 | 02-05-2023 |
| 15-04-2020 | 16-03-2023 |
| 12-02-2021 | 03-02-2024 |
| 11-02-2020 | 11-04-2024 |
| 22-03-2021 | 12-03-2024 |
THANKS IN ADVANCE!
Solved! Go to Solution.
Hi @Prabha123 ,
To calculate the working experience (tenure) of employees based on their joining date and resigned date, you can use DAX in Power BI or an Excel formula to determine the duration in years and months. The DATEDIFF function can be used to compute the difference between the Joining Date and Resigned Date, returning the tenure in different time units. Since DATEDIFF only calculates a single unit (years, months, or days), we need to extract the years separately and then compute the remaining months.
This ensures that the final output correctly reflects the employee's experience in a readable format like "X Years, Y Months". Below is the DAX formula to achieve this in Power BI.
WorkingExperience =
VAR Years = DATEDIFF(EmployeeTable[Joining date], EmployeeTable[Resigned date], YEAR)
VAR Months = DATEDIFF(EmployeeTable[Joining date], EmployeeTable[Resigned date], MONTH) - (Years * 12)
RETURN
Years & " Years, " & Months & " Months"
his formula ensures that each employee’s tenure is accurately represented while handling variations in months and years effectively.
Hi, @Prabha123
Have you solved your problem? If so, can you share your solution here and mark the correct answer as a standard answer to help other members find it faster? Thank you very much for your kind cooperation!
Best Regards
Yongkang Hua
Hi @Prabha123 ,
To calculate the working experience (tenure) of employees based on their joining date and resigned date, you can use DAX in Power BI or an Excel formula to determine the duration in years and months. The DATEDIFF function can be used to compute the difference between the Joining Date and Resigned Date, returning the tenure in different time units. Since DATEDIFF only calculates a single unit (years, months, or days), we need to extract the years separately and then compute the remaining months.
This ensures that the final output correctly reflects the employee's experience in a readable format like "X Years, Y Months". Below is the DAX formula to achieve this in Power BI.
WorkingExperience =
VAR Years = DATEDIFF(EmployeeTable[Joining date], EmployeeTable[Resigned date], YEAR)
VAR Months = DATEDIFF(EmployeeTable[Joining date], EmployeeTable[Resigned date], MONTH) - (Years * 12)
RETURN
Years & " Years, " & Months & " Months"
his formula ensures that each employee’s tenure is accurately represented while handling variations in months and years effectively.
@Prabha123 , One a new column using datediff
Exp = datediff([Joining Date], [Resigned date], year)
or if you need dynamic based on selected month follow this HR blog video of attached file
Power BI: HR Analytics - Employees as on Date : https://youtu.be/e6Y-l_JtCq4
https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...
Power BI HR Active Employee Tenure Bucketing, and Hired, Terminated, and Active employees: https://youtu.be/fvgcx8QLqZU
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 50 | |
| 40 | |
| 37 | |
| 14 | |
| 14 |
| User | Count |
|---|---|
| 85 | |
| 69 | |
| 37 | |
| 28 | |
| 27 |