Skip to main content
The KPI widget surfaces a single headline metric — a number, percentage, trend, or comparison — pulled directly from a query result. It is designed to be read at a glance.

Reading the data

The KPI widget takes the first value from the first row of your query result. Write your query to return exactly one meaningful value:
If your query returns multiple rows, only the first row is used. If it returns multiple columns, only the first column is used as the primary metric — subsequent columns may be used by certain KPI types for comparison values. Null results display as . An empty result set (zero rows) also displays as , not 0.

KPI types

The KPI type controls how the query result is interpreted and displayed.

Display options

Open the KPI widget settings to configure what is shown alongside the metric. Prefix and suffix are visual only — they do not affect the underlying number or any calculations.

Number formatting

Control how the raw numeric value is displayed.
Multiply by and decimal places together — a common pattern is to set Multiply by to 0.001 and Decimal places to 1 to display a value stored in milliseconds as 1.2 s.

Compact notation

Compact notation abbreviates large numbers so they fit cleanly in the widget. Auto is recommended for metrics whose value can vary across orders of magnitude (e.g. revenue that might be in the thousands one month and millions the next).

Trend graph

Enable Show mini graph to display a small sparkline chart beneath the metric value. The sparkline is driven by the same query — it uses all rows returned, plotting each row as a point on the trend line. For the sparkline to be meaningful, write a query that returns multiple rows (one per time period):
The KPI displays the last row’s value as the headline number, and all rows as the sparkline.
If you enable the trend graph but your query returns only one row, the sparkline will appear as a flat line.

Directional signals

KPI signals show an up or down arrow next to the value to indicate direction. Useful for metrics where the viewer needs to know immediately whether the number is good or bad. Choose Negative for metrics like error rate, churn, or cost — where a higher number is worse.

Icon

The Icon field accepts an emoji character. It appears alongside the KPI title and acts as a quick visual identifier when multiple KPI widgets appear on the same dashboard. Examples: 💰 for revenue, 👥 for users, for performance, 🛒 for orders. The icon is decorative — it does not affect the value or any calculations.
Last modified on March 11, 2026