> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lunarmc.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Create a Calculated Metric

[Full How-To Video: How to Create Calculated Metrics from Multiple Data Sources - Watch Video](https://www.loom.com/share/152fb208070a4feda934f0046fcb029c)

<iframe src="https://www.loom.com/embed/152fb208070a4feda934f0046fcb029c" title="Loom video player" frameborder="0" className="w-full aspect-video rounded-xl" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen />

## **Overview**

Calculated metrics allow you to create new metrics by combining existing platform metrics into a custom formula. This is useful when the metric you need is not available as a standard metric in SuperOrbital.

Calculated metrics can include metrics from multiple data sources, allowing you to combine data from platforms such as Shopify, GA4, Meta, Google Ads, TikTok, and more into a single calculation. Common metrics that utilize multiple data sources include nCAC, MER, CAC, Total Ad Spend, etc. 

This article walks you through creating a calculated metric using one or more data sources.

## **Step 1: Create a New Custom Metric**

1. From the left navigation menu, go to **Performance Reports**.
2. Expand the submenu and select **Custom Metrics**.
3. Click **+ Create New Metric** in the upper-right corner.
4. Enter a **Title** and **Description** for your custom metric.

<iframe src="https://www.loom.com/embed/3034004c623a4acf9935d7e219419b61" title="Loom video player" frameborder="0" className="w-full aspect-video rounded-xl" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen />

**Step 2: Configure the Metric**

1. Select the appropriate **Data Source Categories** for your calculation.
   * **Commerce** for Shopify metrics.
   * **Media** for advertising platforms such as Meta, Google Ads, TikTok, and others.
   * Select all categories that contain the data sources you'll use in your calculation. For example, if your formula uses Shopify Revenue and Meta Ad Spend, select both **Commerce** and **Media**.
2. Choose the specific **Data Sources** you want to include in your calculation.
3. Set the **Entry Type** to **Formula**.
4. Select the appropriate **Metric Type** (Currency, Percentage, Number, etc.).

<iframe src="https://www.loom.com/embed/215576185b2d4f1282d2392a593f94a5" title="Loom video player" frameborder="0" className="w-full aspect-video rounded-xl" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen />

**Step 3: Build Your Formula**

Once you've configured your data sources, you'll have access to all supported metrics from the selected platforms within the **Formula Builder**.

1. Build your custom metric by selecting the platform metrics you want to include.
2. Use the available mathematical operators (**+**, **−**, **×**, **÷**) and parentheses to create your formula.

**Tip:** Be sure to follow the correct order of operations when building your formula. Use parentheses where needed to ensure your calculation is evaluated as intended.

3. Review your formula to confirm it returns the desired calculation.
4. Click **Save** in the bottom-right corner to create your custom metric.

<iframe src="https://www.loom.com/embed/27d45b052b71413f99eadb3809f60751" title="Loom video player" frameborder="0" className="w-full aspect-video rounded-xl" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen />
