Please find the attached file, sheet "Solution" which is what I want to accomplish:
Part I:
Each employee is registered in sheet "EmployeeList".
Each transaction ("Joining", "promoted", "Leaving") is registered on a single line with a date in sheet "DataEntry".
I now want to create a table based on the data in these two sheets that shows a list of all employees that were active on a given date (E.g. Joined or promoted, not Left) or in a given date range.
This is where the first problem comes in: Since I only have a "Start" date for each position, I need to find the ending date for that position as well. If the employee started in Position 1 on 01.01.2016 and was promoted to Position 2 on 01.01.2017, he/she would then be active in Position 1 from 01.01.2016 until 31.12.2016.
Part II:
I want to be able to create charts/a dashboard showing the headcount per Position, per Team and per Gender.
I have tried different approaches (Pivot Tables, with a column for cumulative sums, but the problem is that when I filter on a date range using a slicer, the values always start at 0 instead of the actual value prior to the starting date in the filter).
I have also tried with Power Query, but unfortunately without success... I am able to create the cumulative headcount, but when I create a chart, it only plots those dates that have a transaction. I want to show each period in the chart. For example, if there are 2 employees being hired in January, 1 in April, and 1 employee leaves in June, the headcount would be 2 from January to March, 3 from April to May and 2 from June and onwards.
My chart only plots 2, 3, and 2 in January, April and June, and does not show the values for February, March and May...
How can I solve this?
Thank you in advance!
Bookmarks