Skip to main content
A table variable holds a collection of values in rows and columns rather than a single number — an amortization schedule, a series of cash flows, a set of line items, a lookup grid. Whether a variable holds a table is determined by its value — produced by a calculation or supplied as input — not by its display type. The table display type (see Defining variables) is how you get the table-specific display options: named columns, per-column formats, and row labels. A table value given a scalar display type such as number still renders as a table, but every cell takes that type’s formatting — thousands separators, the configured decimal places — and the columns fall back to generic headers. This page covers the authoring side; for the underlying value model — how tables are written, stored, and combined — see Tables.

When to use a table

Use a table variable when a quantity is naturally many values rather than one: a payment broken out month by month, a list of material costs, a grid of rate-by-term lookups. A variable that holds a single value should stay a scalar number, percent, or no_separator.

Rows versus columns

The authoring distinction that matters: columns are defined, rows are data. You name and format the columns when you author the variable; the rows are produced by a calculation or supplied as input, and there can be any number of them. Tables are 1-indexed — the first row and column are index 1. So you configure the shape across, not down.

Configuring columns

Each column has:
  • A name — the column’s label.
  • A display typenumber, percent, or no_separator, the same scalar types a plain variable uses.
  • A decimal formatdecimals_0 through decimals_9, or decimals_float, applied when the column’s values are shown.
You also set the starting row index — the number shown as the label of the first row, like the row numbers down the side of a spreadsheet. It is a display indicator only and does not change how the table is indexed in equations, which is always 1-based. It is usually 1; setting it to 0 is occasionally handy when displaying a cash-flow table whose initial flow is period 0 (CF[0]), for instance. Columns have no unit field: each cell carries its own unit, supplied with the value, so the variable’s own unit is empty (see Tables as a stored value).

Row labels

A table can optionally carry row labels, so its rows read by name rather than only by index — for example, labeling an amortization table’s rows by month, or a cost breakdown’s rows by line item. Row labels are a presentation aid; they name the rows without changing the values in them. Row labels are an independent option: a table can have row labels with or without a default table, or none at all, but accessed and set in the default table view.

Default table

A table variable can carry a default table — a complete table value used when a calculation provides none, the multi-value counterpart to a scalar default value. A value supplied from a default is recorded with default provenance. A default table is also independent of row labels: you can set a default table on its own, pair it with row labels, or use neither. A table variable with no default has none applied.

Presenting a table as a chart

The same table variable can be displayed as a bar or pie chart instead of a grid — the chart is a presentation choice over the underlying table. See Charts.