modellerUpdated 2026-10-07

Define Measures

Model Builder — Measure creation form.

What this covers

A measure is a named aggregation computed from a column, or from a user-defined attribute, of a fact table. Measures are the numeric values BI tools query — revenue, order count, average session duration, and so on. This article explains what constitutes a measure, how to define one in Model Builder, and the impact of choosing additive versus non-additive aggregation types on query routing.

Measure names must be unique within a model, ignoring letter case: you cannot create both Margin and margin. A refused create, rename or import leaves the existing definitions intact. Choose a distinct name explicitly; no measure or source backing is merged automatically.

The three properties of a measure

Every measure looks the same to a BI tool: a named numeric value. In the model it has three properties. They are independent of each other: knowing one tells you nothing about the other two. The measure drawer shows them as three separate lines, Backing, Time and Derivation.

Backing: physical or user-defined attribute

Backing says what the measure reads.

BackingWhat the measure readsExample
PhysicalA column of a source table.SUM(amount)
User-defined attributeAn expression the modeller wrote on the table, stored on the model and treated as an ordinary column.SUM(price * quantity * (1 + tax_rate))

A user-defined attribute is authored on the table, not on the measure: open the table on the canvas, click the Edit pencil and use the Attributes tab. See User-Defined Attributes. The measure then picks it in the Attribute list exactly as it would pick a column.

Time: standard or time variant

Time says whether the measure is shifted or accumulated across periods.

TimeMeaningExample
StandardThe measure is not a time variant. Its value is for the periods the query asks for.revenue
Time variantA time calculation over another measure (its base): prior year, year to date, moving average and so on.revenue_prior_year, revenue_ytd

A time variant is created from its base measure under Time Variants. See Configure Time Variants.

Derivation: plain, calculated or composite

Derivation says how the value is produced. It is the Derivation list in the drawer and it cannot be changed after the measure is created.

DerivationMeaningExample
PlainOne aggregation over the measure's backing (a column or a user-defined attribute).SUM(amount)
CalculatedAn expression over other measures of the same model.measure("revenue") - measure("cost")
CompositeA combination of measures from several models of the project.Actual revenue from one model minus budget from another

How the properties combine

Example measureBackingTimeDerivation
revenue = SUM(amount)PhysicalStandardPlain
net_revenue = SUM(net_amount), where net_amount is a user-defined attributeUser-defined attributeStandardPlain
revenue_prior_yearPhysicalTime variantPlain
net_revenue_ytdUser-defined attributeTime variantPlain
margin = measure("revenue") - measure("cost")Not applicableStandardCalculated
variance across two modelsNot applicableStandardComposite

What each property changes

You want toWhat decides it
Filter on the measure's grouped value (for example, revenue above 10,000)Derivation: available for plain measures of either backing, including time variants; not available for calculated and composite measures.
See totals and subtotals in the Query panel and in ExcelDerivation and additivity: a plain additive measure is totalled directly; a plain non-additive measure (an average, a time variant) is totalled by a query at the total's own level; calculated and composite measures show no client-side total.
Use the measure inside a row-level expression or subqueryAll three: only a plain, standard measure has a value per row.

Importing models

An import file, a seed or an older export may label a measure physical. That word describes the backing, not the derivation. On import Tessallite stores such a measure as plain, provided it really reads a source column. If it does not (it has no source column, or it is defined by a user-defined attribute or an expression), the import is refused with a message that names the measure. Any other unknown measure type is refused the same way.

This page covers plain, standard measures.

Before you start

Measure definition fields

FieldRequiredDescription
NameYesInternal identifier used in SQL and API references. Must be unique within the model.
Display nameNoLabel shown in the BI tool field list. Defaults to the name if left blank.
Source tableYesThe fact table containing the column to aggregate.
Source columnYesThe column to aggregate. For COUNT, use the primary key column.
Aggregation typeYesThe SQL aggregation function to apply.
Default date dimensionWith a semi-additive behaviour, and before creating time variantsThe date the measure works from: the date that decides "last", "first" and the per-date totals of a semi-additive behaviour, and the date every time variant of the measure is calculated on. Chosen from the model's date dimensions; a time variant shows it read-only, inherited from its base measure. See Semi-Additive Measures.
FormatNoPresentation token controlling how Tessallite renders the value in the in-app Query panel. One of currency, percent, percent_2dp, integer, decimal_0, decimal_1, decimal_2dp, decimal_3, decimal_4, decimal_5, decimal_6. The token is stored on the measure and applied client-side; the underlying SQL value is unchanged. currency shows the model's currency (Model configuration → Regional), in the web app and in Excel.
DescriptionNoFree-text note exposed to BI tools that support field descriptions.

