Skip to content
Back to Blog
Business Intelligence October 20, 2026 8 min read

KPI Examples: Definition, Formulas and How to Build a KPI Dashboard

A KPI is a measure tied to a goal, with a formula, an owner and a target. Here are concrete KPI examples by department and a method to put them on a dashboard people actually use.

KPI Examples: Definition, Formulas and How to Build a KPI Dashboard

What is a KPI?

A KPI (key performance indicator) is a number that tells you whether you are reaching a specific business goal. "Monthly revenue" is a metric; "monthly revenue versus a 2 million MAD target, owned by the sales director, reviewed every Monday" is a KPI. The difference is the link to a goal, a target and someone accountable.

Every KPI is a metric, but most metrics are not KPIs. A company can track hundreds of numbers; only a handful deserve a place at the top of a dashboard.

What is the difference between a KPI, a metric and an OKR?

ConceptWhat it isExample
MetricAny measured valueNumber of website visits
KPIA metric tied to a goal, with a target and an ownerConversion rate ≥ 2.5 % this quarter
OKRAn objective plus 3–5 measurable key results, usually quarterly"Grow online sales": reach 1,200 orders, cut cart abandonment to 60 %
Leading indicatorMoves before the resultNumber of qualified quotes sent
Lagging indicatorConfirms the result after the factRevenue invoiced

A useful dashboard mixes both: lagging KPIs tell you where you are, leading KPIs tell you where you are going.

What makes a good KPI?

The classic SMART checklist (specific, measurable, achievable, relevant, time-bound) still works. In practice, five questions are enough:

  • Is the formula written down? "Margin" can mean gross margin, contribution margin or net margin. If two people compute it differently, it is not a KPI yet.
  • Where does the data come from? ERP, CRM, accounting software, a spreadsheet maintained by hand.
  • Who owns it? One person or role who explains the number and acts on it.
  • What is the target and the alert threshold? Without a target, a number is just information.
  • Can someone act on it? If nobody changes a decision when it moves, remove it.

KPI examples by department

The table below lists common KPIs with their formula. Adapt names and targets to your sector.

DepartmentKPIFormula
SalesRevenue vs targetRevenue / Target revenue
SalesAverage order valueRevenue / Number of orders
SalesQuote conversion rateQuotes won / Quotes sent
MarketingCost per leadMarketing spend / Leads generated
MarketingWebsite conversion rateOrders (or forms) / Sessions
FinanceGross margin %(Revenue − Cost of goods sold) / Revenue
FinanceDays sales outstanding (DSO)(Accounts receivable / Revenue of the period) × Days in the period
Customer serviceFirst contact resolutionTickets solved at first contact / Total tickets
CustomerChurn rateCustomers lost in the period / Customers at start of period
OperationsOn-time delivery rateOrders delivered on time / Orders delivered
OperationsStock rotationCost of goods sold / Average stock value
HRAbsenteeism rateDays absent / Days worked planned
HRTurnoverDepartures in the period / Average headcount

Sector examples in Morocco

  • Retail and distribution: sales per square metre, stock-outs, average basket, sales per store and per region (Casablanca-Settat, Rabat-Salé-Kénitra, Tanger…).
  • Telecom and subscription services: churn, ARPU (average revenue per user), activations per channel.
  • Banking and insurance: cost-to-income ratio, non-performing loan ratio, claims processing time.
  • Public administration and social-security-type data: processing time per file, declarations received on time, coverage rate per region. The CNSS decision-support project is an example of indicators read by period, region and category.

How do you define a KPI? The KPI sheet

Before building any chart, write a one-page KPI sheet for each indicator and get it validated by its owner:

FieldExample
NameOn-time delivery rate
Business questionAre we keeping our delivery promise?
FormulaOrders delivered on or before the promised date / Orders delivered
SourceOrder management system, table of deliveries
Grain and filtersPer order; excludes cancelled orders
FrequencyWeekly, reviewed every Monday
OwnerLogistics manager
Target / alertTarget ≥ 95 %, alert below 90 %

