XCubes

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.

Time-scale

A time-scale dimension represents a sequence of calendar periods. You define a start date and number of periods, and XCubes generates the individual month items for you. It then derives quarter and year aggregate items automatically — no manual formula for "Q1 = Jan + Feb + Mar" is needed.

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:

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.