Aggregation types

TypeAdditiveUse caseExample
SUMYesTotals of a numeric columnTotal revenue, total quantity sold
COUNTYesNumber of rowsNumber of orders, number of sessions
AVGYesMean of a numeric columnAverage order value, average load time
MAXYesHighest value in a columnLatest event timestamp, highest sale price
MINYesLowest value in a columnEarliest order date, lowest recorded temperature
COUNT DISTINCTNoNumber of unique values in a columnUnique customers, unique SKUs ordered

The default date dimension

Every measure can name one Default date dimension. Most measures do not need it: a plain sum is the same whichever date a report uses. Set it when the measure's value depends on a date:

The list offers the model's dimensions built on a date or timestamp column, or on a user-defined attribute of type date, on the measure's table or a table joined to it. A whole-number date key or a text date is not offered; create a user-defined attribute of type date that converts it, add it as a dimension, and choose that dimension. A model with several dates (transaction, posting, settlement) can give each measure its own; Tessallite never picks one for you. Semi-Additive Measures explains the choice with a worked example.

Additive versus non-additive measures

An additive measure can be correctly re-aggregated from a coarser pre-aggregated summary. If Tessallite has a daily SUM(revenue) summary by country, it can answer a weekly query by summing those daily rows — the data source is not touched.

COUNT DISTINCT is non-additive. Summing distinct counts from a daily summary does not give the correct weekly distinct count because the same value may appear on multiple days. Tessallite requires an exact grain match to serve a COUNT DISTINCT measure from a pre-aggregated table. If no aggregate exists at the requested grain, the Query Router falls back to executing the query directly against the fact table.

Note: Plan your aggregates explicitly for every grain you expect to query if you use COUNT DISTINCT measures. Without a matching aggregate, those queries always hit the data source at full cost.

Steps

  1. Open a model in Model Builder and click Measures in the Toolbelt (left sidebar).
  2. Click Add Measure. The Drawer (right panel) opens with a blank measure form.
  3. Enter a Name. Use business-readable terms — for example, total_revenue rather than col_amt_sum. BI tools surface this identifier to end users.
  4. Select the Source table from the dropdown. Only fact tables already added to the model are listed.
  5. Select the Source column. The dropdown lists all columns in the selected fact table.
  6. Select the Aggregation type. If the column contains non-numeric values and you need a row count, use COUNT on the primary key rather than the data column.
  7. Optionally enter a Display name and Description.
  8. If the measure is a balance or another point-in-time value, set its Semi-additive behavior and its Default date dimension.
  9. Click Save. The measure appears in the Measures list in the Toolbelt and is available to the Query Router immediately.

Editing a measure

Click the measure name in the Toolbelt Measures list. The Drawer opens with the current values. Change any field and click Save.

Warning: Renaming a measure updates model-owned calculated-measure, KPI, scratchpad, saved SQL query and model alias-map references in the same transaction. Composite measures refer to measures by id and need no rewriting. A rename is rejected with the blocking object and JSON path if Tessallite cannot safely rewrite a stored name-based reference. Stable-ID consumers do not need rewriting. Quantile proof rows for that measure are invalidated so queries fail back to the source until the aggregate is refreshed or rebuilt. Deployed snapshots and external BI reports remain immutable, so reports or dashboards that reference the old name can still break; coordinate the rename and redeploy the model.

Deleting a measure

Open the measure in the Drawer and click Delete. Tessallite removes the measure from all aggregates that included it. Any aggregate that relied solely on the deleted measure will contain no measures and should be updated or deleted to avoid build errors.

When other objects depend on the measure. Tessallite checks what else uses the measure before it deletes it. If another object would stop working without it (a KPI or a named set that is built on it), the delete is refused and you change that object first. If the delete only changes or invalidates other objects (aggregates built for it, a persona that lists it, or its time variants, which are removed with it), a second dialog, Delete affects other objects, shows how many objects are changed or invalidated, how many are removed together with the measure, and the number per object type. Choose Delete anyway to delete, or Cancel to keep everything as it is. The same question is asked when the delete comes from Undo or from reclassifying a column in the table editor. The Impact Analysis panel lists each affected object; open it first when the numbers are larger than you expect.

Related