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:
| Measure | Why you cannot sum across time |
|---|---|
| Account balance | Your 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). |
| Headcount | If you had 100 employees in January and 105 in February, your Q1 headcount is 105, not 205. |
| Inventory on hand | 500 units on Jan 31 plus 480 on Feb 28 does not equal 980 for Q1. The answer is 480. |
| Open support tickets | 42 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:
| Month | Balance |
|---|---|
| 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:
| Aggregation | Subtotal behaviour | Use for |
|---|---|---|
| sum | Add up all values. | Revenue, quantity sold, cost, transactions. |
| last_non_empty | Take the last non-null value along the time axis. Sum across non-time dimensions. | Account balance, headcount, inventory, any point-in-time snapshot. |
| max | Take the maximum value. | Peak concurrent users, highest temperature, record high. |
| min | Take the minimum value. | Lowest temperature, minimum stock level. |
| count_distinct | Count unique values (not composable — re-queries the source). | Unique customers, unique products sold. |
| average | Compute 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:
| Row | Snapshot date | Booking date | Balance |
|---|---|---|---|
| 1 | 31 Jan | 10 Mar | 150 |
| 2 | 28 Feb | 5 Feb | 190 |
| 3 | 31 Mar | 20 Jan | 130 |
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
- Semi-additive behaviours (last non-empty, first non-empty, minimum, maximum, average of children). The values are totalled for each date of the default date dimension, then the behaviour is applied to those date totals. This happens at every level of a report: a row per country, a subtotal, and the grand total with no date on the report at all.
- Time variants (prior period, year over year, period to date, rolling, lag). Every variant of the measure works from this date, whether it is a column or a user-defined attribute of type date; a variant has no date of its own, and its time hierarchy must be built on this date. A variant still needs a period on the report; the default date dimension does not replace it. See Configure Time Variants.
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:
- a source column of type date or timestamp, or
- a user-defined attribute whose output type is date,
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 have | Why it is not offered | What to do |
|---|---|---|
A whole-number date key such as 20260930 | It is a number, not a date | Create a user-defined attribute of type date that converts it, add it as a dimension, choose that dimension |
| A date stored as text | It is text, not a date | Same: a user-defined attribute of type date |
| A time of day | It has no date | Use the date column the time belongs to |
| A calculated dimension with no declared type | Its type is unknown | Recreate it as a user-defined attribute of type date |
| A date on a table that is not joined to the measure's table | The rows cannot be matched | Add 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
- Saving: choosing a semi-additive behaviour requires a default date dimension. The drawer shows the field as required and the save is refused without it.
- Querying: an older measure that has a behaviour and no default date dimension is refused at query time with a message that names the measure and the setting. Tessallite does not fall back to another date and does not return a plain sum in its place: a wrong balance that looks right is worse than a clear message.
- Model Health: the Re-check action lists every measure that has a semi-additive behaviour and no default date dimension, and every measure whose stored date no longer qualifies (for example because the column changed type).
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
- Open the model in the Model Builder and open the measure in the Measures panel.
- Under Additivity, set Semi-additive behavior to the rule the business means, for example Last non-empty for a balance.
- Set Default date dimension to the date the measure works from, for example the snapshot date of the balance table.
- 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.
account_balance: Semi-additive behavior = Last non-empty, Default date dimension =business_date.- A report with only
account_balanceshows one number: the total of all balances on the latest business date that has a balance. - 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.
- Add Month on rows instead: each month shows the balance on the last business date inside that month.
- An Excel calculated measure such as
account_balance - chargeback_amountworks 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):
| Month | Balance |
|---|---|
| January | $100 |
| February | $150 |
| March | $200 |
| Q1 Subtotal | $450 |
Correct (measure configured as last_non_empty):
| Month | Balance |
|---|---|
| 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
| Mistake | Consequence | Fix |
|---|---|---|
Leaving a balance measure as a plain sum | Subtotals show inflated numbers | Set Semi-additive behavior to Last non-empty |
| Using Last non-empty for a revenue measure | Subtotals show only the last period's revenue, not the total | Clear 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 plausible | Choose 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 decides | Change the measure's default date dimension, or create a second measure with another one |
| Using a whole-number date key as the date | It is not offered in the list | Create a user-defined attribute of type date and choose its dimension |
Using average when you mean sum / count | Subtotals may differ from a calculated ratio | Use a calculated measure for ratios |
Related
- Define Measures
- Calculated Measures
- Configure Aggregates
- KPIs — a KPI can apply the same closing/average reduction per period. See "Choosing the reduction grain" there for the periods it accepts and why a column name is not one of them.