Number Formatting in Analytics
  • 02 May 2024
  • 2 Minutes to read
  • Contributors

Number Formatting in Analytics


Article Summary

Learn how you can configure decimal precision for numbers shown in Analyses

Availability

This feature is available with the Universal Template in release r279 or later. To use number formatting with other templates, consider migrating your analysis to the Universal Template.

Overview

In the Analytics Editor, number formatting lets you control the decimal precision for visualizing data values. You can configure this for each numeric field by opening the Data panel on the right side and clicking the (123) button next to the field.

image.png

Number formatting is supported by all display types of the Universal Template, except the Slideshow.

Example

Below you can see an example how number formatting can be changed from the default to a customized state in a table visualization.

Example Number
0.1
0.12345
0.123456789
0.123456789123456789

Numer formatting example.gif

Default formatting

By default, Tulip is displaying each value with it's own number of decimal places. This number depends on the decimal places that were recorded when the value was stored into Tulip as well as the absolute size of the value.

Customization

You can customize the number of decimal places through the Number formatting dialog:

  • Clicking first on the left arrow button sets the display to 2 decimal places.
  • Clicking first on the right arrow button sets it to 3 decimal places.
  • Further clicks on the left or right arrows decrease or increase the decimal places displayed, respectively, between 0 and 15.

Numbers are rounded up if the next digit is 5 or higher, and down otherwise.

Number formatting can be reset to the default by clicking the Reset button.

Once configuration is complete, the Number formatting dialog can be closed with the Close button or by clicking anywhere outside of it.

If the same field from the query result is used multiple times in a visualization, e.g. for the y axis and the compare by in a bar chart, the formatting settings are shared among those uses.

Scope for number formatting

Number formatting is only applied to how numbers are shown in text form, e.g. in:

  • Tables
  • Single value and gauge visualizations
  • Tooltips
  • Axis labels
  • Legends

This does not affect how data is evaluated in calculations (e.g. for layers) or shown in visual representations (e.g. bar sizes).

To change the precision of numbers for visualization and calculations, use the ROUND function in an expression in the query on the left.


Was this article helpful?