MicroStrategy ONE
Defining datasets as primary or secondary
If a document contains multiple dataset reports, you can define the join behavior of each dataset as either primary or secondary. This functionality allows you to decide which datasets determine which attribute elements appear in the document results.
-
All of the elements from the primary datasets are displayed in the results.
-
Elements from the secondary datasets are displayed only if they also appear in a primary dataset.
These rules do not affect Grid/Graphs that use a single dataset report. In this case, an element from a secondary dataset is displayed in a grid or graph report in a document even if it does not also appear in a primary dataset. If the Grid/Graph uses data from multiple dataset reports, the join behavior affects the content of the Grid/Graph. You can use MicroStrategy Web to create a Grid/Graph that uses multiple dataset reports; for steps, see Document Creation Help. For more details on how join behavior affects Grid/Graphs, see the Document Creation Help.
Datasets are joined following these rules:
-
If a document contains one primary dataset, then all secondary datasets are joined to the primary dataset using left outer joins.
-
If a document contains at least two primary datasets, all primary datasets are joined using compound joins. The results are used to left outer join all secondary datasets.
-
If a document does not contain any primary datasets, all datasets are joined using inner joins.
For a compound join, Intelligence Server joins the data in the datasets as described below:
-
If the datasets have any of the same attributes, the common attribute elements are matched.
-
Then beginning with the first row of each dataset and continuing to the last, a row is created in a virtual dataset—the complete set of joined rows held in memory—consisting of all attributes, consolidations, custom groups, and metrics. You can determine whether sections that do not have metric data are displayed and whether grouping elements that contain null values are displayed.
For examples, see the Document Creation Help.
To define the join behavior of a dataset
-
Open a document in the Document Editor. How?
-
Right-click the dataset in the Datasets pane, point to Join Behavior, and select either PrimaryorSecondary.