Number formats
Number formats control how values are displayed in a report: decimals, thousand separators, percentages, scaling to thousands, hours and dates. The same syntax is used in several places, but not every place supports all of it.
| Where | Set in | Supports |
|---|---|---|
| Measure | The Format field on the measure (see below) | The full syntax on this page |
| Report line (row) | The format property of a ReportLine in $report — see XML Dimension | The full syntax; overrides the measure format for that row |
| KPI | $olap.setKpiFormat() or .format() — see KPI’s | Number masks only (default ###,##0.00) |
| Table column | The value_format argument of addTableColumn — see Tables | Number masks only, and the mask must start with # — 0.00 is not a supported table-column mask, use #0.00. A leading L is accepted directly before the # and ignored |
The Format field on a measure
Section titled “The Format field on a measure”The Format field is part of the shared measure definition (the data object), and is only shown for measures. You reach it either from the data object itself or from the report editor under Object details — in both cases the change applies to every report that uses the measure. There is no report-local format field; if a single report needs something else, set the format on a report line instead.
The field is free text (up to 255 characters). What you enter is a mask, optionally preceded by a prefix that transforms the value before it is formatted. The … button next to the field opens a builder: it lists the masks and the prefixes with what each one does, a double click inserts one at the cursor, and a Result pane shows the format applied to sample values. Editing the field requires update access to data objects; without it the field is read-only and the button is hidden.
An empty Format field means the raw value from the database is shown as text, and the column is left-aligned in Excel exports. When a format is set and the value can be converted to a number, it is exported as a number and right-aligned. Text values remain text.
The format applies both to Pivot reports and to List reports.
A mask is a standard number pattern:
| Symbol | Meaning |
|---|---|
# | Digit, omitted when it is a leading or trailing zero |
0 | Digit, always shown |
, | Thousand grouping — displayed as a space |
. | Decimal separator — displayed as a dot |
% | Multiplies the value by 100 and prints the percent sign |
| Literal text | Fixed text printed before or after the number |
The separators are fixed: space for grouping and dot for decimals, regardless of the user’s language.
Fixed text can be added before or after the number, for example ###,##0 kg or NOK ###,##0. Some characters have a special meaning in a mask — besides the symbols above, that is E, ;, -, ‰, ¤ and '. Quote such a character with single quotes to print it as text, and use two single quotes to print a single quote.
Examples
Section titled “Examples”Sample values: the amount 1234567.89, the ratio 0.2537, the date 20260826 and the hour value 7.5.
| Format | Result | Use for |
|---|---|---|
###,### | 1 234 568 | Amounts and counts without decimals |
###,##0.00 | 1 234 567.89 | Amounts with two decimals |
###,##0.0 | 1 234 567.9 | Quantities with one decimal |
##0 % | 25 % | Whole percent from a ratio stored as 0–1 |
##0.0 % | 25.4 % | Percent with one decimal |
##0.00 % | 25.37 % | Percent with two decimals |
T ###,##0 | 1 235 | Amounts in thousands |
T ###,##0.0 | 1 234.6 | Amounts in thousands with one decimal |
P0 ##0.0 % | 25.4 % | Share of the top-level row the cell belongs to |
P1 ##0.0 % | 25.4 % | Share of the row above (the parent in the drill path) |
L 010##0.0 % | 25.4 % | Share of report line 10 ($report) |
DATE:dd.MM.yyyy | 26.08.2026 | Dates on a numeric date column |
DATE: | 2026-08-26 | Dates in ISO format |
H:MM | 7:30 | Decimal hours shown as hours and minutes |
Prefixes
Section titled “Prefixes”The prefixes are read at fixed character positions, so the spacing matters. Use exactly the spacing shown below.
T — thousands
Section titled “T — thousands”T, a space, then the mask. The value is divided by 1000 before it is formatted, so T ###,##0 shows 1234567.89 as 1 235.
P0 and P1 — share of the top row and of the parent
Section titled “P0 and P1 — share of the top row and of the parent”P0 or P1, a space, then the mask. P0 divides the cell value by the value on the first drill level — the top-level row the cell belongs to — while P1 divides it by the row immediately above in the drill path. The result is a ratio, so the mask should contain %.
P0 needs a row above it to divide by, so on the first drill level itself there is no denominator and the raw value is shown with the mask applied. On the first drill level, P1 divides a non-zero value by itself and gives 100 %. A zero value remains 0 %.
A zero cell value is shown as 0 %. If the reference row is zero while the current value is non-zero, the cell shows -. The same applies to L.
L — share of a report line
Section titled “L — share of a report line”L, a space, then the line number in exactly three character positions, then the mask — so the mask always starts at the sixth character. This only applies to $report lines.
L 001##0.0 % → share of line 1L 010##0.0 % → share of line 10L 100##0.0 % → share of line 100Pad the line number with zeros as shown. Trailing spaces work as well (L 10 ##0.0 %), but L001##0.0 % is not valid — the space after L is required.
DATE: — dates
Section titled “DATE: — dates”DATE: followed by a date pattern, for example DATE:dd.MM.yyyy, DATE:yyyy-MM or DATE:dd/MM/yy. DATE: on its own gives yyyy-MM-dd.
The value must be a date, a number in YMD8 form (20260826) or epoch milliseconds. A text column is shown unchanged, and the date pattern is then ignored.
Date patterns are case-sensitive: MM means month and mm means minutes, dd means day of month and DD means day of year. Patterns with month names (MMM) follow the server language, so prefer numeric patterns.
H:MM — hours and minutes
Section titled “H:MM — hours and minutes”H:MM on its own, with no mask (upper or lower case). The value is read as decimal hours and shown as hours and minutes: 7.5 becomes 7:30 and 8.33 becomes 8:20.
How the format is used in the report
Section titled “How the format is used in the report”- Report table: the measure column is rendered with the measure format, unless the row has its own report line format — the line format wins.
- Cell icons, bars and colours: the limits in a measure script are compared against the value after the prefix has been applied. With
P0,P1orLthat is the computed ratio, where 1 represents 100 %, and withTit is the value in thousands. Ratios can be negative or greater than 1. The cell styling always uses the measure format, also on rows that override the format. - Excel export: in the main report table, the measure format controls the Excel cell type, value and number format. A number or percent mask on the measure is translated to an Excel number format, and the cell holds the transformed number (also after
T,P0,P1andL), so it can be used in calculations. A report line format changes the value shown in the report, but does not replace the measure format during Excel export: the exported number is the one the measure format produces, so a row that shows25.4 %in the report is exported as the underlying amount. On calculated rows (TYPE_CALC, see XML Dimension) whose line format contains%, the cell is still given a percent style, so check such rows in the export. If the measure has no format, the cell is exported as text even when the report line has a format. Add-on tables have separate export handling. - Measure filter and slicer: a measure with Show measure in filter set gets a column in the filter popup and in the slicer. Those controls hold one value on its own, with no drill path, so
P0,P1andLare shown as a plain grouped number instead of a share.T,DATE:andH:MMbehave as in the report. - PDF export: the value is exported exactly as it is formatted in the report.
- CSV export: in the main report table, the formatted value is exported. When the measure has a format, spaces are removed, so
1 234 568becomes1234568. If only the report line has a format, the value is exported as displayed text and its spaces remain. - Graphs: not affected. Charts format their own labels and axes — see Graphs.