Formatting details
Formatting is used for things like specifying the number of decimals to show, to determine how to present dates or times, or to give a value meaning by adding units of measurements, thousands and decimal separators, and so on. Locale settings, determined by Windows Regional Settings, are often used to determine the formatting, but you can also make certain changes yourself.
Example: If you are running the installed client with data values listed in US currency, you have Windows Regional Settings set to Swedish and you select to show thousands separators, you will get formatted values such as $1.000.000,00. If you change your locale settings to US English, the value will be re-formatted into $1,000,000.00.
The available formatting options depend on the data type of the value. Text cannot be formatted at all, while an integer has several different possibilities. An integer can, among other things, be formatted as a number, a currency, and as a percentage. You can specify the number of decimals to show, or whether to use a thousands separator. Another possibility is to use short number format, which is a way to shorten values to take up less space by replacing powers of tens with symbols. See Defining a new short number format to learn more. You can apply formatting to your data on different levels and you can access the settings in different ways as described below.
Default axis formatting
In the installed client, you can use the Options dialog to specify default formatting for different data types on the visualization axes. For example, if you specify the data type integer to be formatted as US currency ($) with two decimals, then each time you create a new visualization, values on an axis with integers will be shown as US currency with two decimals. Note that these default formatting settings do not affect the columns or the data tables in any way, only the axes in the visualizations.
To reach the default settings, select Axis formatting page in the dialog.
on the menu bar, and go to theColumn formatting
If you want a specific column in a data table to be formatted in a certain way throughout the analysis, you can format values on a column level. For example, if you format a column called "Cost" as US currency ($) with two decimals, the values in the column "Cost" will be displayed as US currency with two decimals every time that column is used. These settings affect all the places where the column is used in the analysis, including axes in visualizations, filters, tooltips, etc., and changes take effect immediately. Column formatting overrides formatting on default axis formatting level.
To change formatting settings on column level, see Changing the formatting of a column.
Formatting in visualizations
You can also format values in individual visualizations. For example, if you format the values on the X-axis of a scatter plot as Number with no decimals, the values on the X-axis in that scatter plot will be instantly updated with the new formatting settings. The Y-axis in the scatter plot will not be affected by the new settings, and no other visualizations in the analysis will adopt the changes. Formatting on this level overrides settings on both the default axis level and on the column level. You can define formatting settings on the axes in many of the visualizations, but not all. Formatting on visualization level is similar in all kinds of visualizations, but the cross table differs slightly and is described in Formatting in the Cross Table in the Spotfire Analyst User Guide.
To change formatting settings on the visualization level, use the Visualization properties for the axis of interest.
If you use more than one scale in a visualization, you can format each of the scales individually, the same way you format an axis in a visualization. However, if there is more than one scale on the same side of an axis in a visualization, you cannot format the scales on that side separately by right-clicking directly on the scale. This will instead change the settings for all scales. However, you can still format the scales separately from the Visualization properties.
No matter on which level you change the format, the options are the same. See the table below to get a full description of all possible options. Some of the options listed are subcategories of other options.
Option | Description |
---|---|
Boolean | A format used to show boolean data. |
Currency | A number format for currencies. A currency
culture can be other than the current culture. In that case, number formatting
is done according to the current culture, but the currency symbol and pattern
is defined by the specified currency culture.
Examples: $ 1234.45 ¥1,234 -1,234.45 kr ($ 1,234.45) |
Custom | A highly configurable format, which supports
custom format specifiers.
Examples: (1.234E+099) 999,999.00 Dollars "d" Short date pattern "T" Long time pattern "G" General date/time pattern Read more about custom formats for numeric columns, date and time columns and timespan columns on their respective pages. |
Date | A format used to show dates. |
DatePart | Specifies that the column contains a date part and allows you to show the date part value as a string instead of a number, where applicable. |
Decimals | Specifies the number of decimals (0-15) to
show. An additional alternative (Auto) is also available. If you select (Auto),
the number of decimals will be different from one number to another since
trailing zeros will not be included.
Examples: 1,234.560700 (six decimals) 1,234.560 (three decimals) 1,234.56 (two decimals) 1,234.5607 (Auto) |
General | A general, non-configurable format, with a variable number
of decimals and no thousands separator. The number is converted to the most
compact of either fixed-point or scientific notation. A minus sign is always
used for negative values.
Examples: 1 12345 1.23456E-6 -12345 |
Negative numbers | Specifies the pattern used for showing
negative numbers [-1.23 or (1.23)].
Note: The negative number format setting in Windows Regional
Settings is ignored.
|
Number | A configurable number format.
Examples: 1234.45 1,234.45 -1,234.45 (1,234.45) |
Percentage | A percentage number format, where percentage symbol and
format pattern is culture specific. The converted number is multiplied by 100
to be presented as percentage. A minus sign is always used for negative values.
Examples: 100 % - 99 % |
Scientific | A number format for scientific notation with a fixed number
of decimals. A minus sign is always used for negative values.
Examples: 1.00000E+099 5.6E-001 -5.6E-001 |
Time | A format used to show times. |
TimeSpan | A format used to show time spans. |
Type | Specifies the form on which values should be shown from a
predefined list. What you see in the list depends on the data type and the
locale.
Examples:
|
Use engineering notation | Use this option to write the scientific number format with
the exponent of 10 always expressed as a multiple of three.
Examples: -12.35E+003 12.35E+006 |
Use short number format | Use this option to shorten numerical values, to take up less space. For example, 1,000 can be formatted to 1k. Select which symbol set to use from the drop-down list. To learn more about symbol sets, see Defining a new short number format. |
Use thousands separator | Specifies whether to use a thousands separator (digit grouping symbol in Windows Regional Settings) or not. The grouping symbol cannot be explicitly specified (only through Windows Regional Settings). |
- Defining a new short number format
If the values on an axis or a column are numerical, you can choose to display them in short number format. This means that values with many digits can be shortened to take up less space. For example, by using short number format you can set the number 1,000 to be shown as 1k. A standard symbol set is already defined and available to use. The defined symbols in the standard symbol set are M for 10^6, and k for 10^3. You cannot delete or change the standard symbol set. However, you can add your own symbol sets and define symbols of your choice in the installed client.