Total Headcount
Total Headcount: Total number of active employees at the end of the period.
Formula
Headcount = Total active employees at end of period Computable definition
The canonical formula in the GASP formula grammar. The MCP server compiles it to SQL over the datasets listed below.
count_distinct(field.employee_id where field.employee_status = 'active') at period_end Unit: count
Breakdowns
by_department: one row perdepartmentvalue
Notes: Includes full-time and part-time employees. Contractors are tracked separately. by_department returns the active headcount of each department at period end.
Data requirements
Grain: End-of-month snapshot · Frequency: Monthly · Aggregation: snapshot (month) · Staged: no · Main source: HRIS.
| Field | Dataset | Type |
|---|---|---|
employee_id | employee | string |
employee_status | employee | string |
snapshot_date | employee | date |
Example SQL (Postgres)
SELECT (SELECT COUNT(DISTINCT employee_id) FROM employee WHERE snapshot_date = :period_end AND employee_status = 'active') AS total_headcount From an agent: with the GASP MCP server, call
lookup_metric({ "name": "Total Headcount" }) or generate_query({ "metric": "Total Headcount", "adapter": "<your adapter JSON>" }).