Shape · Columns

Format Table

Sets how columns print in previews and reports: currency, percent, decimals, thousands separators, date masks, alignment and hidden columns. The values themselves don't change.

Also known as: Number format, display format

How it works

Under Rules, + Add rule formats every column whose name matches a pattern under Column name matches (* any run, ? one character) and whose type is picked under Column types. Under Column formats, pick a column and choose Display as: Number, Currency, Percent, Date or Text. Numbers take decimals, a thousands separator and a fixed total width; currency takes an ISO code such as USD shown before or after the value; Percent multiplies by 100, so a 0 to 1 fraction prints as 42%, unless you tick Values are already 0–100; Accounting negatives — (1,234) swaps the minus sign for parentheses; a unit such as kg can sit before or after; dates take a Date format mask such as DD/MM/YYYY. Alignment, width, Bold and Hide from reports shape the table, and If it can't apply says what to do with a value the format does not fit. The settings travel with the column downstream, and Save as a project rule applies the same format to every matching column in the project. To change the data rather than its look, use Format to Text.

Inputs and outputs

Inputs

  • data — Table

Outputs

  • data — Table

Settings

The Attributes panel of Format Table, as in the app: the controls work, but nothing runs — there is no data behind it.

The same settings, as the Assistant writes them
{
  formats: [{ column: string, type?: "number"|"currency"|"percent"|"date"|"text", decimals?: number, totalDigits?: number (fixed width: integer + decimal digits; needs decimals set), separator?: "comma"|"dot"|"space"|"none", currencyCode?: string (ISO 4217, e.g. "USD" — preferred over symbol), currencyDisplay?: "symbol"|"code", symbol?: string, symbolPosition?: "prefix"|"suffix", negative?: "minus"|"parens", unit?: string, unitPosition?: "prefix"|"suffix" (default suffix), alreadyScaled?: boolean ("percent" multiplies by 100: a 0-1 fraction like 0.42 prints "42%"; set true ONLY when the column already holds 0-100 percent points like 42 — never format a *100 computed column without it), mask?: string (e.g. "DD/MM/YYYY"), bold?: boolean, align?: "left"|"center"|"right", width?: "narrow"|"wide", hidden?: boolean }]
}

Example

A sales summary feeds a report. Format revenue as Currency with code USD and 2 decimals, share (a 0 to 1 fraction from Group Aggregate) as Percent with 1 decimal, and hide the region_id helper column. The numbers underneath stay numbers, so a total further down still adds up.