# Change number format and scale

Numbers can be displayed in various formats based on context, including financial data, large values, percentages, and time durations. Choosing the right format improves readability and consistency. While predefined formats cover many scenarios, custom formats offer greater control over data presentation. This guide explains how to modify existing formats or create custom ones to suit your needs.

For guidance on how to change the thousand separators format across your entire account, please refer to [this article](/set-default-number-format).

## Change number format

Number formatting controls how values are displayed, making them easier to read and interpret. Depending on the use case, numbers may be shown with decimal places, currency symbols, percentage signs, or unit abbreviations. Predefined formats cover many common needs, but custom formats allow for more flexibility in presenting data exactly as required.

To adjust the number format for a specific metric, follow these steps:

1. Open the relevant Databoard and click **Edit**.
2. Select the **visualization** where you want to modify the number format.
3. In the Datablock editor panel, click **Advanced metric settings** under the desired metric.
4. Adjust the **Format** as needed.
5. Click **Save** to apply the changes.


The sections below provide a detailed overview of all available format options, including descriptions and examples to help you choose the best format for your needs.

### Auto

Values are displayed with a flexible number of decimal places, ranging from none to three. As values approach zero or become large (starting from six digits and above), the format adjusts to show additional decimal places for better clarity.

When units are present, they are automatically placed before the value for clear representation.

**Examples:** `0.111`, `$ 2.22`, `33.3`, `444`, `£ 555,555.5`, `6,666,666.66`

### Prefixed Currency Symbols ($, £, €, A$)

Values are displayed with a variable number of decimal places, from zero to two. For values with four digits or fewer, two decimal places are always shown. As the value increases to five or more digits, the display may show one or two decimal places, depending on the size. All values are prefixed with the corresponding currency symbol for clear identification.

**Examples:** `$ 1,111.11`, `£ 22,222.2`, `€ 3,333,333.33`

####,###, #,###.0, $#,###.0, and $#,###.00

These formats present values with up to two decimal places. The inclusion of a dollar sign (`$`) is optional, depending on the format used. The number of decimal places remains consistent regardless of the value's size.

For more details on the parameters and their usage, refer to the [Custom Format](#custom-format) section that follows.

**Examples:** `1`, `22.2`, `$333.3`, `$4,444.44`

### Relative Time

This format shows the passage of time using the value as a reference point for measurement. It necessitates that values be provided in the format of a [UNIX timestamp](https://www.unixtimestamp.com/). The output typically consists of a number followed by a relative time descriptor, such as "hours ago" or "days ago."

**Examples:** `4 hours ago`, `33 days ago`, `2 months ago`, `1 year ago`.

### Duration

This format represents the total duration indicated by the value, which must be provided as the total number of seconds.

By default, the output shows **minutes and seconds**. For values greater than **3600 seconds**, hours are included, and for values exceeding **86400 seconds**, days are displayed as well.

**Examples:** `12m 34s`, `12h 34m 56s`, `12d 34h 56m 78s`

### Prefixed/Postfixed Unit

The unit symbol is placed **before or after** the number. Values are rounded to the nearest whole number, with no decimal places.

**Examples:** `$ 111`, `2222 £`

### Prefix/Postfix Currency

Values are displayed with **up to two decimal places**:

- For values with **four or fewer digits**, two decimal places are always shown.
- For values with **five or more digits**, the format adjusts to display one or two decimal places based on value size.


The currency symbol is placed **before or after** the number as needed.

**Examples:** `$ 1,111.11`, `22,222.2 £`, `€ 3,333,333.33`

### Postfixed %

Values are displayed with up to two decimal places. The format dynamically adjusts, showing more decimal places for values close to zero or when exceeding six digits for clarity.

The percentage sign (`%`) is added at the end without modifying the original value.

**Examples:** `0.11%`, `22.2%`, `333%`, `444,444.4%`, `5,555,555.55%`

### Percentage

Values are displayed with up to two decimal places, adjusting dynamically to provide additional precision for very small or large numbers (six digits and above).

Values are converted to percentages by multiplying by **100**, followed by appending the percentage sign (`%`).

**Examples:**

- `0.00123` → `1.23%`
- `0.222` → `22.2%`
- `3.33` → `333%`


### Custom Format

If none of the predefined options fit your needs, you can apply a custom format by following these steps:

1. Click the **Format** selector.
2. Select **+ Custom Format**.
3. Enter the desired format.
4. Click **Save** to apply the changes.


The following section provides an overview of the parameters available for creating a custom format:

- **`0`** – Ensures the digit is always displayed.
- **`#`** – Displays the digit only if it exists in the value.
- **`%`** – Converts the value to a percentage by multiplying it by 100 and appends a `%` symbol.
- **`◊`** – Adds a `%` symbol to the value without modifying the number.
- **`P[...]`** – Defines a custom duration format using time components separated by colons (`:`).
  - Available components: **days (`dd`), hours (`hh`), minutes (`mm`), and seconds (`ss`)**.
  - Components enclosed in square brackets (`[]`) will only be displayed if their values are greater than zero.


|  | **Value** | **Format** | **Output** |
|  --- | --- | --- | --- |
| 0 | 123.456 | 0.0 | 123.4 |
| 0 | 123.456 | 0.0000 | 123.4560 |
| # 
 | 12.34 | #.# | 12.3 |
| # 
 | 12.34 | # 
 | 12 |
| % | 0.12345 | 0.0% | 12.3% |
| % | 0.12345 | %0.00 | %12.34 |
| ◊ | 12.345 | ◊0.# | %12.3 |
| ◊ | 12.345 | 0.0000◊ | 12.3450% |
| P[...] | 12,345 | Pdd:hh:mm:ss | 0d 3h 25m 45s |
| P[...] | 12,345 | P[dd]:hh:ss | 3h 1545s |


Any character not listed above will be included as-is, allowing you to add context or clarification to the value displayed in the visualization.

## Change number scale

Scaling helps simplify large numbers by reducing them to a more readable form. Instead of displaying full values, numbers can be shortened using thousands (k), millions (M), or billions (B). This makes comparisons easier and prevents unnecessary complexity in reports or visualizations. When needed, scaling can be adjusted or disabled to match the preferred level of detail.

To adjust the number scale for a specific metric, follow these steps:

1. Open the relevant Databoard and click **Edit**.
2. Select the **visualization** where you want to modify the number format.
3. In the Datablock editor panel, click **Advanced metric settings** under the desired metric.
4. Adjust the **Scale** as needed.
5. Click **Save** to apply the changes.


### Auto scale

Automatically scales numbers based on their value. Numbers are adjusted so that the integer part has at most three digits.

Examples: `1.11k`, `22.22M`, `333.33B`

### None

Disables scaling, displaying numbers in full based on the specified format settings.

### Thousand, Million, and Billion

The value is divided by 1,000 (k), 1,000,000 (M), or 1,000,000,000 (B), and the corresponding suffix is added.

Examples: `1.11k`, `22.2M`, `333B`

No, unit symbols cannot be added to custom formats at this time.

 

Ask Genie
Get instant answers or help with your data using the in-app AI assistant.

Talk to an expert
For customers: Get help with your setup, strategy, or making the most of Databox.

Book a demo
New to Databox? See how it works and get guidance on getting started.

Send an email
Reach out to support for help with your account, data, or technical issues.