Hybrid Formulas
A Hybrid Formula is a formula metric that combines event inputs and session inputs in a single arithmetic expression. Before Hybrid Formulas, formula metrics in Amplitude combined only event inputs, so analyses like Add to Carts per Session or Revenue per Session required two separate charts and a manual calculation.
Hybrid Formulas work in Data Tables and in the Metric Explorer chart.
New formula builder
Hybrid Formulas ship with a redesigned formula builder. Compared to the previous event-only formula builder, the new builder adds:
- A unified Measured as selector that lets each input choose between event-level measurements (uniques, totals, property sum, and others) and session-level measurements (Session Totals, Bounce Rate, First Property Value, Last Property Value, and others) in one place, without switching builders.
- Real-time validity feedback. Amplitude validates the formula expression as you type and shows which inputs are unresolved or incompatible, so you don't have to save the metric to find out it's broken.
- Inline access to session inputs alongside event inputs, with each input labeled by type.
- Bidirectional conversion between event-only formulas and Hybrid Formulas. Opening a saved event-only formula in the Hybrid Formula builder loads it with zero session inputs. You can add session inputs and save without losing your event inputs, and you can convert back.
- A consistent input-naming scheme. Event inputs start at
A, and session inputs start atS, so the formula expression reads predictably.
The new builder appears wherever Hybrid Formulas work. Event-only formulas built in the legacy builder keep working unchanged, and the legacy builder remains available on surfaces that don't yet support Hybrid Formulas.
Where Hybrid Formulas work
Updated regularly
Amplitude updates this support table as Hybrid Formulas roll out to more surfaces. Check back if a surface you need isn't listed.
| Surface | Supported? |
|---|---|
| Data Tables | Yes |
| Metric Explorer | Yes |
| Saved metric library (reuse across charts) | Yes |
| Event Segmentation | No — continues to use the standard (event-only) formula path |
| User Sessions | No — use a session metric directly |
| Funnels, Retention, Pathfinder | No |
| Experiments | No |
Surfaces that don't yet support Hybrid Formulas keep working as they did before. Amplitude adds support to more surfaces on the regular release cadence.
Create a Hybrid Formula
In Data Tables
- In a Data Table, click + Add column, then Create metric, and then Hybrid Formula.
- Add event inputs. Each event input has a letter (
A,B, and so on) and its own measurement (uniques, totals, property sum, and others). - Add session inputs. Each session input has a letter starting at
S(S,T, and so on) and its own session-scoped measurement (Session Totals, Bounce Rate, Average Session Duration, and others). - Write the formula expression using the input letters, for example,
A / S. - (Optional) Click Save metric to add the Hybrid Formula to the saved metric library so you can reuse it across Data Tables and Metric Explorer charts.
In Metric Explorer
- In a Metric Explorer chart, click + Add metric, then Create metric, and then Hybrid Formula.
- Add event inputs. Each event input has a letter (
A,B, and so on) and its own measurement (uniques, totals, property sum, and others). - Add session inputs. Each session input has a letter starting at
S(S,T, and so on) and its own session-scoped measurement (Session Totals, Bounce Rate, Average Session Duration, and others). - Write the formula expression using the input letters, for example,
A / S. - (Optional) Click Save metric to add the Hybrid Formula to the saved metric library so you can reuse it across Data Tables and Metric Explorer charts.
Common examples
| Goal | Inputs | Expression |
|---|---|---|
| Revenue per Session | A = sum of revenue on Purchase, S = Session Totals | A / S |
| Add to Carts per Session | A = uniques of Add to Cart, S = Session Totals | A / S |
| Sessions per User | S = Session Totals, U = uniques of Any Active Event | S / U |
| Page Views per Session | A = totals of Page View, S = Session Totals | A / S |
| Bounce-adjusted conversion rate | A = uniques of Purchase, S = Session Totals, B = Bounce Rate | A / (S * (1 - B)) |
Measurement reference
Hybrid Formulas support every measurement available on event metrics and every measurement available on session metrics. The following table summarizes which measurements are valid on each input type.
| Measurement | Event input | Session input |
|---|---|---|
| Uniques | Yes | — |
| Totals | Yes | — |
| Sum, average, median, min, or max of event property | Yes | — |
| Session Totals | — | Yes |
| Bounce Rate | — | Yes |
| Entry Rate or Exit Rate | — | Yes |
| Average Session Duration | — | Yes |
| First Property Value or Last Property Value | — | Yes |
Filters and group-bys
Hybrid Formulas honor the same filter and group-by scoping rules as the surface where you use them:
- In Data Tables, refer to Use session metrics in Data Tables.
- In Metric Explorer, refer to Group-by scoping.
Global filters on a Data Table apply to both the event and session inputs of a Hybrid Formula.
Conversion from event-only formula metrics
Existing event-only formula metrics keep working unchanged. If you open a saved event-only formula in the Hybrid Formula builder, it loads as a Hybrid Formula with zero session inputs. You can convert back and forth without losing inputs.
FAQ
Why can't I use a Hybrid Formula in the Event Segmentation chart?
Event Segmentation continues to use the standard event-only formula path, so existing charts never enter a broken state. To analyze a Hybrid Formula in a segmentation-style view, use Metric Explorer.
Can I use a Hybrid Formula in an Experiment?
Not yet. Experiments excludes Hybrid Formulas from the metric picker. Check back as Hybrid Formulas roll out to more surfaces.
Can I export a Hybrid Formula's data?
In Data Tables, yes — use the Data Table export. In Metric Explorer, export isn't supported yet.
Does this work in the EU Data Center?
Yes.
Was this helpful?