Using Dimensional Calculations
You build calculations in the expression editor using functions.
If a calculation is used in multiple reports, or by different report authors, ask your modeler to create the calculation as a standalone object in the model and include it in the relevant package.
There are two main calculation types in IBM® Cognos® Analytics - Reporting: simple calculations and query calculations. The following list highlights key differences between them:
-
Simple calculations use Report Studio built-in logic, in which Cognos assumes the data type of the resulting column based on the types from the input columns and the operation type. As a result, even if the object is not yet calculated, it includes extra XML attributes, such as rs_dataType, which help Cognos understand how to treat the entire column.
-
Query calculations do not contain any extra parameters. When you create them manually, the data exists in the query and is evaluated only after you run the report. The result is calculated when a request is sent to the server, for example: during report execution, when you switch to the Preview mode, or when you change the calculation in the Preview mode. Because of that behavior, inserting a query calculation in the Preview mode might produce the same result as a query that is inserted from the toolbar.