> ## Documentation Index
> Fetch the complete documentation index at: https://docs.enhanza.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Metrics

> Define a number once, such as revenue or order count, and pick it in every insight you build in Build.

> [!NOTE]
>
> Admins and Owners manage metrics. Creating or editing one also needs a Builder seat ([Build](https://docs.enhanza.com/build/overview.md)).

## Create a metric

A metric is one summary of a table, such as a sum or a count. It can be grouped by a date column, such as month, and by nothing else.

1. Go to `Metrics` and click `New metric`.
2. Pick the table the metric summarizes.
3. Under `Summarize`, pick one summary. For a formula, choose `Custom Expression`.
4. Optional: group it by a date column.
5. Click `Save`.
6. Enter a name and, optionally, a description, then click `Save`.

The metric shows in the `Metrics` list. If it has more than one summary or another grouping, Enhanza saves it as an insight instead and tells you what to remove.

## Use a metric in an insight

1. In Build, click `New insight`.
2. Pick the table the metric summarizes.
3. Under `Summarize`, pick your metric from the `Metrics` section.

`Measures`, in the same list, are the definitions Enhanza provides. You can also use a metric by name in a `Custom Expression`.

> [!NOTE]
>
> A metric shows only in insights that start from its table, not from a saved insight or model.

## Edit a metric

1. In `Metrics`, click the metric's name.
2. Change the summary, filters or grouping.
3. Click `Save`.
4. In the dialog, click `Save`. The metric keeps its name unless you type a new one.

Insights and reports that use the metric pick up the change.

## Delete a metric

1. In `Metrics`, open the metric's `⋮` menu and click `Delete Metric`.
2. Click `Delete`.

The metric moves to the trash. You can't delete a metric while an insight or report uses it. The message names them, so remove the metric from those first.

## Use metrics from your AI tool

Your AI tool, connected through the [MCP server](https://docs.enhanza.com/mcp-server.md), finds and runs your metrics. As an Admin or Owner, you can also ask it to save or delete a metric, which works without a Builder seat.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.