Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Prabha123
Frequent Visitor

how to get working experiences based on given data

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-202011-03-2024
03-02-202112-03-2024
04-05-202003-03-2023
05-08-202002-05-2023
15-04-202016-03-2023
12-02-202103-02-2024
11-02-202011-04-2024
22-03-202112-03-2024

 THANKS IN ADVANCE!

 

1 ACCEPTED SOLUTION
rohit1991
Super User
Super User

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.

 


Did it work? ✔ Give a Kudo • Mark as Solution – help others too!

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

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

rohit1991
Super User
Super User

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.

 


Did it work? ✔ Give a Kudo • Mark as Solution – help others too!
amitchandak
Super User
Super User

@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 with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.