Update custom measure

Update an existing custom measure. Only the fields included in the request body are modified; omitted fields remain unchanged.

Common updates include changing the formula expression, display name, description, or unit type.

Formulas support numbers, ${fieldName}, parentheses, unary minus, +, -, *, /, and non-nested PER_HOUR(expression). PER_HOUR normalizes by the hours in the result period; display units do not perform conversion. Omitted variableFilters retains saved bindings; null or {} clears them. The resulting formula is validated against the supplied bindings or, when omitted, saved bindings. Every filters_binding reference must resolve. At most 32 bindings and filter nesting depth 4 are supported. Saving does not prove that referenced measures are queryable; verify Analytics metadata and the intended query separately.

Binding names start with a letter or underscore and contain only letters, numbers, and underscores. Every stored binding must be referenced by the resulting formula; top-level filters are AND-combined. Unreferenced keys, unresolved references, excess bindings, or excessive depth return INVALID_VARIABLE_FILTERS. Invalid binding names in the formula return INVALID_FORMULA; empty filter lists return ERROR_INVALID_PARAMS. Display names cannot resemble reserved FOCUS columns; names and descriptions cannot contain HTML.

PER_HOUR is case-insensitive and takes one nonempty argument. Invalid syntax or unknown functions return INVALID_FORMULA. Division preserves undefined ratios rather than replacing them with zero. PER_HOUR uses the full output-period duration, so a period with partial data can read low. Rollup with time precision is unsupported; without time precision, a positive bounded query time window is required.

Path Params
uuid
required
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$

Unique custom measure ID

Body Params
string
length ≥ 1

Display name for the measure

string
length ≥ 1

Formula expression; use ${} to insert variables by Analytics API schema field names.

string

Description of the measure

string
enum

The unit a measure is reported in, for example CURRENCY or STANDARD.

Allowed:
variableFilters
object | null

Named filters referenced by formula variables using filters_binding. At most 32 bindings; filter nesting depth is at most 4. Omission retains saved bindings on update; null or {} clears them. The resulting formula must resolve all binding references.

Responses

Language
Credentials
Bearer
JWT
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json