Create and manage metrics
A metric is a custom aggregate calculation that can be reused across data elements that share a data source. If you define metrics in data models, datasets, or tables from a connected database or catalog, you can help users perform calculations in a consistent way both easily and efficiently.
This document explains how to create and manage metrics for improved metrics governance. For information about using metrics in workbook data elements, see Use metrics in a workbook.
For more details about metrics, including limitations and best practices, see About metrics.
User requirements
The ability to create and manage metrics in data models requires the following:
- You must be assigned an account type with the Create, edit, and publish data models permission enabled.
- You must be the dataset owner or be granted Can edit access to the data model.
The ability to create and manage metrics in datasets requires the following:
- You must be assigned an account type with the Create, edit, and publish data models permission enabled.
- You must be the dataset owner or be granted Can edit access to the dataset.
The ability to create and manage metrics in database or catalog tables requires the following:
- You must be be granted Can use & annotate data access for the specific table, or you must inherit the permission granted at the applicable connection, database or catalog, or schema level.
Work with metrics in data models
Add, highlight, and update metrics in data models.
Create a metric in a data model
-
Open the data model for editing.
-
Select the data model element that you want to add a metric to.
-
In the editor panel, select the Modeling tab.
If you don't see a Modeling tab, you can also add a metric in the Metrics tab of the Element Properties. -
In the Metrics section, select + (Add metric).
The Add a metric modal appears.
-
In the Name field, enter a name to use for the metric.
-
In the Description field, enter a description about what the metric does. The description appears when a user hovers over the metric.
-
In the Formula field, define the metric logic. You can use Sigma functions, reference any column in the data model table, or reference another metric.
-
[optional] Turn on the Timeline switch to display a timeline for the metric on the data model overview page.
- For Date, choose a date column in your data to use for the timeline.
- For Truncation, choose how you want to truncate the date, or choose to remove the date truncation and use the existing granularity of the date column.
- [optional] For Compare period, choose the comparison period for the metric, or choose None.
- [optional] For Direction, choose the direction for the comparison trend, or choose None.
-
Review the Preview for your metric and optionally define a format for the output of the metric.
For example, you can specify the formula result as a currency or a percentage, set the number of decimal places, or select options from the full format menu by clicking the number format menu (
).
Metrics define aggregate calculations. If the preview displays a null value, your formula might be missing an aggregate function, such as
Sum(),Avg(), orCount(). For more information, see Aggregate functions. -
Publish the data model to make the changes available downstream.
Highlight a metric in the data model overview
By default, up to six metrics that you create in a data model appear on the data model overview page. To change which metrics appear, you can choose to highlight specific metrics on the overview page and display only those.
-
Open the data model for editing.
-
Select the data model element that you want to add a metric to.
-
In the editor panel, select the Modeling tab.
-
In the Modeling tab of the editor panel, in the Metrics section, locate the metric.
-
For the metric, click More (
), then select Highlight in overview.
-
Publish the data model to make the changes available.
Highlighted metrics can be explored by anyone with access to the data model. For more details, see Navigate data models.
Edit a metric in a data model
To modify a metric, do the following:
-
Open the data model for editing.
-
Select the table on which the metric is defined.
-
In the Modeling tab of the editor panel, in the Metrics section, locate the metric.
-
Click
(Edit metric...).
-
Make any desired changes, then click Save.
-
Publish the data model to make the changes available downstream.
Columns and metrics that use the metric update to use the revised metric.
Delete a metric in a data model
To delete a metric, do the following:
-
Open the data model for editing.
-
Select the table on which the metric is defined.
-
In the Modeling tab of the editor panel, in the Metrics section, locate the metric.
-
For the metric, click More (
), then select Delete.
-
Publish the data model to make the changes available downstream.
Any columns or metrics that rely on the deleted metric display an error.
Configure a default timeline for metrics
You can define a default configuration for metric timelines and comparisons in your data model. A default timeline configuration allows you to specify a consistent date column, truncation, comparison period, and comparison direction for metrics created on a data element.
Default metric timelines only apply to metrics in the data model they are defined in. If you use a metric in a document, such as a workbook or report, the default timeline is not inherited.
Add a default timeline for metrics
You can specify a default timeline configuration for all metrics created on a data element to use. When you add a default timeline, all new metrics and metrics without a timeline configured apply the default timeline. Existing metrics with a timeline already defined are not affected.
-
Select the data element in the data model that you want to configure a default timeline for.
-
In the editor panel, select the Modeling tab.
-
In the Metrics section of the Modeling tab, click
Configure metrics to open the Configure metrics popover.
-
Turn on the Enable default timeline toggle.
-
For Date, choose a date column from the table to use for the default timeline.
-
(Optional) For Truncation, choose the default date truncation, or choose to remove the date truncation and use the existing granularity of the date column.
-
(Optional) For Comparison period, choose the default comparison period, or choose None.
-
(Optional) For Direction, choose the default direction for the comparison trend, or choose None.

