In MicroStrategy it is possible to generate outer joins between metrics at different levels, but there was the possibility of report results that could vary in ways outside the user's control if a straight outer join was performed.
To address this issue, a VLDB property called "Downward Outer Join" should be used. It has the following five options:
To illustrate, consider the following three intermediate tables:
pa1 | ||
Region | Quarter | Cost |
Northeast | Q2 02 | $281,203 |
| Q3 02 | $166,626 |
Mid-Atlantic | Q2 02 | $418,401 |
| Q4 02 | $445,941 |
South | Q2 02 | $157,539 |
| Q3 02 | $101,407 |
Northwest | Q2 02 | $183,071 |
| Q4 02 | $169,697 |
pa2 | ||
Region | Quarter | Cost |
Northeast | Q2 02 | $281,203 |
| Q4 02 | $290,212 |
Mid-Atlantic | Q2 02 | $418,401 |
| Q4 02 | $445,941 |
South | Q2 02 | $157,539 |
| Q3 03 | $109,723 |
Northwest | Q2 02 | $183,071 |
| Q4 02 | $169,697 |
pa3 | ||
Region | Units Sold | |
Northeast | 56748 | |
Central | 42541 | |
South | 32500 | |
Southwest | 67948 | |
Full outer joining the tables in the order pa1, pa2, pa3 renders the correct results. For the Northeast and South regions, there are three quarters between the first two tables combined. The same number of units sold is expected to appear for each of these quarters, since Units Sold is calculated in pa3 without respect to Quarter:
select coalesce(pa1.REGION_ID, pa2.REGION_ID, pa3.REGION_ID) REGION_ID,REGION ID | REGION DESC | QUARTER ID | QUARTER DESC | Cost (pa1) | Cost (pa2) | Units Sold |
1 | Northeast | 20022 | Q2 02 | 281203.0 | 281203.0 | 56748.0 |
1 | Northeast | 20023 | Q3 02 | 166626.0 | --- | 56748.0 |
1 | Northeast | 20024 | Q4 02 | --- | 290212.0 | 56748.0 |
2 | Mid-Atlantic | 20022 | Q2 02 | 418401.0 | 418401.0 | --- |
2 | Mid-Atlantic | 20024 | Q4 02 | 445941.0 | 445941.0 | --- |
4 | Central | --- | --- | --- | --- | 42541.0 |
5 | South | 20022 | Q2 02 | 157539.0 | 157539.0 | 32500.0 |
5 | South | 20023 | Q3 02 | 101407.0 | --- | 32500.0 |
5 | South | 20033 | Q3 03 | --- | 109723.0 | 32500.0 |
6 | Northwest | 20022 | Q2 02 | 183071.0 | 183071.0 | --- |
6 | Northwest | 20024 | Q4 02 | 169697.0 | 169697.0 | --- |
7 | Southwest | --- | --- | --- | --- | 67948.0 |
select coalesce(pa1.REGION_ID, pa2.REGION_ID, pa3.REGION_ID) REGION_ID,
REGION ID | REGION DESC | QUARTER ID | QUARTER DESC | Cost (pa1) | Cost (pa2) | Units Sold |
1 | Northeast | 20022 | Q2 02 | 281203.0 | 281203.0 | 56748.0 |
1 | Northeast | 20023 | Q3 02 | 166626.0 | --- | 56748.0 |
1 | Northeast | 20024 | Q4 02 | --- | 290212.0 | MISSING |
2 | Mid-Atlantic | 20022 | Q2 02 | 418401.0 | 418401.0 | --- |
2 | Mid-Atlantic | 20024 | Q4 02 | 445941.0 | 445941.0 | --- |
4 | Central | --- | --- | --- | --- | 42541.0 |
5 | South | 20022 | Q2 02 | 157539.0 | 157539.0 | 32500.0 |
5 | South | 20023 | Q3 02 | 101407.0 | --- | 32500.0 |
5 | South | 20033 | Q3 03 | --- | 109723.0 | MISSING |
6 | Northwest | 20022 | Q2 02 | 183071.0 | 183071.0 | --- |
6 | Northwest | 20024 | Q4 02 | 169697.0 | 169697.0 | --- |
7 | Southwest | --- | --- | --- | --- | 67948.0 |
In the second query, joining directly from pa1 to pa3 means that only Q2 02 and Q3 02 (the Quarter elements from pa1) are available to receive the Northeast value from pa3. Subsequently joining to pa2 introduces a new element for Quarter. However, the join to pa3 is already done, and the database will not retroactively look to pa3 and copy the Units Sold value again. As a result, there is a missing value in the final result table.
When joining "upward" (that is, from a lower level table with more attribute keys and more detail to a higher-level table with fewer keys and less detail), the higher-level metric values can be propagated across only those elements for the lower-level attributes that already exist in the final result. For data integrity, it is necessary to ensure that all attribute elements exist in the final result before joining in metric values calculated at a level higher than the template level.
Because cross-dimensional outer joins could produce different results, even for different executions of the same report, MicroStrategy does not allow simple outer joins to or from metrics higher than template level by default.
Note: Users may create reports with metrics higher than template level, and they may set the metric join type in Report Data Options to outer join, but the SQL engine will treat these metrics as if they were set to inner join.The "Downward Outer Join" VLDB property allows higher-level metrics to be outer joined by constructing a table of all necessary attribute elements to be included early in the join path.
The downward outer join pass performs a cross join between the higher-level metric pass and the lookup table(s) for the attribute(s) included in the report level dimensionality that are not present in the metric's dimensionality. This is the only certain way to guarantee that all the needed attribute elements are present in the downward outer join table.
Because of the cross join against the lookup table, report results may be prohibitively large when there are lower-level attributes with a large number of elements. In the example below, there is no report filter; as a result, all the elements of the Quarter attribute are shown, even when none of the report-level metrics contain data.
Note: Users are strongly encouraged to use the report filter to restrict the number of elements for attributes that are not present in all the metric dimensionalities.
The following report uses the downward outer join setting with the above intermediate tables. The metric calculation passes are not shown, only the downward outer join pass and final result pass:

