Custom value formatting lets you specify how dimension, metric, and calculated field values appear in charts without sending additional SQL queries to your database. Custom value formatting also includes the option for report creators and editors to specify a value format using Google Sheets style formats.
Custom value formatting can be helpful in these use cases:
- You want to quickly change how dates and number values are displayed in charts and tooltips.
- You need to display values in a specific way that will not be satisfied by changing the data type.
- You want to provide additional context to report viewers about values in charts and tooltips.
For example, you can choose to display large values as exponents and append text to the values. The following column chart displays Population grouped by Country. You can use custom formatting to display the large values as exponents with the text "People" appended to provide additional context to report viewers.
This page provides an overview of custom value formatting. It includes the following sections:
- Requirements
- Add or edit chart-specific custom value formatting
- Things to know about custom value formatting
- Related resources
Requirements
If you want to use custom value formatting for charts, these requirements must be met:
- The Field Editing in Reports setting must be enabled in the data source.
- You must have edit rights to a report.
- A dimension, metric, or calculated field must be a Numeric or Date & Time data type.
Add or edit chart-specific custom value formatting
You can apply custom value formatting to dimensions, metrics, or calculated fields.
Add or edit chart-specific custom value formatting for dimensions and metrics
To add value formatting to dimension or metric values on a chart, follow these steps:
- Create or edit your report.
- Add a new chart or select an existing chart.
- In the Setup tab of the Properties panel, click a field's data type icon to open the field's edit menu.
- Choose a value format option in the Display Format drop-down menu. If you'd like to specify a custom format, choose Custom value format to open the Custom number format menu.
- Enter a custom value format using Google Sheets style notation in the Custom number format text field, or select a value format option.
A preview of the value format will be displayed under the Custom number format text field.
- Once you have selected or entered the desired format, click Apply.
- Click outside of the field's edit menu and return to the chart Setup properties.
Repeat steps 3-7 to edit a field's custom value formatting.
Add or edit chart-specific custom value formatting for calculated fields
To add custom value formatting to calculated field values on a chart, follow these steps:
- Create or edit your report.
- Add a new chart or select an existing chart.
- In the Setup tab of the Properties panel, create a calculated field. Alternatively, edit an existing calculated field by hovering over the calculated field name and clicking field's data type icon.
If you create a new dimension type calculated field, click Apply after you enter the desired expression. The calculated field editor will not detect the field type until you click Apply,
- Choose a value format option in the Display Format drop-down menu. If you'd like to specify a custom format, choose Custom value format to open the Custom number format menu.
- Enter a custom value format using Google Sheets style notation in the Custom number format text field, or select a value format option.
A preview of the value format will display under the Custom number format text field.
- Once you have selected or entered the desired format, click Apply.
- Click outside of the calculated field's edit menu and return to the chart Setup properties.
Repeat steps 3-7 to edit a calculated field's custom value formatting.
Things to know about custom value formatting
- Custom formatting that is applied to chart values will be disabled when the Compact numbers setting is enabled. The Compact numbers setting is available when the Show data labels option is enabled on the Style tab of a chart's Properties panel.
Similarly, the Compact numbers setting will be disabled if custom formatting is applied to chart values.
-
Chart-specific value formatting will only exist in the chart in which it is applied. You can't directly reuse chart-specific value formatting.
However, you can copy a chart that uses custom value formatting. The copy will contain any custom value formatting defined in the original.