Skip to main content
Formula scope is expressed as a condition. Prefer table-derived scope over manually constructed conditions.

Global scope

Use:
Choose global scope when the user asks for a default formula or no reliable table or segment context exists.

Resolve from a table

When a table block is available, call resolve_table_condition with:
  • Target property ID
  • Block ID
  • Scenario ID
  • Explicit segment values, or null for ANY
Use the returned condition with write_formulas and with the exact-condition list_formulas check.

Manual conditions

Construct conditions manually only when dimension IDs and values are explicit and reliable. Examples:
Use readable dimension names, backticks, and disambiguators. When several condition items are written manually, order them by dimension property ID in ascending lexicographic order.

Do not invent scope

Do not guess dimension IDs or segment labels. If a user names a segment but no reliable table or dimension context is available, use global scope only when that matches the request; otherwise explain the missing context.

Specificity

A specific condition can override a broad condition. Read existing formulas before writing to avoid creating an unintended competing rule.