# Compare aggregate metrics

After you [finish **Step 1 (Metric Info)**](..#step-1-metric-info), **Step 2 (Configure Metric)** appears in the main form:

<figure><img src="https://3772145110-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7hLPjNTyFMw1VTOP6ZnD%2Fuploads%2FlzrCdQNBFDn0fzvrpvvS%2Fnew-aggXagg-metric.png?alt=media&#x26;token=b35471aa-7120-425a-9511-91998a3173d8" alt="Step 2 (Configure Metric) of metric configuration for a &#x22;Compare aggregate metrics&#x22; metric"><figcaption></figcaption></figure>

{% hint style="info" %}
Because there's no sample data to view when you compare two metrics, consider identifying the metrics that you will compare before you begin creating the custom metric. Make note of the datasource, schema, and table for both. Also check to ensure the aggregation intervals match.
{% endhint %}

1. Under **Datasource and target**, select datasources, schemas, and tables for **Source** and **Target**. Your choices determine what metrics you can compare.
2. &#x20;To the right of **Metrics to compare**, select **Add**.
3. In the **Add Metrics** dialog, (1) select the metrics you want to compare, and then (2) select **Add metrics (**_**x**_**/**_**y**_**)**.\
   \
   &#x20;![](https://3772145110-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7hLPjNTyFMw1VTOP6ZnD%2Fuploads%2Fg3gctSVTKexqblQDZm80%2FaggXagg-add-metrics.png?alt=media\&token=06f92232-5ae9-4476-a70d-9e1e866b0af9)
4. Optionally, add any tags, then at the top right corner select **Next** to proceed to **Step 3 (Preview)**.

### Step 3 (Preview)

![](https://3772145110-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7hLPjNTyFMw1VTOP6ZnD%2Fuploads%2FK7JrfAjEg8AJMGcfalcP%2FaggXagg-preview.png?alt=media\&token=cc99d014-e8f9-46af-9f69-a7ed286ce347)

{% hint style="info" %}
If you're editing an existing metric, you'll see an option to view the metric's query recent history.
{% endhint %}

1. Optionally, adjust the date range for the preview. If you adjust the range, you must pick a start date and an end date.
2. Select **Preview** to generate a chart of the metric using the specified date range.&#x20;
3. If you need to adjust the metric after viewing the preview, select the step you need to edit (you can select the step in the top bar, or the left pencil icon for the step &#x20;
4. When you're satisfied with the preview, select **Create** at the top right corner. The Explorer tab opens and displays your new metric in the Explorer tree.
