Dimension types
XCubes supports four dimension types. The type is chosen when the dimension is created and controls how items can be structured and how subtotals are computed.
Free-form
A free-form dimension is a flat list of items with no enforced parent-child relationship. Items appear in the order you place them. Subtotals are expressed as formula items that explicitly reference their children.
Free-form is the right choice when the members do not form a natural tree — a list of products, a set of cost centres, or a list of employees. It is the default dimension type. (For modelling alternatives such as Base vs. Upside vs. Downside, use a scenario dimension, described below.)
Hierarchical
A hierarchical dimension organizes items into a parent-child tree. Parent items aggregate their children automatically — you do not need a formula to sum them. The engine rolls up leaf values through every level of the hierarchy at query time.
Hierarchical dimensions are ideal for structures like a chart of accounts (Department > Category > Line item), a geographic hierarchy (Region > Country > City), or an org chart. When you add a new child under an existing parent, the parent's total updates immediately with no formula changes required.
In a hierarchical dimension, the item's level (0 = top of the tree, 1 = one level down, etc.) is set automatically from its position in the parent-child structure. Leaf items at the deepest level are the input cells; everything above them is derived.
Hierarchical roll-ups are straight aggregations only — a parent is always the plain sum of its children (leaf measures can opt into a weighted or average roll-up via the item's aggregation setting). Hierarchical items cannot carry formulas, and the API rejects any attempt to add one. If your structure needs a calculated row — a ratio, a margin %, a difference such as GrossProfit = Sales − COGS, or any other formula — model it as a free-form dimension instead, where subtotals and calculated items are expressed as formulas.
Seeing what a subtotal is made of. Right-click a parent cell and choose Drill Down: the pane lists the children at that same coordinate with their values and each one's share of the total, then the sum of the children and the parent's own value. A child that is itself a parent is marked, so you can keep going down the tree. When a crossing item aggregates as something other than a sum — a rate flagged weighted or average — the children genuinely do not add up to the parent, so the pane names the rule and the item that declared it, and shows each child's weight. Children outside your access area are left out and counted. Nothing is written; it is a read of the numbers already on screen.
Time-scale
A time-scale dimension represents a sequence of calendar periods. You choose a granularity — monthly, quarterly, half-yearly, weekly, or yearly — and a year range, and XCubes generates the period items for you. Monthly and weekly dimensions can also derive quarter, half-year and year-total aggregate items automatically, so no manual formula for "Q1 = Jan + Feb + Mar" is needed. A quarterly dimension has four items per year and can derive half-years and a year total, but not quarters (its items already are quarters) or months (those sit below a quarter). A half-yearly dimension has two items per year and can derive only a year total. A yearly dimension has one item per year and no rollups: the year is already the whole period.
Time-scale dimensions enable time-series formula functions such as Lag(), YTD(), Rolling(), and Prior(). Those functions rely on the ordered structure of a time dimension to navigate forward and backward in time. A cube must have exactly one time-scale dimension to use these functions.
For custom period labeling (fiscal years, weeks, non-standard quarters) you can override the generated item codes and descriptions after creation.
Scenario
A scenario dimension models alternative versions of the same figures side by side — for example Base, Upside, and Downside, or Budget vs. Actual. Structurally it behaves like a free-form dimension (a flat list of items, subtotals expressed as formulas); what sets it apart is a set of affordances built for working with alternatives:
- Side by side. Every scenario shares the same cells, so a formula can compare them directly —
Upside − Base, say — and a grid or widget can show one scenario next to another. - Copy one scenario into another. The Copy scenario action seeds a scenario from an existing one — "start Upside from Base, then tweak". It replaces every value in the target with the source's, including cells the source leaves empty, so the two match before you edit. Calculated (formula) items are not offered as a source or target: a copy skips formula cells, so it would do nothing there.
- Switch a whole dashboard at once. A scenario dimension is bound to the dashboard nav bar automatically, so a single selector flips every widget on the deck between scenarios. See Dashboards.
A new scenario dimension starts with a single Base item; add the alternatives you need. An existing free-form dimension can be converted to a scenario in place — this is the only dimension-type change XCubes allows, since scenario and free-form share the same structure. Every other type is fixed once the dimension is created.