Formulas and Calculations
Create powerful calculated metrics using the formula builder.
Basic Syntax
Reference other metrics using curly braces:
{Metric Name}
Operators
- Addition:
+ - Subtraction:
- - Multiplication:
- Division:
/ - Parentheses:
( )
Examples
Profit Margin
({Revenue} - {Cost of Goods Sold}) / {Revenue} 100
Average Deal Size
{Total Revenue} / {Number of Deals}
Conversion Rate
{Conversions} / {Visitors} * 100
Functions
SUM(metric1, metric2, ...)- Add multiple metricsAVG(metric1, metric2, ...)- Average of metricsMIN(metric1, metric2, ...)- Minimum valueMAX(metric1, metric2, ...)- Maximum valueABS(metric)- Absolute valueROUND(metric, decimals)- Round to decimals
Handling Missing Values
- If any referenced metric has no value, the result is blank
- Use defaults:
{Metric Name} ?? 0(default to 0 if blank)
Tips
- Test formulas with known values
- Keep formulas simple when possible
- Document complex calculations
- Consider performance with many dependencies
Was this article helpful?