|
| Metrics | Cost (R, Q) | Cost 2 (R, Q) | Units (R) |
Region | Quarter |
|
|
|
|
Northeast | Q1 02 |
|
|
| 50,304 |
Northeast | Q2 02 |
| 281,203 | 281,203 | 50,304 |
Northeast | Q3 02 |
| 166,626 |
| 50,304 |
Northeast | Q4 02 |
|
| 290,212 | 50,304 |
Northeast | Q1 03 |
|
|
| 50,304 |
Northeast | Q2 03 |
|
|
| 50,304 |
Northeast | Q3 03 |
|
|
| 50,304 |
Northeast | Q4 03 |
|
|
| 50,304 |
Mid-Atlantic | Q2 02 |
| 418,401 | 418,401 |
|
Mid-Atlantic | Q4 02 |
| 445,941 | 445,941 |
|
Central | Q1 02 |
|
|
| 37,923 |
Central | Q2 02 |
|
|
| 37,923 |
Central | Q3 02 |
|
|
| 37,923 |
Central | Q4 02 |
|
|
| 37,923 |
Central | Q1 03 |
|
|
| 37,923 |
Central | Q2 03 |
|
|
| 37,923 |
Central | Q3 03 |
|
|
| 37,923 |
Central | Q4 03 |
|
|
| 37,923 |
South | Q1 02 |
|
|
| 28,866 |
South | Q2 02 |
| 157,539 | 157,539 | 28,866 |
South | Q3 02 |
| 101,407 |
| 28,866 |
South | Q4 02 |
|
|
| 28,866 |
South | Q1 03 |
|
|
| 28,866 |
South | Q2 03 |
|
|
| 28,866 |
South | Q3 03 |
|
| 109,723 | 28,866 |
South | Q4 03 |
|
|
| 28,866 |
Northwest | Q2 02 |
| 183,071 | 183,071 |
|
Northwest | Q4 02 |
| 169,697 | 169,697 |
|
Southwest | Q1 02 |
|
|
| 60,378 |
Southwest | Q2 02 |
|
|
| 60,378 |
Southwest | Q3 02 |
|
|
| 60,378 |
Southwest | Q4 02 |
|
|
| 60,378 |
Southwest | Q1 03 |
|
|
| 60,378 |
Southwest | Q2 03 |
|
|
| 60,378 |
Southwest | Q3 03 |
|
|
| 60,378 |
Southwest | Q4 03 |
|
|
| 60,378 |

It is also the only approach that will work reliably for reports that have more than two metrics, none of which are at report level. Recall that full outer joining intermediate passes at different dimensionalities requires all the needed attribute elements to be obtained before joining upward to higher-level metrics.
When there are no report level metrics, producing this "master list" of attribute elements is not algorithmically possible without additional user input. Thus, when there are no report level metrics on the report and outer joins are required, the standard downward outer join described in this article should be used.
For more information on bypassing the standard downward outer join algorithm and using simple full outer joins between metrics at different dimensionalities, consult the following MicroStrategy Knowledge Base document: