Formulas & Conditions
The Formula method is the most flexible way to build a custom field. For metrics it's a math expression; for dimensions it combines fields and text into a label. On top of either, you can add conditional rules so the field only returns a value when your conditions match.
Formulas for Metrics
A custom metric formula is an arithmetic expression built from fields, numbers, and operators. You assemble it in the formula editor by adding field chips, typing numbers, and inserting operators.

Building a Formula
- Click Browse Fields (or start typing a field name) to insert a field
- Type a number and press Enter to add a numeric constant
- Click Browse Operators to insert a math operator
The editor validates as you go, with messages like "Formula looks good", "Formula ends with an operator", or "Missing operator between fields".
Operators
| Operator | Meaning |
|---|---|
+ | Add |
− | Subtract |
× | Multiply |
÷ | Divide |
% | Modulo (remainder) |
^ | Power |
( ) | Parentheses for grouping |
spend ÷ conversions.Common Metric Recipes
| Metric | Formula |
|---|---|
| CPA (cost per acquisition) | spend ÷ conversions |
| ROAS (return on ad spend) | revenue ÷ spend |
| CPC (cost per click) | spend ÷ clicks |
| Conversion rate | conversions ÷ clicks × 100 |
| AOV (average order value) | revenue ÷ orders |
Formulas for Dimensions
For dimensions, the Formula method combines fields and text into a single value instead of doing math. This is how you build labels and cleaned-up names.
- Add field chips the same way as for metrics
- Type text and press Enter to add a text constant
- Use Add Space to insert a space between parts
For example, combine a source field, a space, and a medium field to produce a "Source / Medium" label. (Math operators aren't available for dimensions, dimensions are about text, not calculations.)
Conditional Rules
Turn on Set condition in the builder to make a field return its value only when your conditions match. This is CASE-style logic: "when the campaign name contains 'brand', label it Branded".

How Conditions Work
Each condition reads When field operator values:
| Operator | Matches when the field… |
|---|---|
| Equals | exactly matches a value |
| Not Equals | does not match |
| Contains | includes the text |
| Not Contains | does not include the text |
- Add multiple conditions and join them with AND / OR
- Values autocomplete from the real distinct values in your data
Multiple Rules (Dimensions)
Custom dimensions support multiple rules for IF/ELSE-style mapping. Click + Add Rule to add another rule; rules are evaluated top to bottom and the first matching rule wins. A final rule with no condition acts as the "else" catch-all. If nothing matches, the field uses its fallback value.
Next Steps
- Blending Across Sources - Apply per-source logic across platforms
- Split Text - Extract a fragment from a naming convention
- Using Custom Fields - Use your formulas in dashboards and goals
Creating a Custom Field
Walk through the Custom Fields builder: pick a build method, configure it, preview against real data, set a fallback, and save.
Blending Across Sources
Map the same field from each of your data sources into a single unified custom field, summed for metrics or unified into one column for dimensions.