Skip to end of metadata
Go to start of metadata

By default, SuperWEB2 displays values in tables as whole numbers (0 decimal places).

The display precision is determined by the value of the dataprecision parameter in the CubeCatalog.xml configuration file. Changing this parameter will change the number of decimal places used globally for table display throughout SuperWEB2.

It is also possible to override the display precision for individual summation options.

For example, for the sample Retail Banking dataset you might want to display values for the Mean of Customer Profit to 2 decimal places, while continuing to show the other summation options with 0 decimal places.

Default Behaviour (Mean of Customer Profit and count of Customers both have 0 decimal places):

Precision Overriden (Mean of Customer Profit has 2 decimal places, but count of Customers still has 0 decimal places):

Step 1 - Set Precision in SuperADMIN

To set the precision for an individual summation option, you need to configure the displayoptions in SuperADMIN:

  1. Start SuperADMIN.
  2. Log in as an administrator user.
  3. Use the displayoptions command to set the display precision for your chosen summation option:

    displayoptions <dataset> <summation> set|clear numberOfDecimalPlaces <value>

    Where:

    • <dataset> is the dataset ID.

    • <summation> is the summation option to set the precision of.

    • <value> is the number of decimal places you want to show for this summation option.

    For example, to set the display precision to two decimal places for the Customer Profit summation option in the Retail Banking dataset (id: bank), use the following command:

    > displayoptions bank "Customer Profit" set numberOfDecimalPlaces 2
    Customer Profit:
        numberOfDecimalPlaces: 2
  4. Repeat for any other summation options that you want to change.

The precision settings defined in SuperADMIN only apply to SuperWEB2. They are not recognised by SuperCROSS or SuperVIEW.

Any changes you make to the displayoptions setting in SuperADMIN will not be applied immediately to any users who are currently logged in and have the dataset open. The changes will apply when the users return to the dataset catalogue and reselect the dataset (or log out and log back in to SuperWEB2).

Check Existing Settings

You can check the existing settings for a dataset using the following command:

displayoptions <dataset>

For example:

> displayoptions bank
Customer Profit:
    No display options configured.
Account Profit:
    No display options configured.
Average Account Balance:
    No display options configured.

Use Wildcards

You can use wildcards to check and set multiple summation options. Use . to match a single character, and .* to match one or more characters. For example:

> displayoptions bank .*Profit set numberOfDecimalPlaces 2
Customer Profit:
    numberOfDecimalPlaces: 2
Account Profit:
    numberOfDecimalPlaces: 2

> displayoptions bank .* set numberOfDecimalPlaces 3
Customer Profit:
    numberOfDecimalPlaces: 3
Account Profit:
    numberOfDecimalPlaces: 3
Average Account Balance:
    numberOfDecimalPlaces: 3

Escape Any Special Characters

When setting or checking the display precision settings, you must use the display name of the summation option. If the name includes any of the following special characters, then you need to escape them by using a \ before the special character:

'"<>{}[]()$*:?/|

For example, if the display name of the summation option is "Total trip spend ($000)", you would write this as follows:

displayoptions MyDatasetID "Total trip spend \(\$000\)" set numberOfDecimalPlaces 0

Step 2 - Check the CubeCatalog Settings

You should also check the settings in <tomcat_home>\webapps\webapi\WEB-INF\data\repository\CubeCatalog.xml. These settings determine whether the displayoptions settings are used for table display and download.

Open the file in a text editor, and check the following parameters:

ParameterConfiguration
dataprecision

The number of decimal places used globally to display tables in SuperWEB2 (this setting applies to table display in SuperWEB2 only; it does not affect the precision used in downloads).

This level of precision will be used for all tables unless it has been overridden for the specific summation option.

useSummationPrecisionOnTableView

Whether to use the displayoptions settings for table display:

true
Use the precision configured for the individual summation option in the SuperADMIN displayoptions. If there is no specific precision configured for the summation option, SuperWEB2 will use the precision from the CubeCatalog.xml dataprecision setting.
false
Always use the precision set in the CubeCatalog.xml dataprecision, regardless of any SuperADMIN configuration.

This setting defaults to true if the parameter is not specified.

useSummationPrecisionOnDownload

Whether to use the displayoptions settings for table downloads:

true
Use the precision configured for the individual summation option in the SuperADMIN displayoptions. If there is no specific precision configured for the summation option, table downloads will use up to 7 decimal places.
false
Always use up to 7 decimal places regardless of any SuperADMIN configuration.

This setting defaults to true if the parameter is not specified.

If you are using Job Queue Manager, then this has its own CubeCatalog.xml configuration file. You will also need to set the value of useSummationPrecisionOnDownload in <tomcat_home>\webapps\queuedjobservice\WEB-INF\data\.repository\CubeCatalog.xml on the machine running Job Queue Manager. Job Queue Manager will use the setting from its own configuration file, not the setting from the SuperWEB2 configuration file.

If you make any changes to the settings in CubeCatalog.xml, then you will need to restart Tomcat or the SuperWEB2 service for the changes to take effect.

Number Precision in Saved System TXDs and SuperWEB2 Derivations

In some cases, it is possible to override the precision settings for particular cells or entire tables:

  • If you create tables in SuperCROSS and add them to SuperWEB2 as saved system tables, then some of the decimal place settings from the saved table will override SuperWEB2's precision settings. For example, you may have created derivations that have their own specific precision setting, or specified a custom precision for the entire table.
  • It is also possible to create derivations in SuperWEB2. In the Advanced settings of the Define Derivation dialog, you can set a custom number of decimal places for these derivations.

SuperWEB2 uses the following order of precedence when determining the number precision for each cell:

  1. If the cell is a derivation, any custom precision set for it will take precedence over any other settings.
  2. If the above does not apply, SuperWEB2 will use the custom precision saved in the TXD in SuperCROSS.
  3. If neither of the above apply, SuperWEB2 will apply the displayoptions precision for the selected summation option.
  4. If none of the above apply, then SuperWEB2 uses the global dataprecision setting.

Disable Number Formatting for Downloads (Performance Improvement)

If your users are working with very large tables (tables containing millions of cells) then it can take several minutes to process them when downloading the table. It is possible to dramatically increase the performance of the download process by disabling number formatting in downloads.

If you are happy to have no number formatting applied to your downloads, you can achieve this performance improvement by setting download.formatNumbers to false in the configuration.properties file. See configuration.properties for more details.

Precision at the SuperSERVER Level

Please note that precision may also have been applied at the SuperSERVER level (for example using a Data Control module).

If you configure the precision in SuperWEB2 to a greater number of decimal places than are being provided by the server, then although your chosen number of decimal places will display in SuperWEB2, your values will only be correct to the level of provision provided by the server.

For example, if the server is providing values to 1 decimal place, and you set the SuperWEB2 dataprecision to 2, then SuperWEB2 will display values with 2 decimal places, but they will only be correct to 1 decimal place.