MicroStrategy ONE
How facts are defined
A fact definition contains properties that define a fact and its components. The fact definition is composed of at least one fact expression and basic information about the fact, including the fact name, expression, and the source tables it uses.
The following table provides an example of a fact definition, which includes the fact's name, expression, and source tables.
Fact Name |
Expression |
Source Tables |
Unit Price |
All_Sales |
LU_ITEM ORDER_DETAIL |
In the example, the fact expression maps the fact to the All_Sales
columns in the LU_ITEM
and ORDER_DETAIL
tables in the warehouse. The fact expression contained in the definition represents how the fact is calculated by MicroStrategy. In this case, the fact expression is simply the name of the column which holds the fact data. However, some facts use more advanced expressions to perform calculations on multiple columns of data to return a single fact.
Facts can be found in multiple tables in a warehouse schema, and often must be calculated differently from one table to the next. While the Unit Price fact only has one expression, multiple expressions can exist within a fact definition.
-
Each fact expression relates to one or more related tables that contain the fact.
-
For each of the tables, fact expressions define how the fact is calculated.