Handling distinct count aggregation in N4V for Webi cross-tables

Anonymised summary of support ticket #450957 (2023-03-30)

Symptom

In N4V cross-tables, aggregated indicators default to SUM aggregation (e.g., 'SUM([ID];All)') instead of DISTINCT count. When dimensions like 'pole' are added, records with multiple poles are counted multiple times, leading to incorrect totals. In standard Webi cross-tables, totals are correctly calculated as distinct counts even when dimensions are added.

Environment

SAP BusinessObjects Web Intelligence with N4V FOR WEBI extension. Data source contains unique IDs (e.g., 'Fiche ID') that may be linked to multiple structures or poles. Aggregated measures (e.g., 'COUNT([Fiche ID])') are sent to the cross-table.

Resolution

  1. Avoid sending pre-aggregated measures to the N4V cross-table. Instead, send the raw detail level (e.g., individual IDs) if the volume allows it (Webi has a row limit for N4V data transfer).
  2. In the N4V cross-table, modify the aggregation function to 'DISTINCT COUNT' on the raw ID field rather than using pre-aggregated measures like 'SUM([ID];All)'.
  3. If sending raw detail is not feasible due to volume constraints, create a secondary indicator that enforces a unit count (e.g., '1' per unique ID) and send both indicators to the cross-table. Users can then select the appropriate aggregation based on context.

Other resolution

Note: Standard Webi cross-tables can recalculate aggregations dynamically from detailed data, but N4V cross-tables rely on pre-aggregated measures sent from the data source. This limitation is inherent to the N4V engine's design.