Aged backlog (> 7 days)¶
How much of the open work is already old enough to hurt the SLA?
Current value (service case data): 76.7% - ✕ Act. Open the case.
| Field | Value |
|---|---|
| Definition | Share of open tickets whose age at the snapshot date exceeds the age limit. |
| Formula | count(open AND age_days > age_limit_days) / count(open) |
| Unit | % |
| Granularity | Snapshot of open tickets; taken daily or weekly per queue. |
| Direction | Lower is better ↓ |
| Target and thresholds | ≤ 10.0% (amber ≤ 20.0%) |
| Parameters | age_limit_days = 7 |
| Owner | Queue Team Lead |
| Source | Ticketing system (synthetic generator) |
| Input | table tickets, columns status, age_days |
| Recommended chart | bar - Stacked age buckets per queue show where the old work sits. |
| Related KPIs | SLA compliance, Resolution time (median) |
How to read it¶
A leading indicator: tickets that are old today become SLA breaches when they close. Rising aged share with a flat backlog size means work is being cherry-picked (easy tickets first).
Common misreadings¶
- Backlog size alone can stay flat while its age explodes; always look at age.
- A snapshot on Monday morning and one on Friday evening are not comparable; fix the snapshot moment.
Worked example (from the test suite)¶
| status | age_days |
|---|---|
| open | 2.0 |
| open | 8.0 |
| open | 15.0 |
| open | 7.0 |
| resolved | – |
Parameters: age_limit_days = 7
Expected result: 50.00%. Open tickets aged 2, 8, 15, 7 days. Older than 7 days: 8 and 15 (exactly 7 is not older). 2 / 4 = 0.5.
This example is asserted in tests/test_formulas.py against the Python function and in tests/test_sql.py against the SQL below.
Implementations¶
Python function (the single implementation used by the site):
@kpi("backlog_aged_share")
def backlog_aged_share(df: pd.DataFrame, age_limit_days: float) -> float:
open_ = df[df["status"].eq("open")]
return safe_ratio((open_["age_days"] > age_limit_days).sum(), len(open_))
Reference SQL (tested on SQLite):
SELECT CAST(SUM(CASE WHEN age_days > 7 THEN 1 ELSE 0 END) AS REAL) / COUNT(*)
FROM tickets WHERE status = 'open'