Glossary/Semantic Layer & Metrics

Measure

A measure is a quantitative metric or fact that aggregates meaningfully, such as revenue, count, or duration, used to evaluate business performance.

A measure is a numerical value that typically results from aggregation: sum of revenue, count of orders, average transaction value. Unlike dimensions, measures are additive (or semi-additive): summing revenues across products and regions makes sense. In data warehousing terminology, measures are the numeric columns in fact tables; in analytics terminology, they're the quantities you're trying to analyze or optimize.

Measures require clear definitions of aggregation: sum vs. average vs. distinct count produce different semantics. Is customer count a sum (adding up all customers), distinct count (unique customers), or something else? The aggregation method must be explicit because different methods answer different questions. Measures also have valid time grains and dimensions: a measure like "inventory on hand" is point-in-time (don't sum across dates); others like "sales" are period-additive (sum across time within a period).

In semantic models, measures are formally defined with their aggregation type, valid dimensions, and how they relate to facts in the data warehouse. Derived measures are built from other measures. The semantic layer enforces valid measure-dimension combinations: preventing nonsensical queries like average customer ID or distinct sum of revenue.

Key Characteristics

  • Quantitative values that aggregate meaningfully
  • Have explicit aggregation types (sum, average, count, distinct)
  • Are additive or semi-additive across dimensions
  • Associated with specific fact tables
  • Include time grain and validity constraints
  • Often the target of analysis and optimization

Why It Matters

  • Clarity: Explicit aggregation type prevents calculation errors
  • Consistency: Same measure aggregates the same way everywhere
  • Correctness: Semantic models enforce valid measure-dimension pairs
  • Performance: Measures guide data warehouse design and indexing
  • Governance: Track measure changes and their impact on reports

Example

The measure "revenue" aggregates as sum (revenue summed across products and regions is total revenue). The measure "average order value" aggregates as average. The measure "transaction count" aggregates as distinct count. Each has different semantics and validity rules. The semantic layer documents these so tools can apply the correct aggregation automatically.

Coginiti Perspective

SMDL defines measures with explicit aggregation_type from 12 supported options: count, count_distinct, sum, avg, max, min, median, stdev, stdevp, var, varp, and custom. The custom type allows arbitrary SQL expressions for complex calculations. Semantic SQL's MEASURE() function wraps measure columns so the query engine applies the correct aggregation at whatever dimensional grain the analyst specifies. Hidden measures support intermediate calculations that feed into other measures without being exposed to end users.

See Semantic Intelligence in Action

Coginiti operationalizes business meaning across your entire data estate.