Month | Region | M1 | M2 |
Jan | a | 6 | 6 |
Mar | a | 5 | 2 |
Feb | b | 5 | 4 |
Jan | b | 4 | 3 |

7. The Datasets should look like:

8. Add Month Id attribute and Sum(M1-M2) metric to the visualization.

9. Group the first 2 elements in Month Id to create a new element group.

This is known issue in between 10.4.8 to 10.11.
The data was calculated by:
1. Retrieve metrics from Dataset #2 at Month level
This represents the result in Ex1_tempcube0:
Month | M1 | M2 |
Jan | 1 | 1 |
Mar | 3 | 3 |
Feb | 1 | 1 |
2. Map the Month(Group) to Month and the metrics on Month level
This represents the result:
Month(Group) | Month | M1 | M2 |
Group 1 | Jan | 1 | 1 |
Mar | Mar | 3 | 3 |
Group 1 | Feb | 1 | 1 |
3. Aggregate the metric from Month level to Month(Group) level
From #1, the definition of M1 is identical as M2, so at #3, when summing up [M1] - [M2], it will always be 0.
This represents the result:
Month(Group) | M1 - M2 | M1 | M2 |
Group 1 | 0 | 2 | 2 |
Mar | 0 | 3 | 3 |
Step 2 and step 3 are the same, but since the metrics are in its original level, when aggregated to Month(Group) level, the data will be correct.


Without the fix, the Engine firstly calculates Count(X)@{Y} as M1, and then map the relationships between Y and Z, creating a table of {M1, Y , Z}, and lastly do another aggregation, effectively calculates Count(M1)@Z.
Since the count is non-distinct, the double counting result is actually the row count of the joined dataset {M1, Y , Z}.
#1

#2

With the fix, the Engine firstly calculates M1 at (Y, Z) levels in the same time, and the result may differ.
