Case 2: due dates, delays and on-time rate
Are we on schedule? You calculate the delay of every task, count the overdue tasks at the end of every month and compare the on-time rate of the projects.
In short: DATEDIFF(Task[DueDate], Task[FinishDate], DAY) is the delay in days. A task is overdue at the cutoff MAX('Date'[Date]) if it was due by then and not finished yet. For the on-time rate, NOT ISBLANK(Task[FinishDate]) belongs in every condition.
Task 1: delay per task
Task Create the calculated column "Delay" in Task: the days from DueDate to FinishDate, using DATEDIFF. Tasks finished before the due date get a negative number.
Project 7 rows, 7 columns
| ProjectID | Project | Division | Manager | StartDate | EndDate | Budget |
|---|---|---|---|---|---|---|
| 1 | Website relaunch | Marketing | Emma Clarke | 3 Mar 2025 | 31 Oct 2025 | 157000 |
| 2 | ERP rollout | IT | Tom Walker | 5 May 2025 | 26 Jun 2026 | 341000 |
| 3 | Warehouse redesign | Operations | Emma Clarke | 1 Sep 2025 | 24 Apr 2026 | 147000 |
| 4 | Customer portal | IT | Tom Walker | 12 Jan 2026 | 18 Dec 2026 | 267000 |
| 5 | Trade show 2026 | Marketing | Emma Clarke | 2 Feb 2026 | 25 Sep 2026 | 145000 |
| 6 | Warehouse scanners | Operations | Tom Walker | 4 May 2026 | 26 Feb 2027 | 203000 |
| 7 | Data center move | IT | Emma Clarke | 1 Feb 2027 | 24 Sep 2027 | 164000 |
Task 52 rows, 7 columns
| TaskID | ProjectID | Task | StartDate | DueDate | FinishDate | PlannedHours |
|---|---|---|---|---|---|---|
| 1 | 1 | Project management | 3 Mar 2025 | 31 Oct 2025 | 12 Nov 2025 | 385 |
| 2 | 1 | Briefing | 3 Mar 2025 | 9 May 2025 | 2 May 2025 | 130 |
| 3 | 1 | Campaign concept | 7 Apr 2025 | 6 Jun 2025 | 13 Jun 2025 | 333 |
| 4 | 1 | Visual design | 12 May 2025 | 11 Jul 2025 | 4 Jul 2025 | 504 |
| 5 | 1 | Copywriting | 16 Jun 2025 | 15 Aug 2025 | 12 Aug 2025 | 288 |
| 6 | 1 | Production | 14 Jul 2025 | 19 Sep 2025 | 16 Sep 2025 | 510 |
| 7 | 1 | Launch | 18 Aug 2025 | 24 Oct 2025 | 21 Oct 2025 | 220 |
| 8 | 2 | Project management | 5 May 2025 | 26 Jun 2026 | 22 Jun 2026 | 720 |
| 9 | 2 | Requirements | 5 May 2025 | 8 Aug 2025 | 8 Aug 2025 | 504 |
| 10 | 2 | Design concept | 23 Jun 2025 | 26 Sep 2025 | 19 Sep 2025 | 322 |
| 11 | 2 | Build phase 1 | 11 Aug 2025 | 14 Nov 2025 | 20 Nov 2025 | 650 |
| 12 | 2 | Build phase 2 | 6 Oct 2025 | 2 Jan 2026 | 6 Jan 2026 | 650 |
Showing the first 12 of 52 rows.
Timesheet 673 rows, 5 columns
| EntryID | Date | TaskID | ResourceID | Hours |
|---|---|---|---|---|
| 1 | 7 Mar 2025 | 1 | 1 | 13 |
| 2 | 7 Mar 2025 | 2 | 2 | 13.5 |
| 3 | 14 Mar 2025 | 1 | 1 | 10 |
| 4 | 14 Mar 2025 | 2 | 2 | 15.5 |
| 5 | 21 Mar 2025 | 1 | 1 | 10 |
| 6 | 21 Mar 2025 | 2 | 2 | 12.5 |
| 7 | 28 Mar 2025 | 1 | 1 | 12.5 |
| 8 | 28 Mar 2025 | 2 | 2 | 14 |
| 9 | 4 Apr 2025 | 1 | 1 | 12.5 |
| 10 | 4 Apr 2025 | 2 | 2 | 14 |
| 11 | 11 Apr 2025 | 1 | 1 | 14 |
| 12 | 11 Apr 2025 | 2 | 2 | 15 |
Showing the first 12 of 673 rows.
Measures: [Actual Hours]
Resource 10 rows, 5 columns
| ResourceID | Name | Role | HourlyRate | DailyHours |
|---|---|---|---|---|
| 1 | Emma Clarke | Project manager | 95 | 8 |
| 2 | Tom Walker | Project manager | 95 | 8 |
| 3 | Lucy Evans | Developer | 85 | 8 |
| 4 | Ravi Patel | Logistics planner | 75 | 8 |
| 5 | Mia Lang | Developer | 80 | 6 |
| 6 | Sam Kerr | Consultant | 110 | 8 |
| 7 | Grace Ross | Designer | 75 | 8 |
| 8 | Ben Hughes | Logistics planner | 70 | 8 |
| 9 | Olivia Turner | Marketing | 70 | 6 |
| 10 | Jack Brooks | Purchasing | 65 | 8 |
Date 730 rows, 4 columns
| Date | Year | Month | MonthName |
|---|---|---|---|
| 1 Jan 2025 | 2025 | 1 | Jan |
| 2 Jan 2025 | 2025 | 1 | Jan |
| 3 Jan 2025 | 2025 | 1 | Jan |
| 4 Jan 2025 | 2025 | 1 | Jan |
| 5 Jan 2025 | 2025 | 1 | Jan |
| 6 Jan 2025 | 2025 | 1 | Jan |
| 7 Jan 2025 | 2025 | 1 | Jan |
| 8 Jan 2025 | 2025 | 1 | Jan |
| 9 Jan 2025 | 2025 | 1 | Jan |
| 10 Jan 2025 | 2025 | 1 | Jan |
| 11 Jan 2025 | 2025 | 1 | Jan |
| 12 Jan 2025 | 2025 | 1 | Jan |
Showing the first 12 of 730 rows.
The delay belongs to each task and does not depend on the filter, so it is a calculated column. With it you can sort tasks by delay or put them into groups.
Task 2: overdue tasks at month end
Task How many tasks were overdue at the end of each month? Create the measure "Overdue Tasks": all tasks that were due by the cutoff (DueDate on or before the cutoff) and not finished yet (FinishDate blank or after the cutoff). The cutoff is the last day of the period; store it in a variable.
Project 7 rows, 7 columns
| ProjectID | Project | Division | Manager | StartDate | EndDate | Budget |
|---|---|---|---|---|---|---|
| 1 | Website relaunch | Marketing | Emma Clarke | 3 Mar 2025 | 31 Oct 2025 | 157000 |
| 2 | ERP rollout | IT | Tom Walker | 5 May 2025 | 26 Jun 2026 | 341000 |
| 3 | Warehouse redesign | Operations | Emma Clarke | 1 Sep 2025 | 24 Apr 2026 | 147000 |
| 4 | Customer portal | IT | Tom Walker | 12 Jan 2026 | 18 Dec 2026 | 267000 |
| 5 | Trade show 2026 | Marketing | Emma Clarke | 2 Feb 2026 | 25 Sep 2026 | 145000 |
| 6 | Warehouse scanners | Operations | Tom Walker | 4 May 2026 | 26 Feb 2027 | 203000 |
| 7 | Data center move | IT | Emma Clarke | 1 Feb 2027 | 24 Sep 2027 | 164000 |
Task 52 rows, 7 columns
| TaskID | ProjectID | Task | StartDate | DueDate | FinishDate | PlannedHours |
|---|---|---|---|---|---|---|
| 1 | 1 | Project management | 3 Mar 2025 | 31 Oct 2025 | 12 Nov 2025 | 385 |
| 2 | 1 | Briefing | 3 Mar 2025 | 9 May 2025 | 2 May 2025 | 130 |
| 3 | 1 | Campaign concept | 7 Apr 2025 | 6 Jun 2025 | 13 Jun 2025 | 333 |
| 4 | 1 | Visual design | 12 May 2025 | 11 Jul 2025 | 4 Jul 2025 | 504 |
| 5 | 1 | Copywriting | 16 Jun 2025 | 15 Aug 2025 | 12 Aug 2025 | 288 |
| 6 | 1 | Production | 14 Jul 2025 | 19 Sep 2025 | 16 Sep 2025 | 510 |
| 7 | 1 | Launch | 18 Aug 2025 | 24 Oct 2025 | 21 Oct 2025 | 220 |
| 8 | 2 | Project management | 5 May 2025 | 26 Jun 2026 | 22 Jun 2026 | 720 |
| 9 | 2 | Requirements | 5 May 2025 | 8 Aug 2025 | 8 Aug 2025 | 504 |
| 10 | 2 | Design concept | 23 Jun 2025 | 26 Sep 2025 | 19 Sep 2025 | 322 |
| 11 | 2 | Build phase 1 | 11 Aug 2025 | 14 Nov 2025 | 20 Nov 2025 | 650 |
| 12 | 2 | Build phase 2 | 6 Oct 2025 | 2 Jan 2026 | 6 Jan 2026 | 650 |
Showing the first 12 of 52 rows.
Timesheet 673 rows, 5 columns
| EntryID | Date | TaskID | ResourceID | Hours |
|---|---|---|---|---|
| 1 | 7 Mar 2025 | 1 | 1 | 13 |
| 2 | 7 Mar 2025 | 2 | 2 | 13.5 |
| 3 | 14 Mar 2025 | 1 | 1 | 10 |
| 4 | 14 Mar 2025 | 2 | 2 | 15.5 |
| 5 | 21 Mar 2025 | 1 | 1 | 10 |
| 6 | 21 Mar 2025 | 2 | 2 | 12.5 |
| 7 | 28 Mar 2025 | 1 | 1 | 12.5 |
| 8 | 28 Mar 2025 | 2 | 2 | 14 |
| 9 | 4 Apr 2025 | 1 | 1 | 12.5 |
| 10 | 4 Apr 2025 | 2 | 2 | 14 |
| 11 | 11 Apr 2025 | 1 | 1 | 14 |
| 12 | 11 Apr 2025 | 2 | 2 | 15 |
Showing the first 12 of 673 rows.
Measures: [Actual Hours]
Resource 10 rows, 5 columns
| ResourceID | Name | Role | HourlyRate | DailyHours |
|---|---|---|---|---|
| 1 | Emma Clarke | Project manager | 95 | 8 |
| 2 | Tom Walker | Project manager | 95 | 8 |
| 3 | Lucy Evans | Developer | 85 | 8 |
| 4 | Ravi Patel | Logistics planner | 75 | 8 |
| 5 | Mia Lang | Developer | 80 | 6 |
| 6 | Sam Kerr | Consultant | 110 | 8 |
| 7 | Grace Ross | Designer | 75 | 8 |
| 8 | Ben Hughes | Logistics planner | 70 | 8 |
| 9 | Olivia Turner | Marketing | 70 | 6 |
| 10 | Jack Brooks | Purchasing | 65 | 8 |
Date 730 rows, 4 columns
| Date | Year | Month | MonthName |
|---|---|---|---|
| 1 Jan 2025 | 2025 | 1 | Jan |
| 2 Jan 2025 | 2025 | 1 | Jan |
| 3 Jan 2025 | 2025 | 1 | Jan |
| 4 Jan 2025 | 2025 | 1 | Jan |
| 5 Jan 2025 | 2025 | 1 | Jan |
| 6 Jan 2025 | 2025 | 1 | Jan |
| 7 Jan 2025 | 2025 | 1 | Jan |
| 8 Jan 2025 | 2025 | 1 | Jan |
| 9 Jan 2025 | 2025 | 1 | Jan |
| 10 Jan 2025 | 2025 | 1 | Jan |
| 11 Jan 2025 | 2025 | 1 | Jan |
| 12 Jan 2025 | 2025 | 1 | Jan |
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.
The pattern is the same as for headcount at a cutoff date: the tasks are not related to the date table, and the measure takes the cutoff from the filter. The lesson on variables explains how VAR works.
Task 3: on-time rate
Task Create the measure "On-time Rate": the share of finished tasks that were done by their due date (FinishDate on or before DueDate) among all finished tasks, using DIVIDE. Open tasks count neither in the numerator nor in the denominator.
Project 7 rows, 7 columns
| ProjectID | Project | Division | Manager | StartDate | EndDate | Budget |
|---|---|---|---|---|---|---|
| 1 | Website relaunch | Marketing | Emma Clarke | 3 Mar 2025 | 31 Oct 2025 | 157000 |
| 2 | ERP rollout | IT | Tom Walker | 5 May 2025 | 26 Jun 2026 | 341000 |
| 3 | Warehouse redesign | Operations | Emma Clarke | 1 Sep 2025 | 24 Apr 2026 | 147000 |
| 4 | Customer portal | IT | Tom Walker | 12 Jan 2026 | 18 Dec 2026 | 267000 |
| 5 | Trade show 2026 | Marketing | Emma Clarke | 2 Feb 2026 | 25 Sep 2026 | 145000 |
| 6 | Warehouse scanners | Operations | Tom Walker | 4 May 2026 | 26 Feb 2027 | 203000 |
| 7 | Data center move | IT | Emma Clarke | 1 Feb 2027 | 24 Sep 2027 | 164000 |
Task 52 rows, 7 columns
| TaskID | ProjectID | Task | StartDate | DueDate | FinishDate | PlannedHours |
|---|---|---|---|---|---|---|
| 1 | 1 | Project management | 3 Mar 2025 | 31 Oct 2025 | 12 Nov 2025 | 385 |
| 2 | 1 | Briefing | 3 Mar 2025 | 9 May 2025 | 2 May 2025 | 130 |
| 3 | 1 | Campaign concept | 7 Apr 2025 | 6 Jun 2025 | 13 Jun 2025 | 333 |
| 4 | 1 | Visual design | 12 May 2025 | 11 Jul 2025 | 4 Jul 2025 | 504 |
| 5 | 1 | Copywriting | 16 Jun 2025 | 15 Aug 2025 | 12 Aug 2025 | 288 |
| 6 | 1 | Production | 14 Jul 2025 | 19 Sep 2025 | 16 Sep 2025 | 510 |
| 7 | 1 | Launch | 18 Aug 2025 | 24 Oct 2025 | 21 Oct 2025 | 220 |
| 8 | 2 | Project management | 5 May 2025 | 26 Jun 2026 | 22 Jun 2026 | 720 |
| 9 | 2 | Requirements | 5 May 2025 | 8 Aug 2025 | 8 Aug 2025 | 504 |
| 10 | 2 | Design concept | 23 Jun 2025 | 26 Sep 2025 | 19 Sep 2025 | 322 |
| 11 | 2 | Build phase 1 | 11 Aug 2025 | 14 Nov 2025 | 20 Nov 2025 | 650 |
| 12 | 2 | Build phase 2 | 6 Oct 2025 | 2 Jan 2026 | 6 Jan 2026 | 650 |
Showing the first 12 of 52 rows.
Timesheet 673 rows, 5 columns
| EntryID | Date | TaskID | ResourceID | Hours |
|---|---|---|---|---|
| 1 | 7 Mar 2025 | 1 | 1 | 13 |
| 2 | 7 Mar 2025 | 2 | 2 | 13.5 |
| 3 | 14 Mar 2025 | 1 | 1 | 10 |
| 4 | 14 Mar 2025 | 2 | 2 | 15.5 |
| 5 | 21 Mar 2025 | 1 | 1 | 10 |
| 6 | 21 Mar 2025 | 2 | 2 | 12.5 |
| 7 | 28 Mar 2025 | 1 | 1 | 12.5 |
| 8 | 28 Mar 2025 | 2 | 2 | 14 |
| 9 | 4 Apr 2025 | 1 | 1 | 12.5 |
| 10 | 4 Apr 2025 | 2 | 2 | 14 |
| 11 | 11 Apr 2025 | 1 | 1 | 14 |
| 12 | 11 Apr 2025 | 2 | 2 | 15 |
Showing the first 12 of 673 rows.
Measures: [Actual Hours]
Resource 10 rows, 5 columns
| ResourceID | Name | Role | HourlyRate | DailyHours |
|---|---|---|---|---|
| 1 | Emma Clarke | Project manager | 95 | 8 |
| 2 | Tom Walker | Project manager | 95 | 8 |
| 3 | Lucy Evans | Developer | 85 | 8 |
| 4 | Ravi Patel | Logistics planner | 75 | 8 |
| 5 | Mia Lang | Developer | 80 | 6 |
| 6 | Sam Kerr | Consultant | 110 | 8 |
| 7 | Grace Ross | Designer | 75 | 8 |
| 8 | Ben Hughes | Logistics planner | 70 | 8 |
| 9 | Olivia Turner | Marketing | 70 | 6 |
| 10 | Jack Brooks | Purchasing | 65 | 8 |
Date 730 rows, 4 columns
| Date | Year | Month | MonthName |
|---|---|---|---|
| 1 Jan 2025 | 2025 | 1 | Jan |
| 2 Jan 2025 | 2025 | 1 | Jan |
| 3 Jan 2025 | 2025 | 1 | Jan |
| 4 Jan 2025 | 2025 | 1 | Jan |
| 5 Jan 2025 | 2025 | 1 | Jan |
| 6 Jan 2025 | 2025 | 1 | Jan |
| 7 Jan 2025 | 2025 | 1 | Jan |
| 8 Jan 2025 | 2025 | 1 | Jan |
| 9 Jan 2025 | 2025 | 1 | Jan |
| 10 Jan 2025 | 2025 | 1 | Jan |
| 11 Jan 2025 | 2025 | 1 | Jan |
| 12 Jan 2025 | 2025 | 1 | Jan |
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.
The on-time rate is a share, like the rates in the earlier cases. What matters is that numerator and denominator look at the same tasks: only the finished ones.
Common mistakes
A blank date in a comparison
Without NOT ISBLANK in the numerator every open task counts as on time, because a blank date is smaller than any other date in a comparison. The warehouse scanners would then show 100% instead of 25%: the three open tasks land in the numerator but not in the denominator.
Overdue only when FinishDate is blank
Checking only ISBLANK(Task[FinishDate]) shows only today's status. A task due in March and finished in May was overdue at the end of March and of April. The condition Task[FinishDate] > Cutoff brings it back.
Start and end swapped
DATEDIFF(Task[FinishDate], Task[DueDate], DAY) flips the sign: late tasks then show up as negative.
In real Power BI
- Delays in working days instead of calendar days need a working-day column in the date table and a count of the days in between.
- For milestones, milestone trend analysis is common: how has the planned date moved from report to report? That needs one date per reporting snapshot. In Excel you practice it in the case milestone trend analysis.
Check your result
- Task 1: Project management for the website relaunch was due on 31 Oct 2025 and finished on 12 Nov 2025, delay 12. The briefing was due on 9 May 2025 and finished on 2 May 2025 already, delay -7.
- Task 2: In 2026, 2 tasks each were overdue at the end of February, April and September, and 1 each at the end of June, November and December. In the other months nothing was overdue.
- Task 3: The website relaunch has the best on-time rate with 71.4%, the warehouse scanners the worst with 25%, and the total is 50%.
Back to case 1 or the course overview.