This sheet prevents the most common dashboard problem: two reports showing two different numbers for the "same" KPI.

How do you calculate a KPI in SQL or DAX?

Once the definition is fixed, the calculation is usually short. In SQL (PostgreSQL), the on-time delivery rate per month:

SELECT
    date_trunc('month', delivered_at)::date AS month,
    ROUND(
        100.0 * COUNT(*) FILTER (WHERE delivered_at <= promised_at)
        / NULLIF(COUNT(*), 0),
        1
    ) AS on_time_rate_pct
FROM deliveries
WHERE status <> 'cancelled'
GROUP BY 1
ORDER BY 1;

In Power BI, the same logic as DAX measures, assuming a Deliveries fact table and a date table:

Delivered Orders =
COUNTROWS ( FILTER ( Deliveries, Deliveries[Status] <> "cancelled" ) )

On-Time Orders =
COUNTROWS (
    FILTER (
        Deliveries,
        Deliveries[Status] <> "cancelled"
            && Deliveries[DeliveredAt] <= Deliveries[PromisedAt]
    )
)

On-Time Rate % = DIVIDE ( [On-Time Orders], [Delivered Orders] )

Measures like these only behave correctly on a clean model. If filters by date or region give strange totals, the issue is usually the data model; see how to build a Power BI star schema and the essential DAX formulas.

How many KPIs should a dashboard show?

For a management dashboard, 5 to 8 KPIs on the first page is a good order of magnitude. Beyond that, nobody reads them. A simple layout:

  1. Top row: the main KPIs as cards, each with its value, target and trend versus the previous period.
  2. Middle: one or two charts that explain the main KPI (trend over time, breakdown by region or product).
  3. Bottom or second page: detail tables for people who need to investigate.

Other rules that make dashboards usable:

  • One audience per dashboard: executives, sales managers and operations need different views.
  • Colours carry meaning (red only for an alert), not decoration.
  • Always show the comparison: versus target, versus last month, versus same period last year.
  • Show the data refresh date so users know how fresh the numbers are.

Power BI has a dedicated KPI visual (value, target and trend); its behaviour is documented on Microsoft Learn. For page-by-page layout ideas, see these Power BI dashboard examples.

Common KPI mistakes to avoid

  • Vanity metrics: page views or followers that look good but do not drive a decision.
  • Too many KPIs: when everything is "key", nothing is.
  • No single definition: finance and sales each compute margin their own way.
  • Targets that nobody owns: a red KPI that nobody is responsible for stays red.
  • Manual data: a KPI rebuilt by hand each month in Excel is slow and error-prone; automate the data flow once the definition is stable.
  • Ignoring data quality: duplicates, missing dates or wrong codes silently distort KPIs. Basic checks, like those described in data quality and anomaly detection, catch these problems before they reach the dashboard.

Conclusion

A KPI is a number with a purpose: a goal, a formula, an owner and a target. Start with a short list per audience, write a KPI sheet for each, compute them on a clean model, and display them with a comparison so people can act. In the D&A Studio platform, for example, Power BI dashboards were built on top of explicit KPI definitions (see the project).

If you want help defining your indicators or turning them into a Power BI dashboard, see the Power BI dashboard service.

KPIDashboardPower BIBusiness IntelligenceData analysisPerformance management
Anass Essadikine

About the author

Anass Essadikine

Data & AI Engineer and Software Engineer based in Casablanca, Morocco. I build data platforms, Power BI dashboards, RAG assistants and Next.js / Spring Boot applications.

Related projects

Frequently asked questions

KPI stands for key performance indicator. It is a measurable value linked to a business goal, with a defined formula, an owner and a target, used to check whether the goal is being reached.

Keep reading

All articles

Looking for someone with these skills?

I'm open to freelance projects, internships and full-time roles. Let's talk.