Calculated columns

New columns computed for every row, built from blocks rather than typed as text.

A calculated column adds a new column to a dataset, computed for every row and stored with the data.

When to use one

When the value belongs to the row itself:

  • price × quantity → a line total
  • first_name + last_name → a full name
  • the year part of an order date, so you can group by it
  • a category derived from a threshold — "large" when an amount is over some limit

When not to

When the value only makes sense across many rows. "Average order value" is not a property of one order, so it is a measure, not a column. Trying to express it as a column is the most common early mistake, and the symptom is a column full of identical or nonsensical numbers.

How you build one

From blocks, not from typed text. You pick a function, drop fields and values into its slots, and the result is checked as you go — a calculated column that would not compile cannot be saved, because it is validated before it ever reaches the engine.

Every available function, with its arguments and return type, is in the function reference.

Cost

A calculated column is computed once when the dataset is prepared and stored, so charts read it as cheaply as any other column. That makes it the right choice for a value used by many visuals — compute once, use everywhere.

Calculated columns · ChartBase Docs