> Source: https://builder.ema.ai/v2/builder-guides/custom-metrics-views
> Title: Building a Custom Metrics View

# Building a Custom Metrics View

Every AI Employee has a **Metrics** tab. Ema fills it the first time you open it, using a default chart set chosen for that AI Employee's type. A chat AI Employee gets conversational charts, a Voice AI Employee gets call charts, and everything else gets an execution chart set.

You are not stuck with that starting set. You can add charts, change the ones that are there, move them, and remove them. This guide covers that work: building a chart, arranging the view, and getting your changes in front of the people who read the dashboard.

Your edits go to a **draft**. Readers keep seeing the last published version until you press **Publish**. Publishing is the only action that changes what other people see.

> [INFO]
> **Editing is on for admins and builders.** You do not have to ask for it to be switched on. If you hold an admin or builder role and the Metrics tab still shows no **Edit dashboard** control, chart editing has not been enabled for your Workspace. Ask your Ema contact.

> [INFO]
> **Orchestrator AI Employees have no Metrics tab.** Their tab set is fixed and does not include metrics. Everything on this page applies to the other AI Employee types.

## Who can edit

Editing is gated by your role. The controls below are simply absent for a role that cannot use them.

Role

What they can do on the Metrics tab

System Admin (`system_admin`)

Read, edit, publish, discard, revert, reset.

Builder Admin (`builder_admin`)

Read, edit, publish, discard, revert, reset.

User Admin (`user_admin`)

Read, edit, publish, discard, revert, reset.

Builder (`builder`)

Read, edit, publish, discard, revert, reset.

User (`user`)

Read only: view charts, filter, drill down, export, and open version history without the revert action.

No Access (`no_access`)

No access.

See [Governance and permissions](/builder/v2/administration/governance-and-permissions) for the full role model.

## Open the editor

1.  Open the AI Employee and select the **Metrics** tab.
2.  Select **Edit dashboard**.

Edit mode adds a toolbar above the charts:

Control

What it does

**Add**

Opens a menu with **Chart** and **Text Block**.

**Save layout**

Appears once you move or resize a tile. Saves the new geometry to the draft.

**Discard**

Appears beside **Save layout**. Throws away the pending move or resize only.

**Done**

Leaves edit mode. It neither publishes nor discards anything.

**Publish**

