> For the complete documentation index, see [llms.txt](https://help.impact.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.impact.com/brand/what-would-you-like-to-learn-about/platform-features/multi-program-reports/data-lab-custom-reports/create-custom-measures-in-data-lab.md).

# Create Custom Measures in Data Lab

Data Lab's built-in measures cover most reporting needs, but sometimes you need a calculation that's specific to your program, such as a custom conversion rate, a weighted total, or a ratio between two existing measures. Custom measures let you define your own formula using existing measures and dimensions, so the result appears in your visualization just like any standard measure.

{% hint style="warning" %}
**Important:** We *highly* recommend you reference [Data Lab Introduction](/brand/what-would-you-like-to-learn-about/platform-features/multi-program-reports/data-lab-custom-reports/data-lab-introduction.md) before starting this article.
{% endhint %}

1. From the left navigation menu, select ![](https://4048883401-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwMLlMoFBtKJa8ptd3zaw%2Fuploads%2Fgit-blob-230534471fef5f40808e921e41ee44e4a06ded03%2Fe6cb9548999afdc1ed3ce4942e4cb5b45b5cecbd323267aac2a7cd1915fccc09.svg?alt=media) **\[Engage] → Reports** → [**Data Lab**](https://app.impact.com/secure/advertiser/engage/reportBuilder.ihtml).
2. Select a **visualization** to get started.
3. From the *Dimensions and Measures* section in the right toolbar, select ![](https://4048883401-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwMLlMoFBtKJa8ptd3zaw%2Fuploads%2Fgit-blob-6282f271b7521383385339243690b303086736d9%2F3b5a585dd2895bdf1c30d1236c72ba590dddd18717863b27074c8d313d05ae20.svg?alt=media) **\[Create Custom Measure]**.

   <div data-with-frame="true"><figure><img src="https://4048883401-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwMLlMoFBtKJa8ptd3zaw%2Fuploads%2FaJ9k8ckxQGr9Bokgj8Mb%2FUntitled%20design%20(12).png?alt=media&amp;token=68dfc0f3-adb5-4c88-8447-6ceafc61b73d" alt="" width="355"><figcaption></figcaption></figure></div>
4. In the *Formula* field, enter the calculation for the custom measure. If you need the result for a single dimension value only (for example, one Event Type), you can use `Filter` in your formula.&#x20;

   * Refer to [Filter a measure to a specific value](#filter-a-measure-to-a-specific-value) below for more information.

   <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p><strong>Example:</strong> The <em>Conversion Rate</em> measure uses <code>Actions / Clicks</code>. impact.com will specify whether the formula is valid or not by displaying a validation message below the <em>Formula</em> box.</p></div>
5. Name your custom measure (for example, *Conversion Rate)*.
6. From the ![](https://4048883401-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwMLlMoFBtKJa8ptd3zaw%2Fuploads%2Fgit-blob-c2cb550b55c51ea1eeff0acbd6f437a03b621a2c%2F60d033ae8a04c14498d5229c3c0160ac05feea7f605dbd770741793c900469f0.svg?alt=media) **\[Drop-down menu]**, select your measure’s **Format**. You can choose between *Number*, *String*, *Percentage*, or *Currency*.
7. Select **Save** to save your custom measure.

   <div data-with-frame="true"><figure><img src="https://4048883401-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwMLlMoFBtKJa8ptd3zaw%2Fuploads%2FeRSxwBeihOE4jt2Um20f%2FScreenshot%202026-04-27%20at%2017.31.58.png?alt=media&amp;token=805ccf5a-b8b8-499d-86e7-efc04994dc80" alt="" width="563"><figcaption></figcaption></figure></div>

## Filter a measure to a specific value

Custom measures normally calculate across every value of a dimension. Sometimes you only want the result for one value, like the conversion rate for a single Event Type, without building a separate visualization or relying on a pivot. The `Filter` function lets you narrow a measure to exactly one dimension value directly inside the formula.

1. From the Dimensions and Measures section in the right toolbar, select ![](https://4048883401-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwMLlMoFBtKJa8ptd3zaw%2Fuploads%2Fgit-blob-6282f271b7521383385339243690b303086736d9%2F3b5a585dd2895bdf1c30d1236c72ba590dddd18717863b27074c8d313d05ae20.svg?alt=media) **\[Create Custom Measure]**.
2. Enter `Filter` in the *Formula* field. As you type, Data Lab suggests measures, dimensions, and values. A *Valid* or *Invalid* label will appear to specify whether the formula is valid or not.
3. Enter a **Name** for the measure (for example, *Sale Conversion Rate*).
4. &#x20;From the ![](https://4048883401-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwMLlMoFBtKJa8ptd3zaw%2Fuploads%2Fgit-blob-c2cb550b55c51ea1eeff0acbd6f437a03b621a2c%2F60d033ae8a04c14498d5229c3c0160ac05feea7f605dbd770741793c900469f0.svg?alt=media) **\[Drop-down menu]**, select your measure’s **Format**.&#x20;
5. Select **Save**.

<div data-with-frame="true"><figure><img src="https://4048883401-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwMLlMoFBtKJa8ptd3zaw%2Fuploads%2FAPIC59sIvphC3MM0Mmdz%2FScreenshot%202026-08-26%20at%2014.56.52.png?alt=media&amp;token=573db799-5c8e-4641-abe9-eef93c3bb01a" alt="" width="485"><figcaption></figcaption></figure></div>

### Filter function format

Use the Filter function in the format *Filter(Measure, Dimension=Value).*&#x20;

<table><thead><tr><th width="167.26953125">Element</th><th>What to enter</th></tr></thead><tbody><tr><td>Measure</td><td>An existing measure, such as <em>Actions.</em></td></tr><tr><td>Dimension</td><td>The dimension to limit by, such as <em>Event Type</em>.</td></tr><tr><td>=</td><td>The only comparison <code>Filter</code> supports. You can’t use <code>!=</code>, <code>></code>, <code>&#x3C;</code>, <code>IN</code>, <code>AND</code>, or <code>OR</code>.</td></tr><tr><td>Value</td><td>One value from that dimension, such as the name of an event type.</td></tr></tbody></table>

### Combining filters

* **Combine filters with other measures:** Use `+`, `-`, `*`, `/` and parentheses. You can’t put one filter inside another, such as `Filter(Filter(...))`.
* **Count more than one value:** Add a separate Filter formula for each value.\
  For example: `Filter(Actions, Event Type=Sale) + Filter(Actions, Event Type=Lead)`
* **No matching rows:** The measure shows **0**, or **0%** if the format is set to *Percentage*.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.impact.com/brand/what-would-you-like-to-learn-about/platform-features/multi-program-reports/data-lab-custom-reports/create-custom-measures-in-data-lab.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
