Skip to main content
Custom measures let you define your own metric from a formula over the measures Upstack already tracks — without waiting on an engineering change. Combine revenue, spend, orders, and other measures with arithmetic to create the KPI your team actually reports on, such as net margin %, profit per order, or a blended efficiency ratio.
A custom measure behaves exactly like a built-in measure. It respects the dashboard’s filters, date range, comparison period, and granularity, and it picks up your cost adjustments — so the number stays consistent with the rest of your report.

How custom measures work

A custom measure is a formula written over existing base measures. Upstack compiles that formula and computes it on the same engine that powers built-in ratio measures like ROAS and MER, so the result is calculated server-side against your data — not approximated in the browser. For example, this formula defines your marketing efficiency ratio (MER) — total revenue earned per dollar of ad spend:
orders.total_revenue / channel.spend
Each operand (orders.total_revenue, channel.spend) is a base measure you select from a picker, so you never have to remember exact names. Set the format to Multiplier and the result displays as 3.2×.

Creating a custom measure

Custom measures are scoped to a single pixel and managed from a custom dashboard.
Creating, editing, and deleting custom measures is available to admin and owner roles, matching the permissions for cost settings. Viewers can still chart existing custom measures but won’t see the management entry points.
1

Open the Custom Measures dialog

On a custom dashboard, click Custom Measures in the dashboard toolbar. You can also open it from the Manage custom measures link next to the Metric field when adding or editing a widget.
2

Start a new measure

Click + New custom measure to open the builder.
3

Name the measure

Enter a Name (e.g., Marketing Efficiency Ratio) and an optional Short title (e.g., MER) used where space is tight, such as chart legends and compact cards. Add an optional Description — it appears in the measure’s tooltip.
4

Choose how it's formatted

Set the Format — Number, Currency, Percentage, or Multiplier — and the value displays accordingly across charts and summary cards.
5

Set the period total

Choose how the measure rolls up across the selected date range in the summary card:
  • Sum — adds each period’s value (use for additive measures like revenue net of ad spend).
  • Average — recomputes the ratio over the whole period (use for ratios and percentages like MER or ad spend %).
Upstack infers a sensible default from your formula; override it if needed.
6

Write the formula

Type your formula, using Insert measure to add base measures from a searchable, grouped picker. Validation runs as you type — a valid formula shows Formula is valid., and errors explain what to fix.
7

Save

Click Save. The measure is enabled by default and immediately available in the measure picker. Use the eye icon in the list to disable a measure without deleting it.

Writing formulas

Formulas support standard arithmetic over base measures and numeric constants:
ElementAllowed
Operators+ - * /
Grouping( )
NumbersLiteral constants (e.g., 100, 0.3)
OperandsBase measures inserted from the picker (e.g., orders.net_revenue, channel.spend)
Some common patterns:
GoalFormulaFormat
Marketing efficiency ratio (MER)orders.total_revenue / channel.spendMultiplier
Ad spend as % of net revenuechannel.spend / orders.net_revenue * 100Percentage
Net revenue after ad spendorders.net_revenue - channel.spendCurrency
Ad cost per orderchannel.spend / orders.countCurrency
orders.net_revenue is net sales (after discounts and refunds) but before COGS and operating costs — so orders.net_revenue - channel.spend is revenue net of ad spend only, not true profit. To build a margin metric that reflects fulfillment and operating costs, include the relevant cost measures from the picker and make sure your cost settings are configured.
Division by zero returns 0, and any base measure with no data in a period is treated as 0. This keeps charts continuous instead of showing gaps or errors.

Using a custom measure on a dashboard

Once saved and enabled, a custom measure appears in the Custom group of the measure picker when you add or edit a widget on a custom dashboard. Select it like any built-in measure — it works with Metric, Sparkline, Bar, and Area chart types. Because it runs on the same query path as built-in measures, the widget automatically reflects the dashboard’s current filters, date range, comparison period, and granularity. No extra configuration is needed.

What custom measures inherit

Custom measures reuse the standard query engine, so they pick up the same context as built-in measures automatically:
  • Filters — applied per source so each operand is filtered correctly (an orders filter only affects orders measures, an ads filter only affects ad measures).
  • Date range, comparison period, and granularity — threaded through unchanged.
  • Cost adjustments — formulas that reference cost-adjusted measures are recomputed against your contribution-margin settings, matching how built-in cost measures behave. See Cost settings.

Limitations

Custom measures are designed to behave like built-in measures, which sets a few boundaries in this version:
  • Base measures only. Operands must be measures available in the picker. You can’t reference already-derived measures (such as ROAS or MER), attribution-only measures, or another custom measure.
  • Not attribution-adjusted. Like other non-attribution measures on the dashboard, custom measures are not adjusted by attribution model or window. For attribution analysis, use Attribution reporting.
  • Custom dashboards only. Custom measures are selectable on custom dashboards; they aren’t yet available in other surfaces.

Measures & Dimensions

The base measures you build custom formulas from.

Query Guide

Build reports with measures, dimensions, and filters.

Cost Settings

Configure costs so margin-based custom measures are accurate.

Attribution Reporting

Compare attribution models and channel credit allocation.