IBM Support

Report using number format with decimal places displays different values in HTML and Excel

Troubleshooting


Problem

Report contains a list with totals.  Values and totals formatted as numbers (or currency) with scale -6 and number of decimal places 1. 
image-20230915122317-1
Output is different between HTML and Excel:
image-20230915122404-2

Cause

Cognos analytics, by default, uses halfEven rounding rules. Microsoft Excel uses different rounding rules, which explains the difference between HTML/PDF and Excel outputs.

Resolving The Problem

You can can change the rounding rule to match Excel:   https://www.ibm.com/support/pages/how-set-server-rounding-rules-data-formatting
You can also ensure that any rounding is done before data formatting has been applied - for example, at the query/data item level. This would ensure that the data that is provided to Excel is already rounded. Otherwise, you are relying on how Excel wants to round numbers.

Document Location

Worldwide

[{"Type":"MASTER","Line of Business":{"code":"LOB10","label":"Data and AI"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSTSF6","label":"IBM Cognos Analytics"},"ARM Category":[{"code":"a8m500000008d78AAA","label":"Reporting"}],"ARM Case Number":"TS011886421","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions"}]

Document Information

Modified date:
15 September 2023

UID

ibm17033069