Makes the draft live. See [Draft and publish](#draft-and-publish).

**Discard draft**

Throws away every unpublished change on the dashboard.

**More actions** (`⋮`)

An overflow menu holding **Save as template**, **Theme settings**, and the reset action.

**History**

Opens the publish history, with revert.

**Download**

Opens the export wizard. Available to readers too.

**Refresh data**

Refetches every chart on screen.

You can also rename the dashboard in edit mode. Select the dashboard name or its description to edit it in place.

## Add a chart

Select **Add**, then **Chart**. The chart builder opens as a single screen with a live preview on the right.

The preview starts as a checklist of the three things a chart needs:

1.  Select a dataset.
2.  Choose a chart type.
3.  Add at least one measure.

The preview replaces the checklist with the real chart as soon as all three are set, and **Save Chart** becomes available.

### Step 1: Pick a dataset

A **dataset** is one curated slice of your Ema data, for example **Workflow** or **Tools**. It decides which measures and dimensions the rest of the form offers you, so nothing else is selectable until you choose one.

> [WARNING]
> **Changing the dataset clears your measures and dimensions.** They belong to the old dataset and have no meaning in the new one. The builder asks you to confirm first, in a **Change dataset?** dialog. Your chart type is kept.

### Step 2: Choose a chart type

Type

Use it for

KPI

A single headline number, such as total runs this week.

KPI bar

A row of headline numbers side by side.

Line, area

A value tracked over time.

Bar, stacked bar

A comparison across categories, such as runs by status.

Pie, donut

A share of a whole, where there are only a few categories.

Combo

Two measures on one chart with different shapes.

Heatmap

Density across two dimensions.

Table

The rows themselves, with paging.

### Step 3: Choose measures and grouping

-   **Measures** are the numbers the chart plots. Pick at least one. The list is scoped to the dataset you chose.
-   **Group by** splits those numbers across a dimension, such as status or tool name.
-   **Time** decides whether the chart has a time axis. Turn it on and pick a granularity (day, week, month). A KPI takes no granularity because it renders one value.
-   **Filters** narrow the rows the chart counts, for example a single status.

> [TIP]
> **The dashboard date range wins.** A chart does not carry its own date range. The dashboard's date picker applies to every chart on it that has a time axis, so set the window there rather than per chart.

### Step 4: Rank and cap the rows

For a chart grouped by a category, one row controls sorting and the row cap: **Show top N by** a measure, **Highest** or **Lowest**, and what happens to the rest.

On a plain bar chart you can fold the rows below the cap into a single **All others** bar instead of hiding them. Percentage labels then stay shares of the whole.

### Step 5: Set the appearance

Setting

Notes

Chart title

What readers see above the tile.

Colors

Assign a color per series, or inherit the dashboard theme.

Value labels

Label each bar or slice with its value, or with its percentage of the total.

Unit scale

A multiplier applied to every measure at render time. Use it to show a duration stored in milliseconds as seconds.

Compare to previous period

KPI only. Needs a bounded, day-level range to compare against, so it is unavailable on a chart with no time bound.

Rows per page

Table only. Leave it empty for one scrolling page.

Reference lines

Draw a target or threshold line across the chart.

### Step 6: Add a drill-down (optional)

Turn on drill-down and pick a template. Readers can then select a point on the chart and open a second dashboard scoped to what they selected.

### Step 7: Save

Select **Save Chart**. The chart appears on the dashboard, at the bottom of the grid.

> [WARNING]
> **Saving a chart does not publish it.** The chart is in your draft. Readers do not see it until you [publish](#draft-and-publish).

## Edit, duplicate, or delete a chart

Each tile has an options menu:

-   **Edit** reopens the builder on that chart, with everything filled in. The button reads **Update Chart**.
-   **Duplicate** copies the chart, which is the fastest way to build a variant.
-   **Delete** removes it from the draft.
-   **View raw data** opens the rows behind the chart, and offers **Download table data**.
-   **Filter data** applies a filter to this tile.

## Arrange the view

Drag a tile to move it and drag its corner to resize it. The grid is two columns wide, so a tile is either half width or full width.

Moving or resizing marks the layout as pending, not saved. Select **Save layout** to write it to the draft, or **Discard** to put the tiles back.

> [WARNING]
> **Save the layout before you publish.** Publish is blocked while a move or resize is still pending, and the toolbar says so: "Save your layout before publishing."

To label a group of charts, select **Add**, then **Text Block**, and choose a heading or subheading style. To change dashboard colors and chart defaults, open **More actions** (`⋮`) and select **Theme settings**.

## Draft and publish

This is the part worth reading carefully, because it decides what other people see.

-   The charts you edit are the **draft**. Only people who can edit the dashboard see it.
-   Readers see the **published version**.
-   **Publish is the only way a change goes live.** Saving a chart, saving a layout, deleting a tile, renaming the dashboard: all of them change the draft and none of them change what a reader sees.

The edit toolbar tells you where you stand. It shows the active version number, and a warning that reads "3 unpublished changes" when your draft is ahead.

### Publish

1.  Save any pending layout change.
2.  Optional: select the note icon beside **Publish** and write a note describing the change, then **Save note**. The note shows up in the version history.
3.  Select **Publish**.

A publish creates a new version and makes it the live one immediately. There is no phased rollout for a dashboard.

Two responses are worth knowing:

-   **"Already live, nothing to publish."** Your draft matches the published version, so no version was created. This is a normal result, not an error.
-   **"Someone else published since you opened this."** Another builder published while your editor was open. Ema refreshes the dashboard for you. Review what changed, then publish again.

### Work on top of someone else's draft

If a dashboard has an unpublished draft that you did not write, Ema tells you before you build on it.

-   In read mode you get a banner. **View draft** shows you the unpublished version read only, so you can see what is waiting.
-   Entering edit mode asks you to confirm: "Editing will build on their unpublished draft. Publishing makes their changes live too."

There is one draft per dashboard, so there is no way to publish your change while leaving theirs staged. Agree who publishes before you start.

### Discard the draft

**Discard draft** throws away every unpublished change on the dashboard and puts the active published version back into the draft. It does not change what readers see, because they were never seeing the draft.

This is not the same as **Discard** beside **Save layout**, which only abandons a pending move or resize.

## Revert to an earlier version

Select **History** to see the publish history, newest first. Each entry shows its version number, who published it, when, and the note if there was one. The live version is badged.

To go back to an earlier version:

1.  Select **Revert to this** on the version you want.
2.  Confirm. The dialog says it replaces your current draft, including any unpublished changes, and cannot be undone.
3.  The dashboard now shows that version as an unpublished draft.
4.  Select **Publish** to make it live.

> [WARNING]
> **Revert stages, it does not go live.** A revert writes the old version into your draft and stops there. Nothing changes for readers until you publish. This is deliberate: it lets you check the restored view before anyone else sees it.

A few details:

-   Readers can open the history to see what was published and when. They get no revert action.
-   The panel shows the most recent versions. If there are more, it says so.
-   If someone publishes while the panel is open, Ema refreshes the list and asks you to check it before you revert.

## Reset to the default charts

Open **More actions** (`⋮`) in the edit toolbar and select **Reset to default**. It puts back the chart set Ema would provision for this AI Employee's type.

Like a revert, it stages onto your draft: "This stages the default layout onto your draft. It won't go live until you publish." Confirm with **Stage default**, review, then publish.

A chart that originally came from the default set keeps its identity through the reset, so the version history records it as modified rather than removed and re-added.

> [INFO]
> **On a dashboard with no publish history the control is different.** It reads **Reset dashboard**, and it deletes the dashboard and returns you to the template picker. Your saved templates and the underlying analytics data are not affected.

## Filters, date range, and export

These are reading controls. They are personal to your session and are not part of the draft, so changing them never needs a publish.

-   **Date range.** One picker for the whole dashboard, defaulting to the last 7 days. It applies to every chart with a time axis.
-   **Dimension filters.** Add a filter chip to narrow the whole dashboard. Save a combination you use often as a preset.
-   **Comparison.** Compare the selected window against an earlier one.
-   **Refresh data.** Refetches every tile. The toolbar shows how old the data on screen is.
-   **Download.** Pick which charts to include and export them as one multi-sheet workbook, or as a ZIP of CSV files. Readers can export too.

For row-level conversational data rather than charts, see [Chat metrics](/builder/v2/testing-operations/chat-metrics).

## Troubleshooting

Symptom

Cause and fix

No **Edit dashboard** control.

Either editing is not enabled for your Workspace, or your role is read only. See [Who can edit](#who-can-edit).

You edited a chart and a colleague still sees the old one.

Your change is in the draft. Publish it.

**Publish** is unavailable and the toolbar mentions the layout.

A move or resize is still pending. Select **Save layout** first.

Publish reports "Already live, nothing to publish."

Your draft matches the published version. Nothing was lost and no version was created.

Publish reports that someone else published.

Ema has refreshed the dashboard. Review the merged state, then publish again.

No measures or dimensions are offered.

You have not chosen a dataset yet. The pickers are scoped to one dataset.

Your measures vanished.

You changed the dataset. Measures belong to a dataset and cannot carry over.

**Compare to previous period** is unavailable.

The chart has no bounded, day-level time range, so there is no earlier window to compare against.

You reverted a version and readers still see the old view.

A revert only stages. Publish to make it live.

A chart is missing for one reader but not another.

Cost and token charts are restricted, and some charts are hidden by Workspace configuration. Both are filtered per reader.

## What's next

-   [Workspace metrics views](/builder/v2/builder-guides/custom-metrics-workspace): the same editor on the Workspace-wide dashboard, plus saved templates.
-   [Launching and monitoring](/builder/v2/testing-operations/launching-and-monitoring): what the default charts show and how to read them after launch.
-   [Chat metrics](/builder/v2/testing-operations/chat-metrics): export the underlying rows for your own BI stack.
-   [Debug logs](/builder/v2/testing-operations/debug-logs): investigate a single run behind a number that moved.
