modellerUpdated 2026-10-07

Semi-Additive Measures

What this covers

Some numbers should never be added up across time. This page explains what semi-additive measures are, why they matter, and how to configure them so that Excel PivotTables, query results, and dashboards show correct subtotals and grand totals.

What "additive" means

Most business measures are additive: you can safely sum them across any dimension. Revenue earned in January plus revenue earned in February equals revenue for Q1. Revenue from the US plus revenue from Europe equals global revenue. Adding up works in every direction.

What "semi-additive" means

Some measures are semi-additive: they can be summed across most dimensions, but not across time. The most common examples:

MeasureWhy you cannot sum across time
Account balanceYour bank balance on Jan 31 plus your balance on Feb 28 does not equal your Q1 balance. Your Q1 balance is the Feb 28 number (the last value).
HeadcountIf you had 100 employees in January and 105 in February, your Q1 headcount is 105, not 205.
Inventory on hand500 units on Jan 31 plus 480 on Feb 28 does not equal 980 for Q1. The answer is 480.
Open support tickets42 open tickets on Monday plus 38 on Tuesday does not mean 80 total. The point-in-time count is what matters.

What goes wrong when you sum a semi-additive measure

Imagine a simple bank account balance over three months:

MonthBalance
January$100
February$150
March$200

If Tessallite sums these to produce a Q1 subtotal, the PivotTable would show $450. That is wrong — the real Q1 ending balance is $200. The analyst sees $450, believes it, and makes a decision based on an inflated number. This is the core risk of misconfigured aggregation.

Aggregation types

Tessallite supports six aggregation types. Choose the one that matches the business meaning of your measure:

AggregationSubtotal behaviourUse for
sumAdd up all values.Revenue, quantity sold, cost, transactions.
last_non_emptyTake the last non-null value along the time axis. Sum across non-time dimensions.Account balance, headcount, inventory, any point-in-time snapshot.
maxTake the maximum value.Peak concurrent users, highest temperature, record high.
minTake the minimum value.Lowest temperature, minimum stock level.
count_distinctCount unique values (not composable — re-queries the source).Unique customers, unique products sold.
averageCompute the weighted average (not composable — re-queries the source).Average order value, average response time.
By Account is not a supported behaviour. You may have seen a By Account option in older versions. It would have let each account in an account dimension carry its own additivity rule (some accounts sum over time, some take the last balance), but the per-account aggregation engine was never built, so the option has been removed from the semi-additive dropdown. Use last_non_empty for balance-style accounts instead. If an older model still has a measure set to By Account, that measure is flagged as invalid until you pick a supported behaviour and re-enable it.

The default date dimension

A semi-additive measure answers a question about time: the balance on the last date, the lowest daily total, the average per date. To answer it Tessallite must know which date the measure works from. That date is the measure's Default date dimension.

Why the measure must name its own date

A model often has several dates on the same table: a transaction date, a posting date, a settlement date, a created-at timestamp. They order the rows differently. Take a balance table with two of them:

RowSnapshot dateBooking dateBalance
131 Jan10 Mar150
228 Feb5 Feb190
331 Mar20 Jan130

The closing balance is 130 by snapshot date (row 3 is last) and 150 by booking date (row 1 is last). Both are legitimate numbers; only the modeller knows which one the business means. Tessallite does not guess between the dates of a model. The measure names its date, and that date is used everywhere.

What it is used for

A date placed on the report does not change the rule. It only groups the result. With Month on rows, each month shows the value for the dates inside that month, still taken by the measure's default date dimension.

Which dimensions can be chosen

The Default date dimension list in the measure drawer offers the model's dimensions that are built on:

and whose table is the measure's own table or a table joined to it.

Not offered, and how to make each one usable:

What you haveWhy it is not offeredWhat to do
A whole-number date key such as 20260930It is a number, not a dateCreate a user-defined attribute of type date that converts it, add it as a dimension, choose that dimension
A date stored as textIt is text, not a dateSame: a user-defined attribute of type date
A time of dayIt has no dateUse the date column the time belongs to
A calculated dimension with no declared typeIts type is unknownRecreate it as a user-defined attribute of type date
A date on a table that is not joined to the measure's tableThe rows cannot be matchedAdd the join, or choose a date on the measure's own table

