For the complete documentation index, see llms.txt. This page is also available as Markdown.
Essentials EditionPro EditionEnterprise Edition

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.

  1. From the left navigation menu, select [Engage] → Reports → Data Lab.

  2. Select a visualization to get started.

  3. From the Dimensions and Measures section in the right toolbar, select [Create Custom Measure].

  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.

    Example: The Conversion Rate measure uses Actions / Clicks. impact.com will specify whether the formula is valid or not by displaying a validation message below the Formula box.

  5. Name your custom measure (for example, Conversion Rate).

  6. From the [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.

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 [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. From the [Drop-down menu], select your measure’s Format.

  5. Select Save.

Filter function format

Use the Filter function in the format Filter(Measure, Dimension=Value).

Element
What to enter

Measure

An existing measure, such as Actions.

Dimension

The dimension to limit by, such as Event Type.

=

The only comparison Filter supports. You can’t use !=, >, <, IN, AND, or OR.

Value

One value from that dimension, such as the name of an event type.

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.

Last updated

Was this helpful?