Summaries in Query Calculations Include Nulls with SAP BW Data Sources

When using an SAP BW data source in IBM® Cognos® Analytics - Reporting, null values in the database are returned in the result set and the count summary function includes the empty cells in the following scenarios:

  • A query calculation includes an arithmetic calculation where one or more NULL operands and an aggregation is performed on the calculation.
  • The result of a query calculation is a constant, such as current_time and current_date.

The count summary function should normally exclude null values.

To avoid this problem, for the first scenario, ensure that both operands do not return null values. For example, the original expression is [num1]+[num2]. Instead, use the following expression:

if ([num1] is null) then ( 0 ) else ([num1])

if ([num2] is null) then ( 0 ) else ([num2])

There is no workaround for the second scenario.