Create Metrics

Use MAQL to create reusable multidimensional queries that combine multiple facts and attributes.

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:

  1. Select the Metrics tab.
Metrics tab
2. Select **Create metric**. The **Metric Editor** window opens. The following image shows the editor with the corresponding step in the metric creation process highlighted.
Metric editor
3. Name your metric.4. (Optional) Add a description of your metric. 5. Populate the body of the **Metric Editor** with your MAQL expression.6. (Optional) Select the format that numbers should use in the visualization results. For more information, see [Format Numbers](./format-numbers/). 7. Select **Save**. Your metric saves and appears in the list of available Metrics.

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

To edit a metric in the Metric Editor, follow these steps:

  1. Select the Metrics tab.
Metrics tab
2. Select the metric that you want to edit.
Edit metric
The **Metric Editor** window opens.
Edit order metric
3. Edit the metric. 4. Select **Save**, or **Save as new** to save your changes as a new metric.

Copy a Metric

To copy a metric in the Metric Editor, follow these steps:

  1. Select the Metrics tab.
Metrics tab
2. Open the **options(...)** menu next to the metric that you want to copy and select **Make a copy**.
Metrics options copy
The **Metric Editor** opens with a copy of the selected metric. 3. (Optional) Edit the metric. 4. Select **Save**.

Delete a Metric

To delete a metric in the Metric Editor, follow these steps:

  1. Select the Metrics tab.
Metrics tab
2. Open the **options(...)** menu next to the metric that you want to delete and select **Delete**.
Metrics options delete
3. Confirm that you want to **Delete** the metric.
Metrics delete
The metric is deleted and removed from the list of metrics.

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.

edit metric