Use Metrics in a Workbook (Beta)
This feature is currently in Beta and subject to quick, iterative changes. As a result, the latest product version may differ from the content of this document. For additional information, see Frequently Asked Questions.
Metrics are custom aggregate calculations that can be reused across workbook data elements that share a data source (i.e., a dataset or connection table). They’re defined at the data source level and can be applied to workbooks to ensure consistent metric logic across tables, visualizations, and pivot tables.
This document explains how to use metrics in a workbook to perform standard calculations with ease and efficiency. For information about managing metrics in a dataset or connection table, see Create and Manage Metrics.
Summary of Content
The ability to use metrics in a workbook requires the following:
- You must be assigned an account type with the Explore Workbook or Edit Workbook permission enabled.
- You must be the workbook owner or be granted Can Explore or Can Edit workbook permission.
View Metric Details
In a workbook, you can view available metrics in the Element properties > Metrics tab for a selected data element. Hover over any metric to view its description (if provided) and formula.
Metrics are specific to an element's data source. If no metrics are shown in the Metrics tab, an admin or other permitted user has not created metrics in the dataset or connection table.
You can also view metric suggestions in the formula bar by entering "metrics." Descriptions are displayed as you key scroll through the dropdown list.
Add Metrics to Data Elements
The following sections describe different methods of adding metrics to workbook data elements.
Drag and drop
In the Element properties panel, drag and drop metrics from the Metrics tab to table grouping calculations, visualization properties (axes, values, color scale, tooltip, etc.), and pivot table properties.
Once you begin to drag a metric, all properties that can accept metrics are displayed with a dashed border.
Use column selectors to add calculations to table groupings and summaries, visualizations properties, and pivot table values. Click Add calculation or Add summary where applicable (Element properties panel or table summary bar), then select an option from the Metrics menu.
Reference metrics in the formula bar to define a column’s calculation. If the metric name is known, enter it in the formula bar. Otherwise, enter “metrics” to view and select from the auto-fill suggestions. You can also reference a metric with other formula functions and arguments.
Frequently Asked Questions
How are metrics different from calculated columns?
There are use cases in which you could utilize calculated columns and metrics similarly to produce the same output. In such cases, it's important to note these key differences:
- Calculated columns use static calculations to produce unaggregated values for individual (ungrouped) table rows or aggregated values bound to specific grouping levels. Metrics use dynamic calculations to provide aggregated values unbound by grouping levels.
- When you add a calculated column to a data element, you define the calculation logic for a specific element. Metric logic is defined in the data source and can be reused in any element that references the particular dataset or connection table.
- If standard calculation logic changes, you must individually edit calculated columns in all applicable elements. If metric logic changes, an admin or other permitted user can update the metric formula directly in the data source (dataset or connection table), and Sigma automatically recalculates the metric output in all elements using the metric.