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) 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.
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.
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.Choose how it's formatted
Set the Format — Number, Currency, Percentage, or Multiplier — and the value displays accordingly across charts and summary cards.
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 %).
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.
Writing formulas
Formulas support standard arithmetic over base measures and numeric constants:| Element | Allowed |
|---|---|
| Operators | + - * / |
| Grouping | ( ) |
| Numbers | Literal constants (e.g., 100, 0.3) |
| Operands | Base measures inserted from the picker (e.g., orders.net_revenue, channel.spend) |
| Goal | Formula | Format |
|---|---|---|
| Marketing efficiency ratio (MER) | orders.total_revenue / channel.spend | Multiplier |
| Ad spend as % of net revenue | channel.spend / orders.net_revenue * 100 | Percentage |
| Net revenue after ad spend | orders.net_revenue - channel.spend | Currency |
| Ad cost per order | channel.spend / orders.count | Currency |
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.
Related
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.