Insert a Query Calculation
When working with dimensional data, insert a query calculation into your report to add a new row or column with values that are based on a calculation. For example, you create a query calculation named Euros that converts dollars to euros by multiplying an existing dollar measure by a conversion rate. Euros can then be displayed to end users in a separate row or column.
In IBM® Cognos® Analytics - Reporting you can create the following types of calculations:
- Create calculated members or calculated measures where the expression is a member or a tuple-based (as opposed to property-based) value expression. For example,
[2013] - [2012]
is a calculated member and[Revenue] - [Planned Revenue]
is a calculated measure. - Use set expressions to create calculated sets of members. For example,
children ([2012])
is a set expression that displays the child members of 2012.You must base each set expression on a hierarchy and the set expression must contain only members from this hierarchy.
- Create value expressions when you want to insert a string, number, date, or interval value.
You can also create a calculation that uses an intersection (tuple) that you already defined.
If you are using an IBM Db2 data
source, the subtract operator is invalid if you combine the datatypes timestamp2
and packed decimal
.
When creating an expression that will be used in a double-byte environment, such as Japanese, the only special characters that will work are ASCII-7 and ~ -- || - $ ¢ £ ¬.