Docs/Infohub (Flow)/T14: Multi-Interval Models
Infohub (Flow)How-to

T14: Multi-Interval Models

Minutely peak demand up to a yearly rollup — where fine intervals are worth their cost and where they are not.

Updated 15 Oct 2026Infohub Docs

What you will build: a peak demand chain that requires minutely resolution, a full chain to yearly, and a year-on-year comparison.

Time: about 35 minutes.

You need: T09 completed.


Step 1 — A case where minutely is genuinely necessary#

Electricity billing is the classic example. A demand charge is based on the highest demand in the month, measured over short intervals — so an hourly average hides exactly the peak you are billed for.

Under a new folder Utilities → Power, create a metric Demand:

Measure Retrieval type Interval Aggregation Source / Tag Unit
Line Power Retrieved Tag — 110-JT-001.PV kW
Demand Minutely Aggregated Minute(s) Average Line Power kW
Peak Demand Hourly Aggregated Hour(s) Maximum Demand Minutely kW
Peak Demand Daily Aggregated Day(s) Maximum Peak Demand Hourly kW
Peak Demand Monthly Aggregated Month(s) Maximum Peak Demand Daily kW

Maximum all the way up. This works correctly because the maximum of maxima is the maximum — unlike an average of averages, which is only correct when every period carries equal weight.

Step 2 — See why the interval mattered#

Compare Peak Demand Hourly against a plain hourly average of the same tag.

The average smooths the peak away. A line drawing 8 kW for two minutes and 3 kW for the rest of the hour averages to something modest — and the demand charge is based on the 8.

That is what "the interval must match the question" means. Here, minutely is not a luxury.

Step 3 — Now count the cost#

Look at what you just built.

A minutely measure produces about 526,000 values a year. An hourly measure produces about 8,800. So one minutely measure costs roughly as much as sixty hourly ones, in storage and in calculation — and everything above it inherits that volume.

Interval Values per year
Minutely ~526,000
Hourly ~8,800
Shiftly ~1,100
Daily 365
Monthly 12
Important

Minutely is the most expensive decision in a model. A few thousand minutely measures makes a model behave like a much larger one. Use minutely where the resolution genuinely answers a question — peak demand, short-cycle equipment, process capability — and hourly everywhere else.

The most common performance complaint about Infohub traces back to minutely measures added because they seemed more precise, feeding chains nobody looks at.

Step 4 — Build the energy chain properly#

Contrast with energy consumption, where minutely adds nothing. In the same metric:

Measure Interval Aggregation Source
Energy Meter Tag — 110-JQ-001.PV
Energy Hourly Hour(s) Counter Energy Meter
Energy Daily Day(s) Sum Energy Hourly
Energy Weekly Week(s) Sum Energy Daily
Energy Monthly Month(s) Sum Energy Daily
Energy Quarterly Quarter(s) Sum Energy Monthly
Energy Yearly Year(s) Sum Energy Quarterly

Note two things.

Hourly is the base. Nobody needs minutely energy consumption; the monthly bill is the same either way.

The chain is contiguous — each level derives from the one below. That gives you every intermediate period people ask for, and it means you can walk down from a wrong month to the wrong day to the wrong hour.

Step 5 — Watch the branch#

Energy Weekly and Energy Monthly both derive from Energy Daily. That is correct — weeks and months are parallel views of the same days.

What you must not do is build Energy Monthly from Energy Weekly. A week frequently spans a month boundary, so the arithmetic simply does not work, and the monthly figure will not reconcile with its days.

If you ever see a monthly number that disagrees with the sum of its days, this is the first thing to check.

Step 6 — Year-on-year comparison#

Add a measure comparing this month against the same month last year:

Field Value
Name Energy Same Month Last Year
Interval Month(s)
Unit kWh
Measure_<energyMonthlyId>[-12].Value

And the variance:

Field Value
Name Energy YoY Change
Interval Month(s)
Unit %
Format +0.0;-0.0;0.0
SafeDivide(
    Measure_<energyMonthlyId>.Value - (Measure_<energyMonthlyId>[-12].Value ?? 0),
    Measure_<energyMonthlyId>[-12].Value) * 100

On a fresh instance there is no data twelve months back, so these will be empty. That is correct behaviour — and it is worth seeing, because a comparison measure that quietly returns zero instead of nothing would understate every variance.

Step 7 — Rolling windows instead of extra measures#

A "trailing twelve months" total is not an aggregation. It is a calculation with a window:

Field Value
Name Energy Trailing 12 Months
Interval Month(s)
Unit kWh
Measure_<energyMonthlyId>[-12, 0].Values.Where(v => v.HasValue).Sum()

Twelve measures plus a sum would also work, and would be three times the model and would break the day somebody asks for six months instead.

Step 8 — Choose the interval per audience#

The interval should match the decision the measure supports:

Audience Interval Span
Control room Hourly, occasionally Minutely Current shift
Supervisor Shiftly or Daily Week
Plant management Daily Month
Executive Monthly Year or more

A monthly measure is useless for diagnosing this morning; a minutely one is useless in a board pack. Building one and hoping it serves both is the most common cause of dashboards nobody uses.

Step 9 — Prune#

Look at what you have built and ask which intervals anyone will actually open.

Energy Quarterly — does anybody report quarterly? If not, delete it and let Energy Yearly derive from Energy Monthly.

Tip

Only build the intervals someone uses. A quarterly measure nobody opens still costs storage and calculation on every pass, forever. Add intervals when they are requested. Across a large model this is the cheapest performance improvement available, and it is a modelling discipline rather than a setting.

What you have learned#

Match the interval to the question. Peak demand needs minutely; consumption does not.

Maximum aggregates correctly up a chain, because the maximum of maxima is the maximum.

Minutely costs about sixty times hourly, and everything above it inherits that.

Chains are contiguous and branch from the right level. Weeks and months both come from days; months never come from weeks.

Reach other periods with [-12] for year-on-year, and [-12, 0] for a rolling window.

A rolling window is one measure, not twelve.

Only build the intervals someone uses.

Try this before moving on#

Work out the annual value count for your model.

Count your measures at each interval, multiply by the values-per-year table above, and total it. Then ask whether the minutely measures in that total are each earning their place.

On a real model this exercise usually finds a chain built to minutely for a reason nobody remembers, which alone accounts for a large share of the database.


Next: T15: Model Attributes — one expression serving every instance.

esc
↑↓ navigate · ↵ open · ⌘K anywhere