Metric Grain, Dimensions, Filters and Time

A practical guide to consistent enterprise analytics.

BeginnerIntermediateExpert · 4 min read · Last updated:

In brief

State what one measure value represents before aggregation, such as one order line, one account per day or one claim event. If a metric combines records at different grains, clarify the transformation that makes them comparable. Grain determines which joins and rollups are valid.

Grain defines the observation

State what one measure value represents before aggregation, such as one order line, one account per day or one claim event. If a metric combines records at different grains, clarify the transformation that makes them comparable. Grain determines which joins and rollups are valid.

Dimensions provide context

Dimensions describe the perspectives through which a measure can be grouped, such as product, region, channel or date. Define hierarchy, identity and whether a dimension is single-valued at the metric grain. A join to a multi-valued relationship can duplicate a measure unless the model accounts for it.

Filters define the population

Document default filters and exclusions, including their business reason. Make clear whether consumers may change them and whether a filter applies before or after aggregation. Hidden filters create results that appear inconsistent across reports.

Time has more than one meaning

Specify which timestamp anchors the measure: event, booking, processing, snapshot or another business date. Include time zone and calendar convention. State how late corrections and historical restatement affect results. Where multiple valid time views exist, name them rather than overloading one date field.

Governed dataMeaning and quality
Semantic modelMeasures and relationships
DecisionsReports and action
Reliable analytics connects definitions, implementation and consumer use.

Next step

Validate the definition and model with business owners, engineers and representative consumers. Record examples, assumptions and change responsibilities so future users can reproduce and trust the result.

Architecture reference Definitions, governance and review

State the metric grain

Say what one observation represents before defining a measure: one order line, one account-day, one shipment event or one monthly balance. Grain determines valid dimensions and joins. If a metric combines facts at different grains, explain the allocation or aggregation step; never rely on a report author to infer it.

Define dimensions and filters

Describe each dimension's identity, hierarchy, conformance and history behavior. Explain whether a filter applies before or after aggregation and how it interacts with measures. A many-to-many filter can change row counts or duplicate values. Test totals before and after slicing.

Define time basis and windows

Name the date or timestamp used: event, booking, shipment, settlement, effective or ingestion time. Specify timezone, fiscal calendar, period boundaries and late-data treatment. For a rolling window, state whether the endpoints are inclusive and when the result is finalized.

Metric definition template

  • Business meaning and owner
  • Grain and population
  • Formula, units and sign convention
  • Time basis and window
  • Filters and exclusions
  • Aggregation behavior
  • Freshness and correction policy
  • Source lineage and tests

Review the definition with consumers using examples at boundaries, including nulls, reversals and late events. Version changes that alter interpretation.

Worked example: define a conversion rate

A conversion rate needs a defined numerator, denominator, population, attribution window, and time basis. If the numerator counts completed orders and the denominator counts eligible sessions, the two events occur at different grains. Specify how sessions are connected to orders, how cross-device or anonymous activity is treated, and whether a session can contribute more than one conversion. Without these rules, two correct queries can report different rates.

Filters are part of meaning: internal traffic, test orders, cancellations, or excluded channels may change the population. Time can mean event time, order date, reporting period, or processing date. Choose the intended date and timezone, and define boundary handling. When slicing by a dimension, clarify whether its value is current or historical as of the event.

Validate the metric at multiple grains

Check numerator and denominator counts independently, inspect edge cases, and recompute the rate from components at each aggregation level. Do not average daily or segment-level rates unless the weighting method is valid. Publish examples and counterexamples with the definition. Version the metric when its population or attribution logic changes.

A practical metric review template

Record question, decision owner, population, grain, numerator, denominator, dimensions, filters, time basis, timezone, source, refresh, lineage, and examples. Include what the metric excludes and a counterexample. Identify whether a dimension reflects current or historical state and whether corrections restate prior periods.

Ask a consumer to calculate a sample by hand and compare it with the semantic implementation. Review whether aggregations preserve meaning. Version the definition and state how existing dashboards will be updated when it changes.

Quality review for metric definitions

Ask an independent reviewer to calculate the measure from sample records and explain filters, time basis, and aggregation. Check that numerator and denominator refer to compatible populations and that dimensions do not multiply records.

Keep examples and counterexamples with the definition. Review after source or process changes and communicate version differences to report owners.