Create an Item-Based Calculation

You can create a calculation if you need a comparison or ratio that does not exist in the data source, such as actual revenue as a percentage of planned revenue, or the average revenue per employee. The calculations available depend on how many columns or rows you select.

Calculation results are not stored in the underlying data source. Instead, IBM® Cognos® Analysis Studio reruns the calculation each time you view the analysis. The results are always based on the most current data in the data source.

An item-based calculation that you create has no inherent aggregation rule. Because sum is the most common aggregation rule, Analysis Studio provides the sum aggregation rule to calculations so that the appropriate solve order occurs.

If you have several calculations in a crosstab, you should be aware of the default solve order.

You cannot use addition calculations or aggregation calculations that refer to different hierarchies from the same dimension.

Cells show "--" (two dashes) rather than a value in calculations that use nonadditive measures such as count or average. Nonadditive measures are distinguished by a nonadditive measure icon nonaggregating measure in a dimension icon in the source tree.

Procedure

  1. Select the rows or columns that you want to use in the calculation.
  2. Click the calculate button calculate icon on the toolbar.
  3. Choose whether to use a predefined calculation or create a member-based calculation:
    • To use a predefined calculation, click one of the predefined calculations.
    • To create an item-based calculation, click Custom.

      The Calculate dialog box appears.

  4. In the Operation box, click the operation you want to perform.

    Depending on the selected data, you may first need to choose an operation type from the Operation type box.

  5. Choose which data to use for the calculation:
    • To use existing items, click the items you want in the Available items box.
    • To use other data, specify a number in the Number box.
  6. Click OK.

Results

The calculated results appear in a new row or column after the last item used as an operand in the calculation, except when calculating measure items. When you calculate measure items, the calculated results appear in a new row or column as the last item.

To make the name of the calculated row or column more meaningful, or to avoid a default heading name which is too long, type a new name in the Name box.

To edit a calculation, right-click the calculated row or column and click Edit this Calculation.

An example of the calculate dialog box.