TIBCO Cloud™ Spotfire® Web Client User Guide

Changing the formatting of a column

The formatting of a column defines how the data in the column will be presented. For example, depending on how you format a date column, the dates therein can be shown as "01/12/2022" or "January 12th, 2022". When you define formatting at the column level (in the Data in analysis flyout), this is the default formatting that will be used at all places where the column content is shown.

Before you begin

You must have some data loaded in the analysis, and the analysis must be in Editing mode.

About this task

Note: You can also specify formatting on an axis in a certain visualization using the visualization Properties or using short-cuts accessed by clicking or right-clicking on the axis. In those cases, the formatting changes only apply to this particular axis. The types of formatting available are the same as when changing the formatting on the column.
Tip: In the Data in analysis flyout, you can also right-click the column of interest and select Formatting from the pop-up menu.

Procedure

  1. On the authoring bar, click Data in analysis and click on the column of interest.
  2. In the expanded flyout, make sure that Details on selected column is selected.
  3. In the expanded flyout, locate the Formatting section and either change the formatting to a different type directly from the drop-down list or click SettingsSettings button., and make further modifications in the Formatting settings dialog as described below.
  4. In the Formatting settings dialog, click the tab of interest.
    Depending on the data type, you will have access to different tabs and settings in the dialog. Numeric columns have more options to choose from than other types of columns. The Custom format allows you to specify your own format, if what you are looking for is unavailable in the predefined formats.
  5. Select the formatting you want to use from the controls in the dialog, or, define a custom formatting.
    Alternatively, you can also Copy formatting settings from another column in the analysis, by expanding the section at the bottom of the dialog and choosing a column to copy formatting from.
    A sample of the selected format is automatically shown in the dialog when you apply an update.
  6. When you are done, click OK.

Results

When you have defined formatting at the column level, this is the default formatting that will be used at all places where the column content is shown.

Example: Changing the number of decimals

If your data contains measures with many decimals, like the values below, but you are interested in displaying integers only, you can change the default formatting so no decimals are shown.

Data table example with lots of decimals.

Show the Formatting settings dialog from the expanded Data in analysis flyout by clicking Settings Settings button..


Formatting section in expanded data panel.

Then change the number of decimals to zero.


Formatting settings, zero decimals.

The visualization now shows the values without any decimals:

Data table example, no decimals.

Example: Defining a custom format for a date column

With custom formatting you can specify exactly how you want a value to be presented. This example shows how you can define a custom format for a date column.

Which predefined formats are available for a date or time column depends on the language setting on your computer.


Date column, default format.

If you want to define your own format, in the Formatting settings dialog, click Custom and type the format string that specifies your format. In this example, a short format of the month name is shown, together with the day, expressed as a number, and short year: MMM d -yy. See Custom formatting of date and time columns for more details about custom formats.


Formatting settings, custom format string.

Click OK and see the result in the visualization:


Date column, custom format.