Case 2: new hires and leavers

Who joined, who left? Two measures count the people whose hire date or leave date falls in the period of the cell, whether the row is a year, a quarter or a month.

In short: MIN('Date'[Date]) and MAX('Date'[Date]) return the start and end of the period in the filter. COUNTROWS(FILTER(Employee, Employee[HireDate] >= MIN('Date'[Date]) && Employee[HireDate] <= MAX('Date'[Date]))) counts the new hires in it, with the LeaveDate column the leavers.

Task 1: new hires

Task Create the measure "New Hires": the number of people whose hire date falls in the period of the cell, that is between the first and the last day in the date table filter.

Employee 46 rows, 8 columns
EmployeeIDNameDepartmentIDHireDateLeaveDateSalaryEmploymentTypeStatus
101Sophie Lang11 Oct 202051500Full-timeActive
102Noah Walker11 Nov 202529600Part-timeActive
103Sophie Hayes11 Sep 202654100Full-timeActive
104Sam Price11 Aug 202460300Full-timeActive
105Ben Price11 Mar 201831 May 202666600Full-timeLeft
106Olivia Hughes11 Apr 202066000Full-timeActive
107Ben Bennett21 Nov 201244000Part-timeActive
108Jack Hughes21 Feb 201647600Full-timeActive
109Ben Hayes21 Apr 202131 Aug 202551000Full-timeLeft
110Lucy Clarke21 Oct 201957700Full-timeActive
111Ravi Ali21 Jul 202231 Mar 202548700Full-timeLeft
112Ben Foster21 Mar 201952100Full-timeActive

Showing the first 12 of 46 rows.

Department 6 rows, 3 columns
DepartmentIDDepartmentDivision
1AdministrationAdministration
2SalesSales
3ProductionOperations
4LogisticsOperations
5ITAdministration
6Customer ServiceSales
Absence 486 rows, 5 columns
AbsenceIDDateEmployeeIDTypeDays
11 Jan 2025111Sick leave2
22 Jan 2025101Vacation9
33 Jan 2025127Sick leave4
43 Jan 2025127Sick leave10
54 Jan 2025142Sick leave2
66 Jan 2025104Sick leave4
76 Jan 2025118Vacation3
87 Jan 2025124Sick leave4
97 Jan 2025134Vacation6
1012 Jan 2025113Vacation7
1115 Jan 2025115Sick leave4
1216 Jan 2025117Sick leave2

Showing the first 12 of 486 rows.

Measures: [Absence Days]

Date 730 rows, 4 columns
DateYearMonthMonthName
1 Jan 202520251Jan
2 Jan 202520251Jan
3 Jan 202520251Jan
4 Jan 202520251Jan
5 Jan 202520251Jan
6 Jan 202520251Jan
7 Jan 202520251Jan
8 Jan 202520251Jan
9 Jan 202520251Jan
10 Jan 202520251Jan
11 Jan 202520251Jan
12 Jan 202520251Jan

Showing the first 12 of 730 rows.

The period comes from the filter context of the cell, as in the lesson on filter context. Here it is the year 2026 from the slicer; the department in the row filters the people through the relationship.

Task 2: leavers

Task Create the measure "Leavers": the number of people whose leave date falls in the period of the cell. The matrix shows both years side by side with the new hires.

Employee 46 rows, 8 columns
EmployeeIDNameDepartmentIDHireDateLeaveDateSalaryEmploymentTypeStatus
101Sophie Lang11 Oct 202051500Full-timeActive
102Noah Walker11 Nov 202529600Part-timeActive
103Sophie Hayes11 Sep 202654100Full-timeActive
104Sam Price11 Aug 202460300Full-timeActive
105Ben Price11 Mar 201831 May 202666600Full-timeLeft
106Olivia Hughes11 Apr 202066000Full-timeActive
107Ben Bennett21 Nov 201244000Part-timeActive
108Jack Hughes21 Feb 201647600Full-timeActive
109Ben Hayes21 Apr 202131 Aug 202551000Full-timeLeft
110Lucy Clarke21 Oct 201957700Full-timeActive
111Ravi Ali21 Jul 202231 Mar 202548700Full-timeLeft
112Ben Foster21 Mar 201952100Full-timeActive

Showing the first 12 of 46 rows.

Measures: [New Hires]

Department 6 rows, 3 columns
DepartmentIDDepartmentDivision
1AdministrationAdministration
2SalesSales
3ProductionOperations
4LogisticsOperations
5ITAdministration
6Customer ServiceSales
Absence 486 rows, 5 columns
AbsenceIDDateEmployeeIDTypeDays
11 Jan 2025111Sick leave2
22 Jan 2025101Vacation9
33 Jan 2025127Sick leave4
43 Jan 2025127Sick leave10
54 Jan 2025142Sick leave2
66 Jan 2025104Sick leave4
76 Jan 2025118Vacation3
87 Jan 2025124Sick leave4
97 Jan 2025134Vacation6
1012 Jan 2025113Vacation7
1115 Jan 2025115Sick leave4
1216 Jan 2025117Sick leave2

Showing the first 12 of 486 rows.

Measures: [Absence Days]

Date 730 rows, 4 columns
DateYearMonthMonthName
1 Jan 202520251Jan
2 Jan 202520251Jan
3 Jan 202520251Jan
4 Jan 202520251Jan
5 Jan 202520251Jan
6 Jan 202520251Jan
7 Jan 202520251Jan
8 Jan 202520251Jan
9 Jan 202520251Jan
10 Jan 202520251Jan
11 Jan 202520251Jan
12 Jan 202520251Jan

Showing the first 12 of 730 rows.

This exercise is part of Premium.

Premium unlocks every exercise in every lesson, unlimited practice with fresh tasks and the final test with certificate.

See Premium Already Premium? Log in

The first exercise in this lesson is free.

With new hires and leavers side by side you can see whether the company is growing or shrinking. In 2025 more people left than joined, in 2026 it was the other way round.

Common mistakes

Comparing only the year

YEAR(Employee[HireDate]) = 2026 only works while the matrix shows years. By month every month would be the same. MIN and MAX adapt to any period.

Boundary without the equals sign

With > instead of >= everyone who joined on the first day of the period is missing. Start dates on the first of the month are the rule.

In real Power BI

  • Alternatively you connect Employee[HireDate] and Employee[LeaveDate] to the date table as inactive relationships and turn them on with USERELATIONSHIP. That is faster with many thousands of people, but makes the model harder to read.
  • Internal transfers (new department) are neither hires nor leavers. For those you need a table with the history per person.

Check your result

  • Task 1: There were 6 new hires in 2026, 4 of them in Production.
  • Task 2: 2025 shows 2 new hires and 6 leavers, 2026 shows 6 new hires and 3 leavers.

Next: case 3, turnover rate

Headcount at the start of the period and the employee turnover rate based on the average headcount.

Go to case 3

Back to case 1 or the course overview.

Write to us

Choose language

Select your preferred language