The drawer explains this under the list and names any date dimension left out because its table is not joined.

When no default date dimension is set

A change to the default date dimension takes effect for report users when the model is deployed, like any other change to a measure.

Personas and the default date dimension

The date is part of how the measure is calculated, so it follows the persona's column security. When the date column carries a data tag the persona is restricted from, the persona still sees the measure in the field list, but a query that needs the semi-additive behaviour is refused for that persona with a clear message. The message names the measure and the setting, not the hidden field. Leaving the date out of the persona's dimension list does not withhold it: the list decides which dimensions the persona sees, and the measure still works from the date. Remove the restriction on the date column for the persona, or build a separate measure for that audience.

Protections

A column or user-defined attribute that a measure uses as its default date dimension cannot be deleted, and a user-defined attribute cannot be changed to another type, while a measure still uses it. Choose another default date dimension on the measure first.

How to configure a semi-additive measure

  1. Open the model in the Model Builder and open the measure in the Measures panel.
  2. Under Additivity, set Semi-additive behavior to the rule the business means, for example Last non-empty for a balance.
  3. Set Default date dimension to the date the measure works from, for example the snapshot date of the balance table.
  4. Save, then Deploy the model.

No Excel-side configuration is needed. When an Excel user creates a PivotTable with this measure, Tessallite applies the behaviour for rows, subtotals and grand totals.

Worked example

A bank model has a payment_transaction table with business_date, transaction_ts and settlement_ts, and a measure account_balance.

  1. account_balance: Semi-additive behavior = Last non-empty, Default date dimension = business_date.
  2. A report with only account_balance shows one number: the total of all balances on the latest business date that has a balance.
  3. Add Country on rows: each country shows its own latest balance. A country whose last balance is a day earlier than the others shows that earlier day's total; the dates are found per row.
  4. Add Month on rows instead: each month shows the balance on the last business date inside that month.
  5. An Excel calculated measure such as account_balance - chargeback_amount works the same way, with or without a date on the report.

How Excel users see semi-additive measures

Excel users do not need to know about semi-additive aggregation. The PivotTable renders subtotals and grand totals using the aggregation type set by the modeller:

Wrong (measure configured as sum):

MonthBalance
January$100
February$150
March$200
Q1 Subtotal$450

Correct (measure configured as last_non_empty):

MonthBalance
January$100
February$150
March$200
Q1 Subtotal$200

The only difference is the modeller's aggregation setting. The Excel user sees correct numbers without any manual intervention.

How it works internally

For a measure with a semi-additive behaviour, Tessallite builds the answer in two steps over the same secured, filtered rows as the rest of the query. The first step totals the measure for each date of the measure's default date dimension inside every result row. The second applies the behaviour to those date totals: the total on the last date that has a value, on the first such date, the smallest, the largest, or the average of the date totals. Filters and row security apply before the first step. Such a measure is always calculated on the source data; an aggregate stores plain totals over the rows, not the per-date totals these rules need.

Common mistakes

MistakeConsequenceFix
Leaving a balance measure as a plain sumSubtotals show inflated numbersSet Semi-additive behavior to Last non-empty
Using Last non-empty for a revenue measureSubtotals show only the last period's revenue, not the totalClear the semi-additive behaviour
Choosing the wrong default date dimension (for example the load timestamp instead of the snapshot date)The "last" balance is taken from the wrong day; the number looks plausibleChoose the date the business reads the balance by
Expecting a date on the report to change which date is "last"The report date only groups; the default date dimension still decidesChange the measure's default date dimension, or create a second measure with another one
Using a whole-number date key as the dateIt is not offered in the listCreate a user-defined attribute of type date and choose its dimension
Using average when you mean sum / countSubtotals may differ from a calculated ratioUse a calculated measure for ratios

Related