# Format Metrics in Flex Insights Reports

Use the Number format editor to configure how numbers appear in your reports. You can round numbers, accommodate regional settings, add currency symbols, adjust colors, or append numbers with sets of characters.

## Access the number format editor

To access the Number format editor, click Edit in the Detail column of a metric.

Then apply formatting syntax in the custom number formats field.

## Samples

You can use built-in templates for number formatting, or any of the examples below by copy-pasting this sample code directly into your number format editor:

Raw integer number:

`_100`

Natural integer with thousand separators such as `1,234` or `12,345,678` :

`_10# ,##0`

One decimal number with thousand separators (`1,234.5`):

`_10# ,##0.0`

Two decimal number with thousand separators (`1,234.56`):

`_10# ,##0.00`

## Large numbers

This shortens large numbers and makes them easier to read - for example, `4.6B``5.8M`, `145.4K` . Numbers below one thousand are shown as exact integers.

General purpose large number:

`_10[>=1000000000]#,,,.0B;_10[>=1000000]#,,.0M;_10[>=1000]#,.0K;_10[>=0]#,##0;_10[<=-1000000000]-#,,,.0B;_10[<=-1000000]-#,,.0M;_10[<=-1000]-#,.0K;_10[<0]-#,##0`

## Duration

Duration format will take a number (in seconds) and show it in hours, minutes and seconds.
Duration in hours will look like `1h 23:45` or `12:34` when shorter than one hour.

`_10[>=3600]{{{3600||#}}}h {{{60|60|00}}}:{{{|60|00}}};_10[>=0]{{{60|60|00}}}:{{{|60|00}}};_10[<0]-{{{60|60|00}}}:{{{|60|00}}};`

## Percentages

Percentages convert numbers in the range `0.0` to `1.0` into the more natural percentage format `0%` to `100%` . Use the below samples for the format you need.

Integer percentages:

`_100%`

One decimal percentages:

`_100.0%`

Two decimals percentages:

`_100.00%`

## Colors

You can use web colors to change the text and background color in your Flex Insights tables. You can use HTML color codes to adjust your colors.

You may wish to use the same color with the same measure to help your users quickly orient in a table. You can also combine colors with conditional formatting to change color depending on the value of a measure.

The example below shows how to set the same color for the measure text, in any situation:

`_10[color=fecdd2]0;`

The example below shows how to change the background cell color of a measure.

`_10[backgroundcolor=fecdd2][color=b71c1c]0;`

## Conditional formatting

You can show different number formats depending on the value of the measure. This allows you to easily show positive/negative number differently or handle special cases.

To format numbers, set your conditions in square brackets followed by the format and separated by a semicolon from the next format. The first condition that matches will be used. We recommend that you include a default value at the very end.

The following example shows how to display dash when there is no value for the metric.

`_10[=null]—;_100`

The example below shows that you can use custom text instead of the original value like the "zero" in the example below.

`_10[=null]—;_10[>0]0;_10[=0]zero;_10(0)`

When you use conditions for percentage measures such as `Abandoned Conversations %` or `Silence %`, use decimal numbers instead of percents, e.g., use 0 instead of 0% and 1 instead of 100%. The example below shows a condition for more than 10% and more than 5%.

`_10[>0.1]Over ten percent;_10[>0.05]Over five percent;_10Under five percent`

When you use conditions for duration measures such as `Talk Time` or `Activity Time`, use seconds in the conditions.

The example below shows a condition for one hour (3600 seconds) and a condition for one minute (60 seconds).

`_10[>3600]Over one hour;_10[>60]Over one minute;_10Under one minute`

For more advanced number formatting techniques, please see the following articles:

Formatting Numbers in Reports

Conditional Number Formatting