Create Metrics
The Metric Editor is a graphical user interface tool for creating your own metrics to use in the Analytical Designer or through the API. The editor uses facts, attributes and attribute labels from your logical data model (LDM), as well as any previously created metrics in your workspace, to help you build MAQL expressions with valid syntax.
Create a Metric
To create a metric in the Metric Editor, follow these steps:
- Select the Metrics tab.
Note
By default, the name of the metric will become the metric ID. Once you save the metric, if you want to change the ID, you will need to manually edit the ID. To change the ID, select the current ID and replace the text with a new value.
Note
You can press control+space or CMD+I to open a list of possible keywords, facts, and attributes that you can use to help build your expression.
Note
If the syntax for the expression is invalid, it is not possible to save the metric. Valid syntax does not necessarily mean that the metric will produce usable visualizations. This is because any combination of facts or attributes added to the query and any combination of attributes (either for slicing or for filtering) applied to the metric might not always produce a meaningful result when used together.
Edit a Metric
After you create a metric, you can edit the following information about the metric:
- The metric name
- The metric ID
- The description
- The MAQL expression
- The number format
Important
Before editing a metric, consider the following points:
- If you edit the metric ID, other metrics, visualizations and dashboards referencing the metric will become inaccessible.
- If you edit the MAQL expression or number format in a metric, other metrics, visualizations, and dashboards referencing the metric will use the updated values.
- You can save an existing metric as a new metric to retain the original metric. This avoids complications with other metrics, visualizations, and dashboards referencing the original metric.
To edit a metric in the Metric Editor, follow these steps:
- Select the Metrics tab.
Copy a Metric
To copy a metric in the Metric Editor, follow these steps:
- Select the Metrics tab.
Delete a Metric
Important
- Deleted metrics are unrecoverable.
- Existing visualizations, dashboards, and metrics that use the deleted metric will become inaccessible.
To delete a metric in the Metric Editor, follow these steps:
- Select the Metrics tab.
Metric Editor in Analytical Designer
You can also create, edit or delete metrics in the Analytical Designer by clicking the pencil icon, or the Create metric button to open the Metric Editor window.