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.