You can override the default timeline for a metric in the Add a metric or Edit metric modal by changing the timeline settings or turning off the Timeline toggle. If you want a metric with a manually-configured timeline to use the default timeline configuration, click Reset to default in the Add a metric or Edit metric modal.
Manage a default timeline for metrics
You can edit the default timeline configuration for metrics created on a data element, or turn it off entirely.
When you edit a default timeline for a data element, all metrics for that data element without manually-configured timelines update to reflect the new default timeline settings. If you turn off a default timeline for a data element, all metrics for that data element without manually-configured timelines update to no longer have timelines configured.
- Select the data element in the data model that you want to configure a default timeline for.
- In the editor panel, select the Modeling tab.
- In the Metrics section of the Modeling tab, click
Configure metrics to open the Configure metrics popover.
- Configure the default metric timeline:
- To turn off the default timeline, turn off the Enable default timeline toggle.
- To modify the default timeline, change the selections under Date, Truncation, Comparison period, and/or Direction.
Work with metrics in datasets (Deprecated)
Datasets are deprecated:
- Starting June 2, 2026, you will no longer be able to create datasets or edit existing datasets.
- Starting September 15, 2026, you will no longer be able to use datasets as a data source or view datasets in Sigma.
Migrate your datasets to data models and update any documents that use datasets as a data source to use a different source. See Migrate a dataset to a data model.
Create a metric in a dataset
Follow these steps to create a metric:
-
Open a dataset or database table.
-
In the header, click Edit.
-
Select the Metrics tab, then click Create Metric to open the metric builder.
-
In the Name field, enter the name of the metric.
-
In the Description field, enter details about the metric.
This information displays when users apply metrics to a workbook element.
-
In the Formula field, define the metric logic.
You can use Sigma functions, and reference any column in the open dataset or database table.
You can also use an existing metric of the dataset; this is a very powerful practice to build reusable calculation components in your dataset.
-
Use the quick formatting tools and preview to customize the metric output.
For example, you can specify the formula result as a currency or a percentage, set the number of decimal places, or select options from the full format menu by clicking the number format menu (
).
Metrics define aggregate calculations. If the metric builder preview returns a
nullvalue, your formula might be missing an aggregate function, such asSum(),Avg(),Count(), and so on. -
In the header, click Publish to save the metric.

Edit a metric in a dataset
When you edit a metric, Sigma reflects your changes in workbook elements that link to the specific dataset or database table. All workbook references to the metric include name and description changes, and Sigma recalculates metric results based on formula updates.
To edit a metric, follow these steps:
- Open the dataset or database table that contains the metric that you plan to edit.
- Click Edit.
- Select the Metrics tab.
- Locate the metric in the list, and click its name to open the metric in the metric builder.
- Edit the metric name, description, formula, and formatting as needed, then click Publish to update the metric.
Delete a metric in a dataset
When you delete a metric, its calculation becomes invalid in workbook elements. Tables display error messages in columns that previously included metric output. Visualizations and pivot tables display an error message instead of the element.
-
Open the dataset or database table that contains the metric you plan to delete.
-
Click Edit.
-
Select the Metrics tab.
-
In the list of metrics, find the metric that you plan to delete.
-
For the metric, click More (
), then select Delete.

Alternatively, select the metric to open the metrics builder and locate the metric in the side panel. Next to the name of the metric, click Delete metric (
).
-

Updated 1 day ago
