Forum Discussion
Anonymous
2 years agoNot applicable
compare different values in a table
Hello! I need help finding a solution. I have a table containing a list of employees named "Employee List" with two columns: "month" and "name." I need to determine, for each month: The number of...
Martin_D
2 years agoSolution Sage
Assuming the following definitions:
- A joined employee is an employee that occurs in a monthly employee snapshot and does not occur in any earlier monthly employee snapshot.
- A left employee is an employee that does not exisit in a monthly employee snapshot but did exist in the previous month's monthly employee snapshot.
The following approach would not account for leaves and rejoins, i.e. only the earliest join and the latest leave per employee is listed:
- Join date for each employee is the table, grouped by the employee column, with the min month aggregaction operation in the second column https://learn.microsoft.com/en-us/power-query/group-by . Sort by month and you have the joins for each month.
- Number of joins per month is the above table, grouped by month, with aggregation operation count employees.
- Leave date for each employee is the table, grouped by the employee column, with the max month aggregaction operation in the second column. Then delete all rows for the latest month because these employees are still in the organization. Sort by month and you have the leaves for each month.
- Number of leaves per month is the above table, grouped by month, with aggregation operation count employees.
Do you need to consider leaves and rejoins?
- Anonymous2 years agoNot applicable
Hello Martin, I don't have any dates in my table, just name and month. I need to know the list of names left and the ones joined.