EducationSoftwareStrategy.com
StrategyCommunity

Knowledge Base

Product

Community

Knowledge Base

TopicsBrowse ArticlesDeveloper Zone

Product

Download SoftwareProduct DocumentationSecurity Hub

Education

Tutorial VideosSolution GalleryEducation courses

Community

GuidelinesGrandmastersEvents
x_social-icon_white.svglinkedin_social-icon_white.svg
Strategy logoCommunity

© Strategy Inc. All Rights Reserved.

LegalTerms of UsePrivacy Policy
  1. Home
  2. Topics

KB11721: What are the settings to consider when performing an Outer Join between metrics in MicroStrategy Engine?


Community Admin

• Strategy


This article covers settings to considering when doing outer joins.

Strategy adopts multi-pass logic to determine the execution plan for a report. This means that every metric is evaluated in separate SQL passes.
Outer Joins come into play when Strategy Engine merges the results from all SQL passes into one report. For a multi-pass report, different Outer Join behaviors can give the user completely different results.
In addition, report metrics can be of different types which can, in some cases, influence the result of the outer join (see Formula Join Type at Compound/Split Metrics Level).
 
A- Metric types
 
A report can have many compound metrics and split metrics, while the compound metrics can have split metrics in its expression.
This scenario may cause Strategy Engine to generate more than one pass of SQL to calculate the report.
 
Aggregate/Simple Metrics:
 
Aggregate/Simple Metrics are the simplest of metrics, aggregating one fact to a certain level. For example:
Sum(Revenue) {~+}
Sum(Profit) {~+}
Sum(Revenue) {Region+}
 
Split Metrics:
 
Split metrics are simple metrics with more than one fact in their expression which come from different fact tables. For example:
(SUM(Fact1) - SUM(Fact2)) {+~}
 
Compound Metrics:
 
Compound Metrics are metrics that are made by combining one or more other metrics using one or more mathematical operators. For example:
 
(Sum(Profit) {~+} / Sum(Revenue) {~+} )
(Sum(Revenue) {~+} / Sum(Revenue) {Region+}
 
B- Metric and Formula Join Type
 
In Strategy, there are two settings that users can access to control Outer Join behavior: Formula Join Type and Metric Join Type.
 
Metric Join Type:

  • VLDB Setting at Database Instance Level
ka04W000000OhZeQAK_0EM440000002FjX.jpeg
  • Report and Template Levels
    • Report Editor > Data > Report Data Options
ka04W000000OhZeQAK_0EM440000002FjW.jpeg
  • Metric Level
     
    • Metric editor > Tools > Metric Join Type
    • Control Join between Metrics
ka04W000000OhZeQAK_0EM440000002FjZ.jpeg

Formula Join Type:
Only at Compound/Split Metrics Level

  • Metric editor > Tools > Advanced > Formula Join Type
  • Control Join between Component Metrics Inside Compound Metrics and Split Metrics
  • Currently, metric join type for compound/split metrics can override formula join type.
ka04W000000OhZeQAK_0EM440000002FjS.jpeg

 
C- Metrics Join Type Hierarchy
 
The following schema shows which setting takes precedence when set at different levels.
For example, setting Metric Join type to "Outer" at the report level (Metric editor > Tool > Metric Join Type) overwrites the Metric Join Type set at the Database Instance Level:

ka04W000000OhZeQAK_0EM440000002Fje.jpeg

 
The subject of Outer Joins is a very broad one, however, as a continuation of the topics covered in this article, users might find it useful to refer to the following Strategy Knowledge Base document:
 

  • KB11155 - How do metric join types behave when a compound metric and one of its base metrics both appear in the Strategy report template?

Comment

0 comments

Details

Knowledge Article

Published:

May 12, 2017

Last Updated:

May 12, 2017