Rounding Rules for Cognos

Did you know that rounding in Cognos does not behave in the usual manner? By default, IBM Cognos Business Intelligence uses the round half to even rule when rounding numbers. 

What is Round Half to Even Rule? 

This rounds to the nearest value; if the number falls midway it is rounded to the nearest value with an even (or zero) least significant bit, which occurs 50% of the time. For example: 

Original Number 

Traditional Rounding 

Rounded to 0 decimal places 

+11.5 

+12 

+12 

+12.5 

+13 

+12 

-11.5 

-12 

-12 

-12.5 

-13 

-12 

The round half to even rule is widely used in bookkeeping. Furthermore over a large dataset this style of rounding reduces rounding errors. 

Other Rounding Rules 

There are many different rounding rules. Each has their purpose. The table below summarises the key rounding rules: 

Rule 

Description 

Examples 

   

-12.5 

-11.5 

11.5 

12.5 

  

halfEven 

Round to nearest neighbor, where an equidistant value is rounded to the nearest even neighbor. This is the default rule. 

-12 

-12 

12 

12 

halfDown 

Round to nearest neighbor, where an equidistant value is rounded down. 

-13 

-12 

11 

12 

halfUp 

Round to nearest neighbor, where an equidistant value is rounded up. 

-12 

-11 

12 

13 

ceiling 

Round to a more positive number. 

-12 

-11 

12 

13 

floor 

Round to a more negative number. 

-13 

-12 

11 

12 

down 

Round towards zero. 

-12 

-11 

11 

12 

up 

Round away from zero. 

-13 

-12 

12 

13 

Changing Rounding Rules 

While Cognos uses the halfEven rule, precision regulations in some industries require different rounding rules (for example, the round half up rule). With IBM Cognos Business Intelligence 10.2 and above, you can now choose a rounding rule to comply with the precision regulations that apply to you. 

To do this follow these steps:

Launch IBM Cognos Administration
On the Status tab, click System
In the upper left corner of the Scorecard pane, click the arrow to view the Change view menu, point to Services and then click Batch Report
Click the arrow next BatchReportService, and then click Set properties
Click the Settings tab
Click Edit next to Advanced Settings
Select Override the settings acquired from the parent entry
In the Parameter column, type RSVP.RENDER.ROUNDING
In the Value column, type one of the values from the above table
Click OK
On the Set properties page, click OK
Repeat the same steps for Report service

Note that rounding rules can only be applied to an entire server and you cannot override for a package, cube or report. If you want to change towards a more “traditional” rounding then you need to set “halfup”.