Forum Discussion
Pivot table question
Hi Richelle,
In the attached file, you will find a similar approach to what you are asking for.
This is done by using a Table, not a PivotTable.
Hope that helps
Haytham
Yes, this is what I need to do. How do I create an employee table? Do you mind creating steps to accomplish this?
Thanks.
- Richelle GrajoMay 08, 2018
Microsoft
I was able to use your formula.. Thank you so much!!
- Richelle GrajoMay 08, 2018
Microsoft
Hi,
Instead of calculating the years for today, how do I calculate the years for June 2018?
Thank you,
- Haytham AmairahMay 08, 2018Silver Contributor
Simply, replace this:
=DATEDIF(B2,TODAY(),"y")
With this:
=DATEDIF(B2,DATE(2018,6,1),"y")
Regards
- Haytham AmairahMay 08, 2018Silver Contributor
Richelle,
You're welcome!
In fact, that table is a dummy table I created in less than one minute!
In your real table, you have to include the joining date for each employee, and then use the below formula to get the service years based on the joining date:
=DATEDIF(B2, TODAY(), "y")
After that, you can filter all employees with specific years of service by using a Slicer.
Regards