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.

Metric Format

Then apply formatting syntax in the custom number formats field.



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:


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


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


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


Large numbers

This shortens large numbers and makes them easier to read – for example, 4.6B5.8M, 145.4K . Numbers below one thousand are shown as exact integers.

General purpose large number:



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.

[>=3600]{{{3600||#}}}h {{{60|60|00}}}:{{{|60|00}}};


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:


One decimal percentages:


Two decimals percentages:



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:


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


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.


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


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%.

[>0.1]Over ten percent;
[>0.05]Over five percent;
Under 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).

[>3600]Over one hour;
[>60]Over one minute;
Under one minute

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

Formatting Numbers in Reports

Conditional Number Formatting

Rate this page:

Need some help?

We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd by visiting Twilio's Stack Overflow Collective or browsing the Twilio tag on Stack Overflow.

Thank you for your feedback!

Please select the reason(s) for your feedback. The additional information you provide helps us improve our documentation:

Sending your feedback...
🎉 Thank you for your feedback!
Something went wrong. Please try again.

Thanks for your feedback!