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.
From the left navigation menu, select
[Engage] → Reports → Data Lab.
Select a visualization to get started.
From the Dimensions and Measures section in the right toolbar, select
[Create Custom Measure].

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
Filterin your formula.Refer to Filter a measure to a specific value below for more information.
Name your custom measure (for example, Conversion Rate).
From the
[Drop-down menu], select your measure’s Format. You can choose between Number, String, Percentage, or Currency.
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.
From the Dimensions and Measures section in the right toolbar, select
[Create Custom Measure].
Enter
Filterin 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.Enter a Name for the measure (for example, Sale Conversion Rate).
From the
[Drop-down menu], select your measure’s Format.
Select Save.

Filter function format
Use the Filter function in the format Filter(Measure, Dimension=Value).
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 asFilter(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?

