TOPICS×
Syntax for metric expressions
Metrics can be edited using the Metric Editor and saved in the Metrics directory of a profile.
For more information, see
Creating and Editing Derived Metrics
. Metric expressions also can be used in worksheets. For more information, see
Worksheets
. The following syntax is used to define metric expressions.
Notes:
 Underlined words should be entered in the expression text literally.
 The form ? represents optional text.
 The form * represents text that may occur zero or more times.
 The form {A  B  C ...} represents text that consists of exactly one of the given options, such as A or B or C....
 The form [A,B) represents a range of numbers, from A up to but not including B.
Identifier
 An identifier references a named metric. For the rules governing legal identifiers, see
Syntax for Identifiers
.
Example: Revenue = Total_Price

(Metric)
 The result of (Metric) is the same as the result of Metric. Parentheses specify the order of operations in an expression.
Example: Average = (A + B) / 2

A + B
 Sum of the results of Metric A and Metric B.
Example: Value = Revenue + Cost_Savings

A  B
 Difference of the results of Metric A and Metric B.
Example: Profit = Revenue  Cost

A * B
 Product of the results of Metric A and Metric B.
Example: Dollars = Cents * 0.01

A / B
 Ratio of the results of Metric A and Metric B.
Example: Revenue_per_Session = Revenue / Sessions

A ^ B
 Result of Metric A raised to the power of the result of Metric B.
Example: Area = Width^2

confidence(metric)
 An estimate of the standard deviation of the metric. This is calculated using a sampling technique known as jackknifing.
This metric is memoryintensive and should not be used in large tables.
To use this syntax, you must have a jackknife dimension (named “jackknife”) with the appropriate properties. For more information, contact Adobe Consulting Services.
Example: confidence(Average_Score)
Note: The confidence metric types, including confidence(metric) and confidence(metric,jacknife), are especially useful when using Adobe’s controlled experimentation functionality. If a metric jumped from 12% to 16% during a controlled experiment, you could use a confidence callout to calculate the odds that the jump was due to random variation. This can help you to avoid drawing the wrong conclusions from limited evidence, and, conversely, provide assurance that a questionable change is actually real.

confidence(metric, jackknife)
 An estimate of the standard deviation of the metric. This is calculated using a sampling technique known as jackknifing. This syntax enables you to determine the confidence of a metric using a jackknife dimension named something other than “jackknife.”
This metric is memoryintensive and should not be used in large tables.
To use this syntax, you must have a jackknife dimension (named something other than “jackknife”) with the appropriate properties. For more information, contact Adobe Consulting Services.
Example: confidence(Average_Score,SubSamples)

eval(CellReference)
 Treats the content of the cell you are referencing as a metric expression. This syntax can be used only in a worksheet visualization.
Example: eval(B1)

log (B, X)
 The mathematical logarithm function: Metric X is the parameter, and Metric B is the base.
Example: dB = 20*log(Amplitude,10)

Metric[Filter]
 “Metric where Filter”: A new metric filtered by the given filter.
Example: Jan_Sessions = Sessions[ Month=”Jan” ]

Metric by Dimension
 A metric evaluated at the “level” of dimension. The result of (M by X)[F] (the result of metric “M by X” evaluated with Filter “F”) is the result of M[F by X] (the result of Metric “M” evaluated with Filter “F by X”).
Example: AB_Visitors =
(Visitors by Session)[Page=”A” and Page=”B”] =
Visitors[(Page=”A” and Page=”B”) by Session] =
The number of Visitors who visited page A and page B in the same Session.

number
 A metric with a fixed value.
Example: Pi = 3.1415

total(Metric)
 Ignores any dimension over which the metric is evaluated. The metric has the same value for every element of that dimension.
Example: Pct_of_Visitors = Visitors / total(Visitors)

all(Metric)
 Ignores filters applying to the metric. The metric are unaffected by selections and other filters.
Example: Benchmark_Sessions = all( Sessions )

total(all(Metric))
 Ignores all filters and dimensions. It has the same value throughout a given profile regardless of what filters or dimensions are applied.
Example: Dataset_Visitors = total(all(Visitors))

sum(One,Countable_Dimension)
 A metric that gives the count of a countable dimension such as Visitor or Session.
Example: Visitors = sum(One,Visitor)

sum(Numeric_ Dimension, Countable_ Dimension)
 A metric that gives the sum of a numeric dimension over a countable dimension. The ordinal values (as opposed to the formatted values) of the numeric dimension’s elements are used, so a scale factor often needs to be applied to the result.
Example: Value = sum(Session_Value, Session)*0.01

min(A, B)
 The lesser results of metric A and metric B.

max(A, B)
 The greater of the results of metric A and metric B.

format(A, B)
 A metric which is identical to metric A, except it uses the formatting function of metric B.
