EnableYourData.com

KPI · HR

Headcount: formula and example.

Headcount is the number of employees on the payroll on a given date, regardless of how many hours they work. It is the simplest HR figure and the denominator of many other KPIs, such as turnover and absence frequency. Record who you include: only permanent and fixed-term employees, or also flexible workers, interns and agency staff.

Headcount formula

Number of employees with an active contract on the reference date

Worked example

On 1 October 2026 Acme Groothandel employed 150 people: 112 on permanent contracts, 26 on fixed-term contracts and 12 flexible workers. Headcount = 112 + 26 + 12 = 150.

Fictitious figures for Acme Groothandel, a sample wholesaler.

How to read this KPI

Headcount shows the size of your organisation in people and how growth or shrinkage develops. Track it monthly and set it next to FTE and personnel costs: rising headcount with flat FTE means more part-time work. Break it down by department and contract type to see where growth is happening.

Pitfalls with headcount

  • Not using a fixed reference date, so starters and leavers around month end make the figure jump.
  • Including agency staff and contractors in one report but not in another.
  • Removing employees with a future leaving date from the count too early.

SQL & DAX

Calculating headcount in SQL and DAX

Two examples on a fictitious data warehouse for Acme Groothandel: a PostgreSQL query and a measure for a Power BI model. Adjust table and column names to your own model.

SQL · PostgreSQL
SELECT m::date AS month_start,
       COUNT(e.employee_id) AS headcount,
       COUNT(e.employee_id) FILTER (WHERE e.contract_type = 'permanent') AS permanent,
       COUNT(e.employee_id) FILTER (WHERE e.contract_type = 'temporary') AS temporary,
       COUNT(e.employee_id) FILTER (WHERE e.contract_type = 'flex') AS flex
FROM generate_series(DATE '2026-01-01', DATE '2026-10-01', interval '1 month') AS m
LEFT JOIN employees e ON e.hire_date <= m
 AND (e.termination_date IS NULL OR e.termination_date > m)
GROUP BY m
ORDER BY m;
DAX · Power BI
Headcount =
VAR d = MAX ( 'Date'[Date] )
RETURN COUNTROWS ( FILTER ( ALL ( Employees ), Employees[HireDate] <= d && ( ISBLANK ( Employees[TerminationDate] ) || Employees[TerminationDate] > d ) ) )
Headcount vs PY % =
VAR PY = CALCULATE ( [Headcount], SAMEPERIODLASTYEAR ( 'Date'[Date] ) )
RETURN DIVIDE ( [Headcount] - PY, PY )

In ENABLE

Tracking this KPI in ENABLE

Plain-language questions

Ask for headcount per month, customer or product in the SQL Explorer with AI. The AI writes the SQL, you see the query and run it yourself; the AI only receives metadata.

Read more →

In your Power BI dashboard

Define the KPI as a measure in your Power BI model and show it in the portal, with "Last refreshed" next to it. Access profiles and optional row-level security decide who sees which figures.

Read more →

Custom dashboards (pilot)

Add the KPI as a tile to a custom dashboard, compared with last year. The Dashboard Builder is a pilot and can be switched on per client.

Read more →

Monthly targets

With the built-in Targets app you set a target for the KPI per month, so you see actuals and target side by side.

Read more →

FAQ

Frequently asked questions

What does headcount mean?

Headcount is the number of people employed by an organisation on a particular date. Everyone counts as one, whether they work full time or part time. For capacity, use FTE.

Do agency workers count towards headcount?

That is a choice you record yourself. Headcount often only includes people with an employment contract, with agency staff and contractors reported separately as the flexible workforce. Whatever you choose, be consistent across reports.

How do you calculate average headcount over a year?

Count employees on a fixed date each month, for example the first of the month, and take the average of those twelve figures. Use that average as the denominator for annual figures such as turnover and absence frequency.

Use AI on your own data. Securely, and without the headache.

In an online demo we show how ENABLE makes your data securely available and how you build on it: describing an app in the AI Builder, plain-language questions, dashboards and APIs. And how we set it up and manage it for you.