SYMPTOM:
When trying to get an average on a metric aggregating the calculation level to an attribute that is not displayed in the grid, the table in the warehouse contains values equal to '0', and those values must not be taken to calculate the average. The ZeroToNull function can be used to take the '0' as a null value and the average can be calculated correctly using dynamic aggregation and the Report objects window (an OLAP Services License is required) as shown below:

If the ZeroToNull function is not used under these circumstances, the average is not calculated correctly, as shown below:

For example, when using the following table, the average should be calculated as follows:

Using ZeroToNull function:
(3+6+7+5)/4 = 21/4 = 5.25
Not using ZeroToNull function:
(3+6+7+5+0)/5 = 21/5 = 4.2
STEPS TO REPRODUCE:
Follow the steps below to reproduce this issue in the Strategy Tutorial project:

CAUSE:
This is a functionality of OLAP Services and dynamic aggregation with the lowest level calculation in the Report objects window. Without OLAP Services, the 0 is taken as a value and the ZeroToNull function will not work properly.
ACTION:
Replace the zero values in the DB Warehouse tables for Null values, as shown below:

The 'Null checking for Analytical Engine' option in the VLDB properties must be set to default (False).