Skip to main content
Defines measures that combine already-aggregated values from multiple topics in a single SQL expression. Each topic runs its own subquery first, so every ${@topic.view.field} reference is a single aggregated value by the time the shared measure sees it. Any field you reference is auto-included in the right subquery — you don’t need to also add it to the workbook.
Write the sql as plain math over already-aggregated values — arithmetic, CASE, COALESCE, NULLIF, etc. Each referenced field is already a single aggregated value, so wrapping it in SUM(...) or COUNT(...) or setting aggregate_type re-aggregates over the post-join result, which usually isn’t desirable.

Syntax

Properties

shared_measures
object
A map of shared measure definitions, keyed by the measure’s name. The name becomes the selectable measure in the workbook.

Examples

Revenue per dollar of marketing spend