# KPI widget

> The KPI widget shows a single number from a view, such as open jobs or revenue this month, with an optional prefix, suffix and filter.

A KPI widget shows one number from a [view](/docs/views). Use it for the figures your team checks every day: open jobs, revenue this month, average rating, overdue invoices.

## Create a KPI

1. On the dashboard, choose **Add Widget**.
2. Enter a title, for example `Open jobs`.
3. Under **Widget Type**, choose **KPI**.
4. Under **Data Source**, select the view to read from.
5. Choose a **Measure Field** and an **Aggregation**.
6. Optionally add a **Prefix** or **Suffix**, and **Filters**.
7. Check the **Live Preview** and choose **Create**.

## Measure and aggregation

The number is one calculation over the rows of the view:

- Choose **All rows (count)** as the **Measure Field** to count records.
- Or choose a number field, then pick an **Aggregation**: **Sum**, **Average**, **Minimum**, **Maximum** or **Count**.

## Prefix and suffix

Add a short **Prefix** or **Suffix** to give the number context, such as a currency symbol or a unit. Each can be up to ten characters, for example `€` before the number or `%` after it.

## Filters

Under **Filters**, add conditions that define the number, then choose **Apply filters**. For an "Open jobs" KPI, you might add "Status is not Done".

The filter is part of the metric's definition. It is not an access control.

> **Tip:** If each person should only count their own rows, do not try to build that into the KPI's filter. Point the widget at a view whose [access filter](/docs/base-views) already limits rows for that person. One KPI then shows the right number for everyone.

## Examples

| Question | Measure Field | Aggregation | Filter | Prefix or suffix |
| --- | --- | --- | --- | --- |
| Open jobs | All rows (count) | Count | Status is not Done | |
| Paid revenue | Amount | Sum | Status is Paid | € |
| Average rating | Rating | Average | | Suffix: stars |

## Related

  - [Widgets](/docs/widgets): Compare all widget types.
  - [Chart widget](/docs/widgets/chart): Show trends and comparisons.
  - [Dashboards](/docs/dashboards): Create and arrange dashboards.

---

Source: https://community.sapugo.app/docs/widgets/kpi
