Calculated members in reports

For most reports, IBM® Cognos® Dynamic Cubes calculated members are used the same way as regular members. However, because of some different constraints and capabilities, the report user may encounter unexpected results. In these cases, you must consider the required type and behavior of the members to obtain the desired output. In reporting environments, calculated members appear to be identical to regular members. It is a good practice to use a naming convention so that report users can easily identify calculated members.

The values of calculated members and measures are not retained within a dynamic cube. The values are computed at every occurrence within reports and analyses when executed.

You create Cognos Dynamic Cubes calculated members manually. Cognos Dynamic Cubes relative time calculated members are specialized calculated members automatically added to a relative time hierarchy and cannot be modified.

Calculated members that you manually create have the following characteristics:
  • Each occurrence of a single calculated member in a report or analysis is considered unique. (SET operations, Filtering calculated members)
  • They do not have siblings or children.
  • They should not be nested.
  • Their rank value in IBM Cognos Analysis Studio is always Null.

Relative time calculated members

The relative time feature generates three types of calculated members.

The Period to Date Change and Period to Date Growth relative time calculated members share the following characteristics with Cognos Dynamic Cubes calculated members.
  • Each occurrence of a single calculated member in a report or analysis is considered unique. (SET operations, Filtering calculated members)
  • They do not have siblings or children.
  • They should not be nested
  • Their rank value in IBM Cognos Analysis Studio is always Null.
The Current Period, Prior Period, Current Period to Date and Prior Period to Date members may have children. Therefore, the functions CHILDREN, DESCENDANT, FIRSTCHILD and LASTCHILD can return results. These relative time calculated members share the following characteristics with Cognos Dynamic Cubes calculated members:
  • Each occurrence of a single calculated member in a report or analysis is considered unique. (SET operations, Filtering calculated members)
  • They should not be nested
  • Their rank value in IBM Cognos Analysis Studio is always Null.

Reference relative time members refer to other members within the time hierarchy and have the same caption and member key values as the members to which they refer. Within the context of other reference members, these members behave the same as Cognos Dynamic Cubes calculated members. Unlike Cognos Dynamic Cubes calculated members, these members are not considered unique, they can have children and they can be nested. Reference members at the same level are siblings of other reference members. When applied to a reference member, functions such as FIRSTSIBLING or NEXTMEMBER will return a reference member. Their rank value in IBM Cognos Analysis Studio is always Null.

SET operations

Because a calculated member is considered to be unique from all other calculated members, the UNION, EXCEPT, UNIQUE, and INTERSECT functions may give results that appear incorrect.

In the following examples, [USA] and [Canada] are regular members and [CM1] and [CM2] are calculated members.

Table 1. Examples of SET operations with calculated members
Example Result Set

UNION

( SET( [USA], [CM1], [CM2] ),

SET( [USA], [Canada], [CM1] )

SET

( [USA], [CM1], [CM2], [Canada], [CM1] )

The member [CM1] appears twice in the result.

EXCEPT

( SET( [USA], [CM1], [CM2] ),

SET( [USA], [Canada], [CM1] )

SET

( [CM1], [CM2], [Canada], [CM1] )

The member [USA] is removed, but the member [CM1] appears twice in the result.

UNIQUE

( SET( [USA], [CM1], [USA], [CM1], [Canada] )

SET ( [USA], [CM1], [CM1], [Canada] )

The member [CM1] appears twice in the result.

INTERSECT

( SET( [USA], [CM1], [CM2] ),

SET( [USA], [Canada], [CM1] )

SET( [USA] )

Calculated members do not appear in the intersection of two sets.

Filtering calculated members

Since calculated members are considered to be unique from all other calculated members, a filter will not remove the members.

If a report contains a filter based on IBM Cognos Dynamic Cubes calculated members and the same hierarchy is visible in the report, the data values in the report will be correct. However, the filter will not remove visible members from the report. If the same hierarchy is not visible in the report, the report output will be as expected.

Nesting calculated members

IBM Cognos Dynamic Cubes calculated members should not be nested. Because all calculated members are considered unique, the dynamic query mode query planner resolves the intersection to an empty set. The rows remain in the reports but the values are Null.

Calculated members siblings and children

IBM Cognos Dynamic Cubes calculated members do not have siblings or children. Functions that require a member sibling or child as a result will always be Null.

  • NEXTMEMBER( [CM1] ) = NULL
  • PREVMEMBER( [CM2] ) = NULL
  • LEAD( [CM1], 0 ) = NULL
  • LAG( ( [CM2], 0 ) = NULL

Cognos Analysis Studio rank

In IBM Cognos Analysis Studio, the rank of an IBM Cognos Dynamic Cubes calculated member is always Null. The context in which the rank is computed and the context used to compute the values visible in the cross tab are not the same. Because, the computed rank values could contradict the visible values, the rank is always set to Null.