Compare Activity Trends Across Reporting Periods
The coordinator dashboard includes a period-over-period comparison capability exposed via the Report Filter Widget. The user selects a primary date range and optionally a comparison period (e.g., same period last year, or previous quarter). The Coordinator Report Service executes two parallel aggregation queries — one per period — and the dashboard renders both result sets side by side or as overlaid chart lines, with percentage change indicators. The Coordinator Stats Repository caches both queries independently so comparison periods do not invalidate each other's cache entries. This feature provides coordinators and administrators with trend context that a single-period view cannot provide.
User Story
Acceptance Criteria
- Given the user selects a primary reporting period and a comparison period, when the dashboard refreshes, then both periods' activity totals are displayed with a calculated percentage difference
- Given two periods are being compared, when the user views activity charts, then both trend lines are rendered with distinct visual treatment (color or line style) and a legend identifying each period
- Given the current period shows a decline compared to the reference period, when the user views the comparison, then the difference is highlighted in a visually distinct way to draw attention
- Given the user is comparing year-over-year data, when the dashboard displays results, then both periods respect the user's active scope and filter settings independently
- Given the comparison period data is already cached, when the user switches back to the same comparison selection, then results load from cache without a network query
- Given the user removes the comparison period, when the dashboard updates, then it reverts to displaying only the primary period data without residual comparison UI elements
Business Value
Single-period statistics show current volume but cannot confirm whether the program is improving. Coordinators and organization administrators regularly face questions from leadership about whether activity levels are growing year-over-year or whether interventions (e.g., new coordinator tools, peer mentor training) are having measurable effects. Period comparison provides the evidence layer needed for data-driven program management and makes annual report preparation significantly faster by surfacing trend data automatically.