Generally, when null checking is used in metrics, the null checking is performed as part of the initial metric calculation. However, sometimes it is necessary to convert the null values to zeroes in the final pass.
Follow the steps below to achieve this:
- Create the original metric (M1) on which null checking is to be completed.
- Create a dummy metric (M2) as Sum(0) at the report level along with another attribute.
Note: It is not important whether the attribute is related to the report level attributes or not, only that its dimensionality is different from that of M1.
- Create a compound metric (M3) as NullToZero(M1 + M2), as shown below: