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:
- Start SuperADMIN.
- Log in as an administrator user.
displayoptionscommand to set the display precision for your chosen summation option:
<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:
Repeat for any other summation options that you want to change.
Check Existing Settings
You can check the existing settings for a dataset using the following command:
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:
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:
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:
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.
Whether to use the
This setting defaults to
Whether to use the
This setting defaults to
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:
- If the cell is a derivation, any custom precision set for it will take precedence over any other settings.
- If the above does not apply, SuperWEB2 will use the custom precision saved in the TXD in SuperCROSS.
- If neither of the above apply, SuperWEB2 will apply the
displayoptionsprecision for the selected summation option.
- If none of the above apply, then SuperWEB2 uses the global
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
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.