Average Project Duration
Average Project Duration: Average length, in days, of projects completed in the period.
Formula
Avg Duration = Sum of project durations / Number of projects Computable definition
The canonical formula in the GASP formula grammar. The MCP server compiles it to SQL over the datasets listed below.
avg(field.project_completion_date - field.project_start_date where in_period(field.project_completion_date)) Unit: days
Data requirements
Grain: Per event · Frequency: Per milestone · Aggregation: event · Staged: no · Main source: PSA.
| Field | Dataset | Type |
|---|---|---|
project_completion_date | project | date |
project_start_date | project | date |
snapshot_date | project | date |
Example SQL (Postgres)
SELECT (SELECT AVG((project_completion_date - project_start_date)) FROM project WHERE snapshot_date = :period_end AND (project_completion_date >= :period_start AND project_completion_date <= :period_end)) AS average_project_duration From an agent: with the GASP MCP server, call
lookup_metric({ "name": "Average Project Duration" }) or generate_query({ "metric": "Average Project Duration", "adapter": "<your adapter JSON>" }).