Microstrategy - ProjectDesign
Microstrategy - ProjectDesign
Gu i de
Version 2021
M i cr o St r at egy 2021
Ju n e 2023
Copyright © 2023 by MicroStrategy Incorporated. All rights reserved.
Trademark Information
The following are either trademarks or registered trademarks of MicroStrategy Incorporated or its affiliates in the United States and certain other
countries:
Dossier, Enterprise Semantic Graph, Expert.Now, Hyper.Now, HyperIntelligence, HyperMobile, HyperVision, HyperWeb, Intelligent Enterprise,
MicroStrategy, MicroStrategy 2019, MicroStrategy 2020, MicroStrategy 2021, MicroStrategy Analyst Pass, MicroStrategy Architect, MicroStrategy
Architect Pass, MicroStrategy Badge, MicroStrategy Cloud, MicroStrategy Cloud Intelligence, MicroStrategy Command Manager, MicroStrategy
Communicator, MicroStrategy Consulting, MicroStrategy Desktop, MicroStrategy Developer, MicroStrategy Distribution Services, MicroStrategy
Education, MicroStrategy Embedded Intelligence, MicroStrategy Enterprise Manager, MicroStrategy Federated Analytics, MicroStrategy Geospatial
Services, MicroStrategy Identity, MicroStrategy Identity Manager, MicroStrategy Identity Server, MicroStrategy Insights, MicroStrategy Integrity
Manager, MicroStrategy Intelligence Server, MicroStrategy Library, MicroStrategy Mobile, MicroStrategy Narrowcast Server, MicroStrategy ONE,
MicroStrategy Object Manager, MicroStrategy Office, MicroStrategy OLAP Services, MicroStrategy Parallel Relational In-Memory Engine (MicroStrategy
PRIME), MicroStrategy R Integration, MicroStrategy Report Services, MicroStrategy SDK, MicroStrategy System Manager, MicroStrategy Transaction
Services, MicroStrategy Usher, MicroStrategy Web, MicroStrategy Workstation, MicroStrategy World, Usher, and Zero-Click Intelligence.
The following design marks are either trademarks or registered trademarks of MicroStrategy Incorporated or its affiliates in the United States and certain
other countries:
Other product and company names mentioned herein may be the trademarks of their respective owners.
Specifications subject to change without notice. MicroStrategy is not responsible for errors or omissions. MicroStrategy makes no warranties or
commitments concerning the availability of future products or versions that may be planned or under development.
CON TEN TS
1. BI Architecture and the MicroStrategy Platform 1
Prerequisites 422
Physical warehouse requirements 422
Designing the financial reporting project 434
Creating reporting objects for financial data 439
BI A RCH ITECTURE AN D
TH E M ICRO STRATEGY
PLATFORM
The diagram above illustrates the common setup for standardizing data
from source systems and transferring that data into MicroStrategy.
MicroStrategy can also access data from text files, Excel files, SAP BI,
Hyperion Essbase, Microsoft Analysis Services, and other data sources. For
more information on how MicroStrategy can access your data sources, see
Data warehouse for data storage and relational design, page 5.
• Data access is optimized for frequent reading and writing, as the system
records huge volumes of data every day. An example of data that
benefits from this type of optimization is the number of credit card
transactions that an OLTP system might record in a single day. This is in
contrast to data warehouses which are often designed for reading data
for analysis with a minimum number of updates, insertions, or deletions.
For more information on data warehouse design, see Data warehouse for
data storage and relational design, page 5.
Recall the example of a bank that relies on several source systems to store
data related to the many services the bank offers. Each of these business
services has a different and specific workflow.
This process can be explained with the example of a bank that wants to
consolidate a variety of information about a particular customer, including
the customer's ATM activity, loan status, and account balances. Each of
these different sets of data is likely gathered by different source systems.
Since each source system can have its own naming conventions, the data
that comes from one system may be inconsistent with the data that comes
from another system.
In this case, the ETL process extracts the data from the different banking
source systems, transforms it until it is standardized and consistent, and
then loads the data into the data warehouse.
The source systems described above, such as OLTP systems, are generally
designed and optimized for transactional processing, whereas data
warehouses are usually designed and optimized for analytical processing. In
combination with MicroStrategy tools and products, the data warehouse also
provides the foundation for a robust online analytical processing (OLAP)
system. Analytical processing involves activities such as choosing to see
sales data by month and selecting the applicable metric to calculate sales
trends, growth patterns, percent-to-total contributions, trend reporting, and
profit analysis.
The following are different data source alternatives which MicroStrategy can
integrate with:
• MDX Cube sources: In MicroStrategy you can integrate with sets of data
from SAP BW, Microsoft Analysis Services, Hyperion Essbase, and IBM
Cognos TM1, which are referred to as MDX Cube sources. MicroStrategy
can integrate with these data sources while simultaneously accessing a
relational database effectively. For more information on connecting to
and integrating MDX Cube sources in MicroStrategy, see the MDX Cube
Reporting Help.
• Text files and Excel files: With MicroStrategy's Freeform SQL and
Query Builder features, you can query, analyze, and report on data
stored in text files and Excel files. As with MDX Cube sources described
above, MicroStrategy can report against these alternative data sources
while concurrently accessing a relational database to integrate all of your
data into one cohesive project. For more information on using text files
and Excel files with the Freeform SQL and Query Builder features, see
the MDX Cube Reporting Help.
Additionally, the Data Import feature lets you use MicroStrategy Web to
import data from different data sources, such as an Excel file, a table in a
database, or the results of a SQL query, with minimum project design
requirements. For more information on how Data Import can be used to
integrate data from various data sources into your project, see Strategies to
include supplemental data in a project, page 74.
For more information on how to use the Data Import feature, refer to the
MicroStrategy Web Help.
• MicroStrategy project, page 14—where you build and store all schema
objects and information you need to create application objects such as
reports in the MicroStrategy environment, which together provide a
flexible reporting environment
MicroStrategy has a range of products and components that you can install
on different operating systems. Depending on the type of setup that you
have, you can install various combinations of MicroStrategy components.
See the Installation and Configuration Help for a complete list of how these
products are packaged.
MicroStrategy metadata
MicroStrategy metadata is a repository that stores MicroStrategy object
definitions and information about your data warehouse. The information is
stored in a proprietary format within a relational database. The metadata
maps MicroStrategy objects—which are used to build reports and analyze
data—to your data warehouse structures and data. The metadata also stores
the definitions of all objects created with MicroStrategy Developer and Web
such as templates, reports, metrics, facts, and so on.
▫ Facts relate numeric data values from the data warehouse to the
MicroStrategy reporting environment. Facts are used to create
MicroStrategy metadata also facilitates the retrieval of data from the data
warehouse when using MicroStrategy applications. It converts user requests
into SQL queries and translates the results of those SQL queries back into
MicroStrategy objects such as reports and documents which can be easily
analyzed and understood.
• Sharing objects
• Sharing data
MicroStrategy Developer
MicroStrategy Developer is an advanced, Windows-based environment
providing a complete range of analytical functionality designed to facilitate
the deployment of reports. MicroStrategy Developer provides the project
designer functionality essential to creating both schema and application
objects necessary to serve the user communities of both MicroStrategy
Developer and Web.
The following examples highlight some ways in which Developer allows you
to model your business intelligence applications:
• Every report or query can automatically benefit from the tables you
include in an application. Tables in MicroStrategy are references to
tables in your data warehouse, thus providing access to your data.
After reports have been created, report designers and analysts can deploy
them through different interfaces, including MicroStrategy Developer,
MicroStrategy Web, and MicroStrategy Office.
MicroStrategy Web
MicroStrategy Web provides users with a highly interactive environment and
a low-maintenance interface for reporting and analysis. Using the Web
interface, users can access, analyze, and share data through any web
browser on many operating systems. MicroStrategy Web provides ad-hoc
querying, industry-leading analysis, quick deployment, and rapid
customization potential, making it easy for users to make informed business
decisions.
MicroStrategy project
A project is where you build and store all schema objects and information
you need to create application objects such as reports in the MicroStrategy
A project:
• Contains all schema objects used to interpret the data in those tables.
Schema objects include facts, attributes, hierarchies, and so on. Schema
objects are discussed in later chapters in this guide.
• Contains all reporting objects used to create reports and analyze the
data. Reporting objects include metrics, filters, reports, and so on.
Report objects are covered in the Basic Reporting Helpand the Advanced
Reporting Help.
• Defines the security scheme for the user community that accesses these
objects. Security objects include security filters, security roles,
privileges, access control, and so on. Security and other project-level
administrative features are discussed in the System Administration Help.
Projects are often used to separate data from a data warehouse into smaller
sections of related data that fit user requirements. For example, you may
have a project source separated into four different projects with analysis
areas such as human resources, sales distribution, inventory, and customer
satisfaction. This allows all of your users in the human resources
department to use the human resources project and they do not have to look
through inventory data that they are not interested in.
Some key concepts to understand before you begin creating a project are as
follows:
MicroStrategy Architect
MicroStrategy includes a project design tool known as Architect. Architect
allows you to define all the required components of your project from a
centralized interface. Architect also provides a visual representation of your
project as you create it, which helps to provide an intuitive workflow.
Creating and modifying a project using Architect is covered in Creating and
Configuring a Project, page 71 and Creating a Project Using Architect, page
113.
For instance, you may want to ensure that the changes involved in moving
your project from a development environment into production do not alter
any of your reports. Integrity Manager can compare reports in the
development and the production projects, and highlight any differences. This
can assist you in tracking discrepancies between the two projects.
For reports you can test and compare the SQL, grid data, graph, Excel, or
PDF output. For documents you can test and compare the Excel or PDF
output, or test whether the documents execute properly. If you choose not to
test and compare the Excel or PDF output, no output is generated for the
documents. Integrity Manager still reports whether the documents executed
successfully and how long it took them to execute.
When you copy objects across projects with Object Manager, if an object
with the same ID as the source object exists anywhere in the destination
project, a conflict occurs. Object Manager helps you to resolve the conflict.
For example, you can copy over the existing object, use the newer object,
and so on. For steps to copy objects and resolve conflicts, as well as
background information to understand how objects are copied, see the
Managing Your Projects chapter of the System Administration Help.
Notice that the project design process includes a feedback loop. Designing a
project is very rarely a single, linear process. As projects are deployed and
tested, new user requirements and project enhancements require
modification to the initial project design. It is important to keep this in mind
as you design your project and plan for the next phase of development.
TH E L OGICAL D ATA
M OD EL
This chapter describes one of the major components of data modeling: the
logical data model. A logical data model is a logical arrangement of data as
experienced by the general user or business analyst. This is different from
the physical data model or warehouse schema, which arranges data for
efficient database use. The logical data model graphically depicts the flow
and structure of data in a business environment, providing a way of
organizing data so it can be analyzed from different business perspectives.
Logical data models are independent of a physical data storage device. This
is the key concept of the logical data model. The reason that a logical data
model must be independent of technology is because technology is changing
so rapidly. What occurs under the logical data model can change with need
or with technology, but the blueprint remains the same, and you do not need
to start over completely.
platform does not require you to define dimensions explicitly, the word
logical is a more accurate term than multidimensional. While a
multidimensional data model must have at least one dimension, a logical
data model may or may not have any explicitly defined dimensions.
The logical data modeling process produces a diagram similar to the one
shown in the following diagram:
data in the data warehouse. This is usually one of the first steps in designing
a project, as shown in the following diagram:
This chapter provides conceptual information about logical data models, the
elements that exist within them, and also general instructions and guidelines
for creating these models.
Facts allow you to access data stored in a data warehouse and they form the
basis for the majority of users' analysis and report requirements. In
MicroStrategy, facts are schema objects that relate data values (typically
numeric data) from the data warehouse to the MicroStrategy reporting
environment.
In a data warehouse, facts exist as columns within the fact tables. They can
come from different source systems and they can have different levels of
detail. For example, you can capture sales data in one system and track it
daily, while you capture stock and inventory data in another system and
track it weekly.
To those familiar with SQL, facts generally represent the numeric columns
in database tables on which you perform SQL aggregations, such as SUM
and AVG.
For a more complete discussion about facts, see Chapter 6, The Building
Blocks of Business Data: Facts.
For example, consider the sales figures of your company. If you were
informed that your company had sales of $10,000, you can gather little
useful information. To make the sales figure meaningful, you would need to
know more about the source of that sales figure such as:
• The scope of the sale, such as national, regional, local, or a single store
max(a12.MONTH_DESC) MONTH_DESC,
sum(a11.TOT_DOLLAR_SALES) DLRSALES
FROM MNTH_CATEGORY_SLS a11
(200201,200202,200203)
GROUP BY al1.MONTH_ID
Attribute relationships
Building an effective project in MicroStrategy requires you, as the project
designer, to have a solid understanding of all the attributes in the project, as
well as how each of them relates to the other attributes.
Every direct relationship between attributes has two parts—a parent and a
child. A child must always have a parent and a parent can have multiple
children. The parent attribute is at a higher logical level than the child is. For
example, in a relationship between Year and Quarter, Year is the parent
attribute and Quarter is the child.
For example, Year and Quarter are attributes that are usually directly
related to each other. One year has many quarters and both attributes are in
the Time hierarchy.
Year and Customer are attributes that are usually not in the same hierarchy
and are not directly related to each other. However, if you want to create a
report that shows information about customer purchases in a particular year,
there must be some way to determine how these two attributes are related.
Year and Customer are related through a fact. It is the existence of a fact
that ties the Time hierarchy to the Customer hierarchy. In this case, the fact
is a customer purchase.
User requirements
The primary goal of logical data modeling is to meet the needs of your users'
reporting requirements. Developing such a model involves the following:
• Design of solutions
When creating the logical data model, you must consider all the potential
users and how to accommodate their varied requirements. In some cases,
lack of data in the source systems can limit user requirements. Sometimes,
to satisfy user requirements, you can derive additional data not found in the
source systems, as explained in Existing source systems, page 29.
User requirements are an important part of the initial project design process.
However, additional user requirements can be encountered after deploying a
project as users encounter areas for enhancement. In some cases, new user
requirements can require you to modify the logical data model to better
support the type of analysis and the retrieval of data that users demand.
Although some data may not exist in a source system, this does not mean
that it should not be included in the logical data model. Conversely,
everything you find in the source data does not necessarily need to be
included in the logical data model. User requirements should drive the
decision on what to include and what to exclude.
Whether you start from nothing or have an existing source system to use,
the steps to create a logical data model are as follows:
The details in these steps are related to using an existing source system.
For example, in the existing data there may be fact data recorded only at the
day level. However, your users are interested in analyzing data at more than
just at the day level. They also want to view their data at the year, month,
and week levels. This information may only be apparent to you after you
deploy your project and you determine that a high percentage of your users
are viewing sales data at the yearly level. This analysis requires
MicroStrategy to aggregate the sales data from the day level to the year
level. To improve performance and meet the requirements of the majority of
your users, you can include an aggregate table that stores sales data at the
year level (see Using summary tables to store data: Aggregate tables, page
368). You can then design a Year attribute for your project. This practice is
sometimes a reaction to user requirements established after project
deployment, but such considerations should be taken into account during
your initial project design initiative.
This example may not accurately define how you store time information.
Consider the Year to Month attribute relationship type of one-to-many. If
you define the attribute Month as simply the month name (Dec, Jan, and so
on) and not directly connected to a year (Dec 2005, Jan 2006, and so on)
then the relationship would become many-to-many.
If you have documentation for the existing data, such as an ERD, it is likely
that the documentation provides some additional details about the nature of
the data and any inherent relationships.
Depending on the complexity of your data and the nature of your business,
you may have very few hierarchies or you may have many. It is possible that
all the data is directly related, in which case you may have one big
hierarchy. Again, the requirements of your user community should help you
determine what hierarchies are necessary.
Each convention adds more information about the data to the logical data
model. This additional information can be particularly useful to a person
learning about the system.
Unique identifiers
An additional modeling convention is to add unique identifiers for each
attribute and fact. Unique identifiersdenote the key that maps an attribute to
its source data in the source system, when applicable. This information can
help define primary keys in the physical warehouse schema (see Uniquely
identifying data in tables with key structures, page 43).
Cardinalities help the database administrator estimate the size of the data
warehouse and help project designers determine the best paths for users to
navigate through the data using hierarchies in MicroStrategy, which are
discussed in Chapter 9, Creating Hierarchies to Organize and Browse
Attributes. Ratios can be particularly helpful when trying to decide where
creating aggregate tables will be most effective. This additional information
can be invaluable to database administrators and project designers.
Attribute forms
Including attribute forms in your logical data model can help you get a more
complete view of all of the information that is made available in your project.
• First name
• Last name
• Address
• Email address
In your logical data model, you could have included each of these pieces of
information as separate attributes, each with a one-to-one relationship to
the Customer attribute. In reality, though, these attributes simply provide
additional information about the Customer attribute; they do not represent
different levels within the Customer hierarchy. When a one-to-one
relationship exists between an attribute and one of its descriptions, you can
model these additional pieces of descriptive information as attribute forms.
The following diagram shows how you add attribute forms to a logical data
model:
In contrast, the logical data model is a logical arrangement of data from the
perspective of the general user or business analyst. For more information
on what a logical data model is and how to create one, see Chapter 2, The
Logical Data Model.
The logical data model is only concerned with logical objects of the business
model, such as Day, Item, Store, or Account. Several physical warehouse
schemas can be derived from the same logical data model. The structure of
the schema depends on how the data representing those logical objects are
to be stored in the warehouse. For example you can store logical objects in
the same table, in separate tables, duplicated across several tables, or in
some other arrangement.
While the logical data model tells you what facts and attributes to create, the
physical warehouse schema tells you where the underlying data for those
objects is stored. The physical warehouse schema describes how your data
is stored in the data warehouse and how it can be retrieved for analysis.
The key components that make up the physical warehouse schema are
columns and tables.
Columns and tables in the physical warehouse schema represent facts and
attributes from the logical data model. The rows in a table represent
attribute elements and fact data.
While each type of table may function differently within the data warehouse,
each type of table can be assigned a primary key that uniquely identifies the
elements within the given table.
• Simple key requires only one column to identify a record uniquely within a
table.
Which key structure you use to identify a unique attribute in a table depends
on the nature of your data and business requirements. The following
diagram shows how the different key structures can be used to identify a
calling center.
The simple key shows how you can identify a calling center with only its
Call_Ctr_id. This means that every calling center has its own unique ID.
Simple keys are generally easier to handle in the data warehouse than are
compound keys because they require less storage space and they allow for
simpler SQL. Compound keys tend to increase SQL query complexity, query
time, and required storage space. However, compound keys have a more
efficient ETL process.
Which key structure you use for a particular attribute depends entirely on the
nature of the data and your system. Consider what key structures work best
when creating lookup tables in the physical warehouse schema.
The following diagram shows the different ways in which you can organize
the same attribute information. Notice that the denormalized table holds the
exact same data as the normalized tables. While the denormalized table
You can use either structure for any table in the physical warehouse
schema, though each structure has its advantages and disadvantages, as
explained in the following sections and outlined in the table in Schema type
comparisons, page 59.
how to use relate tables, see Relate tables: A unique case for relating
attributes, page 46.
For example, fact tables containing sales and inventory data look like the
tables shown in the following diagram:
For more details on the level of aggregation of your fact data, see Fact table
levels: The context of your data, page 49.
• Base fact columns are represented by a single column in a fact table. The
following diagram shows an example of a fact table and base fact
columns:
Because facts in different fact tables are typically stored at different levels,
derived fact columns can only contain fact columns from the same fact table.
You can create the same type of data analysis in MicroStrategy with the use
of metrics. Metrics allow you to perform calculations and aggregations on
fact data from one or more fact columns. For more information on what
metrics are and how to create them, see the Advanced Reporting Help.
You do not need to include more lookup column IDs than are necessary for a
given fact table. For example, notice that the table above does not include
the Customer_id column; this is because analyzing inventory data at the
customer level does not result in a practical business calculation. Fact
tables should only include attribute ID columns that represent levels at
which you intend to analyze the specific fact data.
The levels at which facts are stored become especially important when you
begin to have complex queries with multiple facts in multiple tables that are
stored at levels different from one another, and when a reporting request
involves still a different level. You must be able to support fact reporting at
the business levels which users require.
Though the Region_id and Reg_id columns have different names, they
store the same data: information about regions. This is called
heterogeneous column naming.
The data for the Lookup_Region table came from a different source system
than the data for the Lookup_Call_Ctr and the source systems have
different naming conventions. This explains why the same information about
regions is represented by two columns with different names.
For example, if you create a Region attribute given the tables in the example
above, you must map both the Region_id and Reg_id columns to the
For consistency, it is a good idea for columns that contain the same data to
have the same column name. This is called homogeneous column naming. In
this case, the Region_ID column has the same name in both tables, as
shown in the following diagram:
Just as it is possible for the same attribute data to exist in different lookup
tables, it is also possible for the same fact data to exist in different fact
tables. A fact column may or may not have the same name in different
tables, as shown below:
In each of these schemas a base fact table and any number of aggregate
fact tables are used (For more information about aggregate fact tables, see
Using summary tables to store data: Aggregate tables, page 368). Fact table
keys consist of attribute keys relevant to the level of data stored in the table.
The schema examples that follow show data at the Item/Call Center/Date
level.
When comparing the different schema types, you should keep in mind the
following concepts:
Data redundancy also makes updating data a more intensive and difficult
process because data resides in multiple places. With no data
redundancy, data only has to be updated in a single place.
• Joins are SQL operations that are required to combine two tables
together in order to retrieve data. These operations are necessary, but as
with any operation performed on your data warehouse, the number of
joins required to build your queries affects the performance of those
queries.
• The sections below are not meant to be an exhaustive list of all possible
schema types. However, the sections below are meant to give a
description of the most common or general schema types that are used to
develop a physical warehouse schema.
The following diagram shows what physical lookup tables look like in the
warehouse:
However, since some tables contain the same ID columns (as shown above
with the Region_ID column), the tables within this type of schema take up
some redundant storage space in the warehouse.
However, this schema type requires the largest amount of storage space
within the warehouse because of its large lookup tables. High denormalized
schemas also cause the highest level of data redundancy.
As with any schema type model there are advantages and disadvantages to
using a star schema. As with a highly denormalized schema type, the
amount of join operations are reduced by using a star schema. A star
schema can also reduce the amount of storage space necessary in a highly
denormalized schema. However, star schemas can often require large
lookup tables that can take a more time to search than the smaller tables
that are used in the other schema types.
Design trade-offs
Constructing a logical data model and physical warehouse schema is an
iterative process of compromises and trade-offs. The following diagram
shows the three major requirements that must be balanced to create an
effective system.
Each of these categories affects the others. If you try to satisfy every single
user requirement from the simplest to the most complex, you will have to
create an extensive data model and schema to support those requirements.
This results in an increased load on the warehouse, slower query
performance, and greater maintenance for the database administrator. You
must decide which factors are most important in your particular environment
and weigh them against the other factors.
For example, if you have the storage space necessary to accommodate data
in a star schema it may seem that you would never want to normalize your
schema. However, SQL queries directed at a consolidated table require the
use of a DISTINCT operator and these types of queries tend to be very
expensive in terms of database resources and processing time. The use of a
In addition to the previous points, you may need higher level lookup tables
to take advantage of aggregate tables, which are discussed in Using
summary tables to store data: Aggregate tables, page 368.
For more comparisons between the different schema types described in this
chapter, see the following section Schema type comparisons, page 59.
Lookup Table
Schema Type Advantages Disadvantages
Structure
• Attribute ID
Minimal storage space
• Attribute and minimal data Requires numerous
Highly
description redundancy which joins to retrieve
normalized
column makes updating data information from higher-
schema
less intensive than for level lookup tables
• ID column of
the other schema types
parent
Lookup Table
Schema Type Advantages Disadvantages
Structure
• ID column of
grandparents
• Attribute ID
• Attribute
description
column
• description
column of
grandparents
• Further reduces
joins necessary to
retrieve attribute
descriptions as
compared to a Large lookup tables can
moderately negatively affect query
• Consolidates an normalized schema performance when
entire hierarchy
Star schema • Requires less searching tables and
into a single
storage space and requiring DISTINCT
lookup table
data redundancy operations to be
than a highly performed
denormalized
schema and thus
data is easier to
update
Now that you have gained an understanding of data modeling and the roles
of facts and attributes, you can learn about these same schema objects in
terms of how they exist in the MicroStrategy environment. As facts and
attributes are the cornerstones of the reports you intend to create using
MicroStrategy, it is essential to understand the structure of each of these
schema objects before creating a project.
To provide data in various languages you must include the translated data in
your database. The strategy you use to include translated data in your
database depends on many factors. Some guidelines are provided below to
help define your strategy so that internationalization can be supported and
integrated easily into your MicroStrategy projects:
You can also use both techniques (separate tables and extra columns in one
table) to store and identify your translated data. This can be helpful to
distinguish the language used for each table and column. It can also be
helpful if you have a primary language stored in one table, and you store all
internationalizations in an internationalization table. For example, you can
store the Spanish and German data in the same internationalization table,
as shown below:
For the purposes of this example, you can assume this data is stored in a
database named Tutorial (English). You also provide your projects in
Spanish and German, which means you must have a database for Spanish
and a database for German. Each database contains the same table
structure, column structure, and naming conventions, but includes
translated data, as shown below:
The Map widget can also use geographical data to return the location of a
MicroStrategy Mobile user, which can be used to perform additional
analysis. For example, the current location can be used to return detailed
information on the company's five closest distribution centers. This
information can then be displayed in a map format on the device, as shown
in the example below:
In the data source of your choosing, you must create the location data for
the locations that can be recognized when using mapping features in
MicroStrategy. This location data must include both a latitude and
longitude, along with any descriptive information required to be displayed
for each location. This procedure uses a third-party free utility to
determine valid latitude and longitude points for given addresses.
http://www.gpsvisualizer.com/geocoder/
2 In the Input field, type the address to determine the latitude and
longitude for. For example, 1600 Pennsylvania Avenue Washington DC
20500.
You can return latitude and longitude for multiple addresses at the same
time. This procedure provides the steps on how to return the latitude and
longitude for a single address.
5 Click Start geocoding. When the page has refreshed, click Create a
GPX file. A new page opens with xml script. The latitude and longitude
values are embedded in the xml as "lat" and "lon," respectively. In the
example picture below, these values are highlighted.
6 Include the values in quotation marks after lat= and lon= as the latitude
and longitude of the location, respectively. You must store this data as
numerical values that can support the decimal precision of these values.
7 Include any additional information in your data source for each location
that you store a latitude and longitude for. This can be information
returned from the geographical location search as well as data pertinent
to your needs. For example, if you are storing addresses for distribution
centers, you can include the name of the distribution center as well as
any other pertinent information.
8 Repeat the previous steps in this procedure for all locations that you
want to support when using mapping features in MicroStrategy.
If you do not have an entry for a given latitude and longitude point, no
information can be returned for that geographical location.
9 In MicroStrategy, create an attribute that can return all the location data
for each entry. Separate attribute forms should be created for latitude
and longitude, and should also support the numeric data of these values.
The latitude and longitude attribute forms can serve as values to identify
each attribute element. Attributes that use multiple attribute forms as
their ID form are referred to as compound attributes. For additional
details on creating an attribute, see Chapter 7, The Context of Your
Business Data: Attributes. For information on using two attribute forms to
identify each attribute element, see Attributes with multiple ID columns:
Compound attributes, page 312.
CREATIN G AN D
CON FIGURIN G A PROJECT
Once you create a logical model of your business data and arrange the data
within the data warehouse, you are ready to create a project in
MicroStrategy.
This chapter guides you through the first few major steps involved in
creating a project in MicroStrategy. For definitions and descriptions of the
components within the MicroStrategy platform that allow you to create and
analyze your business intelligence applications, see Chapter 1, BI
Architecture and the MicroStrategy Platform.
creation process. Bear this process in mind as you proceed through the rest
of this guide.
Schema objects such as facts and attributes are the basic components of
the logical structure of a project. The business data your user community
wants to report on is represented by schema objects in MicroStrategy.
Therefore, it is necessary to set up schema objects before reports can be
created. This step is covered in Creating facts and attributes, page 110
of this chapter.
You can use Query Builder or Freeform SQL to create schema objects as
you design reports. For more information for these features, see the
Advanced Reporting Help.
Once you create the initial schema objects, you can configure additional
schema-level settings that allow you to add complexity and depth to
objects in your project and to the project as a whole. For example, you
can create advanced facts and attributes to retrieve specific result sets.
You can also use attributes to create time-series analysis schema
objects called transformations and implement various tools to optimize
and maintain your project over time. For information about:
For information on creating the primary data for your project, follow the
steps provided in Overview of project creation, page 72.
• Include personalized data from various data sources. Along with the
primary data provided in the project, your personalized data can then be
reported on using all the standard MicroStrategy reporting and analysis
features. This personalized data can also be displayed with the primary
data in your project using documents.
While managed objects allow you to quickly integrate data using Data
Import, the data is not directly related to the rest of your project schema.
This means that only data integrated using a single Data Import process can
be included together on a given report; no additional attributes, metrics, or
other objects from the project can be included.
Dashboards provide an additional option that lets you include reports that
analyze data from different data sources together inside a single dashboard.
This can be accomplished by including the reports as separate datasets of
the dashboard, and then each dataset can be displayed separately on the
dashboard as a report, graph report, widget, or other analysis tool.
Dashboards provide a method to include both data from the rest of your
project and personalized data imported using the Data Import feature, into a
single analysis view. For example, the dashboard below displays various
information about a current customer's telephone service plan and their
potential to churn.
Some of the data on the document could come from the primary project,
such as the churn prediction, revenue risk indicator, and peak and off-peak
minute usage. Additional details such as the contract usage details and the
customer demographics could come from separate data sources, each
included into the project using Data Import. Because documents can present
separate sets of data in a single view or location, your regular project data
and personalized data can be displayed to analysts as if the data were
integrated.
For important prerequisites and tuning information for the Data Import
feature, refer to the System Administration Help. For more information on
how to use the Data Import feature, refer to the MicroStrategy Web Help
During the process of importing data into MicroStrategy using the Data
Import feature, you can use the automatically generated managed object
attributes to identify and define the levels of your data.
Alternatively, you can manually map the data to existing attributes in the
MicroStrategy project that are part of the relational schema. Mapping the
data in this way replaces the managed objects that are used to represent the
data with attributes in the MicroStrategy project. Mapping imported data to
attributes that are part of a relational schema has the following benefits:
• Report designers can integrate the logical model of the project with the
imported data, thus creating a relation between the two sets of data. Data
can then be joined across sources within a document. In addition,
document features such as selectors and group-by, which can restrict
data displayed on a document based on attributes, are also applied.
For example, a document includes a report that uses Data Import and a
standard report, which both use the same Year attribute. The document
also includes a selector based on the Year attribute. Since both reports
map year data to the same Year attribute, the selector can restrict the
data for both reports. If the Data Import report used a managed object for
its year data, the selector would not be applied for that report on the
document.
• The ID form of the project attribute must be mapped to the column in the
Data Import data source that you have created to relate the two systems
of data. The columns must share the same data type. Numeric data types
such as Integer are commonly used to represent the ID forms for
attributes.
The process of integrating data using the Data Import feature is explained in
the MicroStrategy Web Help. Refer to the Help for steps on how to complete
this process, including how to map the data to project attributes.
During the process of importing data into MicroStrategy using the Data
Import feature, you can integrate additional geographical information with
your imported data. This can improve the depth of geographical information
available for your data, and can also allow for easier integration with
MicroStrategy mapping features such as the Map widget and map
visualizations. An example of the type of mapping analysis available in
MicroStrategy is shown below.
When importing your data, the column headers and the data itself are
analyzed by MicroStrategy to determine what type of geographical
information, if any, is available. MicroStrategy attempts to recognize data
related to the geographical categories for Area Code, County, Country,
State, City, Zip code, Location, Latitude, and Longitude.
• If the following names are used for the column headers of your data:
— City, State
• New attributes can be automatically created and populated with data for
Country, State, and City. These options are available if any one of these
geographical categories is recognized:
▫ The latitude and longitude values for an Area Code, County, Country,
State, City, or Zipcode are determined by the files City.csv,
AreaCode.csv, County.csv, Country.csv, State.csv, and
ZipCode.csv. These files are included as part of an Intelligence
Server installation. You can modify these tables to change the latitude
and longitude values for a given location, as well as add additional
locations that can then have latitude and longitude values
automatically assigned when importing data into MicroStrategy. Any
changes to these .csv files are reflected when a user is connected to
the associated Intelligence Server to import their data into
MicroStrategy.
By default, latitude and longitude values for counties and zip codes
are only provided for locations within the United States, as defined by
the County.csv and ZipCode.csv files, respectively.
— You can modify the .csv tables to only include the locations
relevant to your data.
— For locations within the United States, rather than including city
information directly in your data, you can instead include only zip
code information. Using this zip code data, MicroStrategy can
accurately determine the latitude and longitude of the location,
and you can also select to create City of Zipcode, State of
Zipcode, and Country of Zipcode attributes.
Once you import your geographical data into MicroStrategy, you can then
use the Map widget and map visualizations to display and analyze the
geographical data. For steps to create and configure the Map widget, refer
to the MicroStrategy Mobile Administration Help. For steps to create and use
map visualizations as part of Visual Insight, refer to the MicroStrategy Web
Help.
During the process of importing data into MicroStrategy using the Data
Import feature, you can allow MicroStrategy to create additional time-related
data for your imported data. This can help to define your data more
specifically when it comes to time information.
When importing your data, the contents of the data is analyzed to determine
whether it is in a format that supports dates or times. MicroStrategy can
automatically recognize date and time data that meets the following criteria:
• The data uses a valid date or date and time format. Date data can include
month, day, and year information in the format MM/DD/YYYY, where MM
is a two digit month, DD is a two digit day, and YYYY is a four digit year.
Date and time data can include month, day, and year information in the
same date format described above, as well as time information in the
format HH:MM:SS. For time data, HH is a two digit hour value, MM is a
two digit minute value, and SS is a two digit second value. A complete
entry for data that includes date and time information can have the format
MM/DD/YYYY HH:MM:SS.
▫ Week: Includes data such as Week 50, 2011, Week 51, 2011, and
Week 52, 2011.
If you already have columns of data for any of these date categories,
when importing your data you can choose to not create these attributes
and instead use the attributes that are created based off of your data.
If you already have columns of data for any of these time categories,
when importing your data you can choose to not create these attributes
and instead use the attributes that are created based off of your data.
Once you import your data into MicroStrategy, you can then include any of
the time attributes that were automatically created during the import process
on your reports, documents, and dashboards. For steps to analyze the data
you have imported using Data Import, refer to the MicroStrategy Web Help.
MicroStrategy metadata
All schema objects, application objects, configuration objects, and project
settings are stored in the MicroStrategy metadata. Metadata is stored in a
relational database with a predefined structure. The RDBMS for the
metadata and warehouse do not need to be the same.
You can find the list of supported RDBMS platforms in the Readme that is
installed with MicroStrategy products. To view the Readme, from the Start
menu select Programs, then MicroStrategy Documentation, and then
select Readme.
Metadata shell
Before you can populate the metadata repository with data, the necessary
tables to hold the data must be present. The metadata shell is the set of
blank tables that are created when you initially implement a MicroStrategy
business intelligence environment.
You create the metadata shell with the MicroStrategy Configuration Wizard,
which creates the blank tables and populates some of the tables with basic
initialization data.
This first step in the project creation process is outlined in Creating the
metadata repository, page 89.
Project source
The project source is a configuration object which represents a connection
to a metadata repository. In MicroStrategy Developer, the project source
appears in the Folder List with an icon that varies depending on the type of
connection it represents. A connection to a metadata repository is achieved
in one of two ways:
Database instance
The database instance is a configuration object that represents a connection
to a data source. When you define a project, you specify the data source
location by creating and selecting a database instance with the appropriate
connection parameters.
Project
A project is where you build and store all schema objects and information
you need to create application objects such as reports in the MicroStrategy
Before proceeding to the next section, make sure your metadata repository
exists in a non-Microsoft Access database. An Access database is
unsuitable for a production project.
These tables are populated with your project information during the project
creation step in the Project Creation Assistant, outlined in Creating a
production project, page 91.
• If you do not have the MultiSource Option, your projects can only
connect to a single database instance.
• Tables
• Facts
• Attributes
With the Project Creation Assistant or Architect, you create and configure a
project and some of the essential schema objects that reside within it. The
intended audience for these tools includes experienced project creators who
have planned all their facts, attributes, and data relationships. This
information is covered elsewhere in this guide. For a listing of information
covered in specific chapters, see Planning your project, page 92 below.
One of the many benefits of the Project Creation Assistant and Architect is
their ability to create multiple schema objects at one time. Since you can
efficiently add multiple tables and develop numerous attributes and facts, it
is especially useful for large projects which contain many tables and schema
objects. With the Project Creation Assistant or Architect, you can also create
attributes with many-to-many relationships.
• The logical data model you intend to use for this project; logical data
models are covered in Chapter 2, The Logical Data Model.
• The tables to use in the project; physical warehouse schema models are
covered in Chapter 3, Warehouse Structure for Your Logical Data Model.
• The facts to include in the project and the data types used to identify
them; facts are covered in Chapter 6, The Building Blocks of Business
Data: Facts.
• The attributes to create in the project and the data types used to identify
them, including:
While you can add and define multiple tables, facts, and attributes for your
project, each is provided as a separate step in the step-by-step creation of
your project.
Also, Project Creation Assistant is intended to be used for the initial creation
of your project, and thus cannot be used to modify an existing project. Once
a project has been created, you must use Architect or the individual schema
editors and wizards to modify the project.
Architect provides a centralized interface which allows you to define all the
required components of your project and perform the various tasks to create
a project.
Both tools provide options to automatically create facts and attributes based
on the columns and data available in your data source. Automatic fact and
attribute creation can save a substantial amount of time in the creation of a
project.
Project
Creation
Project Creation Assistant Architect
Task or
Feature
Project
Creation
Project Creation Assistant Architect
Task or
Feature
Can create
User hierarchies cannot be
user User hierarchies can be created
hierarchies
created
Automatic
Can automatically create
creation of Can automatically create facts and attributes
facts and attributes based on
facts and based on rules
attributes rules
Initializing the project means giving the project a name and selecting the
metadata repository in which to create the project—that is, the project
source. It also includes defining which languages are available in the
project for the internationalization of metadata object information.
After you specify these settings, the shell of a project is created in the
metadata. This configures the folder structure and default connectivity
settings. Be aware that this process can take some time to complete.
In this step, you use the Warehouse Catalog to specify which data
warehouse tables to include in your project.
3 Create facts.
4 Create attributes.
You should complete all the steps in the Project Creation Assistant at the
same time. While you can save an incomplete project definition, you cannot
finish creating it later with the Project Creation Assistant. Instead, you must
complete it using the appropriate interface, such as the Warehouse Catalog,
Fact Creation Assistant, or Attribute Creation Assistant.
2 From the Schema menu, select Create New Project. The Project
Creation Assistant opens, as shown below:
• Name: A name for the project. This name is used to identify a project
within a project source.
• Enable the guest user account for this project: Select this check
box to allow users to log in to a project without any user credentials.
• Enable Change Journal for this project: Select this check box to
enable the Change Journal for the project. An entry is automatically
included in this journal when any object in a project is modified,
allowing you to keep track of any changes to your project. For
information on the Change Journal, see the System Administration
Help.
▫ If you plan to use translated data from your data source with
attributes in a project, you must define how data
internationalization is enabled before creating attributes.
Enabling data internationalization is described in Enabling data
internationalization for a project, page 103.
5 Click OK.
Proceed to the next section below (Adding tables using the Warehouse
Catalog, page 99) to determine the tables to be used in your project.
The Warehouse Catalog queries the data source and lists the tables and
columns that exist in it. From this list, you select the lookup, fact, and
relationship tables to use in your new project. You should also include all
other tables needed to complete your project, including transformation
tables, aggregate tables, and partition mapping tables.
The database login you use must have read privileges so you are able to
view the tables in the selected warehouse. Database instances and
database logins are MicroStrategy objects that determine the warehouse to
which a project connects. To learn more about these objects, refer to the
Installation and Configuration Help.
To add and remove tables to the project using the Warehouse Catalog
2 Select a database instance from the drop-down list and click OK. The
database instance selected in this dialog box determines which data
source is accessed. The Warehouse Catalog opens.
If you have the MultiSource Option, you can add tables from multiple data
sources into your project. For information on adding tables from multiple
data sources into your project with the Warehouse Catalog, see
Accessing multiple data sources in a project, page 350.
3 The left side of the Warehouse Catalog lists all available tables and the
number of rows each table contains. The list on the right shows all the
tables currently being used in the project, if any:
4 From the left side, select the tables you want to add to the Warehouse
Catalog, and click > to add the selected tables. Click >> to add all the
listed tables.
5 To remove tables from your project, select them from the right side and
click < to remove them. Click << to remove all the tables from your
project.
War eh o u se Cat al o g o p t i o n s
For example you can view rows in a table, specify a table prefix, copy a
table, or specify a database instance for a table. For more information on
these abilities and how to use them, see Managing warehouse and
project tables, page 327.
For example, you can change the database instance, customize how
tables and columns are read from the database system catalog, display
extra table and row information, and decide whether schema objects are
mapped automatically or manually. For more information on these
abilities and how to use them, see Modifying data warehouse connection
and operation defaults, page 334.
8 In the toolbar, click Save and Close to save your changes to the
Warehouse Catalog. The table definitions are written to the metadata.
This process can take some time to complete.
After exiting the Project Creation Assistant, you can still access the
Warehouse Catalog to add additional tables. For steps to access the
Warehouse Catalog to add tables to a project, see Adding and removing
tables for a project, page 325.
The next step in the Project Creation Wizard involves creating schema
objects: facts and attributes. Follow the instructions outlined in Creating
facts and attributes, page 110 and Configuring additional schema-level
settings, page 110 to learn how to create these schema objects and
configure additional schema-level settings for those objects.
The attribute elements for the Month of Year attribute can be supplied in
multiple languages through data internationalization. For example, the
January, February, and March attribute elements are displayed as Januar,
Februar, and März for users that are defined to view data in German.
If you plan to use internationalized data with your attributes, you should
define how data internationalization is enabled before creating attributes. By
For information on configuring your data source to use tables and columns
to identify translated data, see Internationalization through tables and
columns or databases, page 61.
Prerequisites
• A project has been created.
4 Select the Enable data internationalization check box, and then select
the SQL based option.
6 For each language, include suffixes for the columns and tables that
contain your translated data.
Click ... in the Column Pattern for a language, to include suffixes for
columns. Click ... in the Table Pattern for a language, to include suffixes
for tables. For example, if your data source includes Spanish data in
columns that end in _ES, type _ES in the Column Pattern.
The Column Pattern and Table Pattern options expect suffixes to identify
your internationalized columns and tables. If you use prefixes or other
naming conventions, you can use the functions listed below to identify
the columns and tables that contain translated data:
Concat("Prefix",#0)
Concat("ES_",#0)
Prerequisites
• A project has been created.
4 Select the Enable data internationalization check box, and then select
the Connection mapping based option.
To create and modify a project, you must be able to edit the schema objects
of a project. If another user is editing a schema object, this can lock the
schema from being edited by other users. This maintains the integrity of the
project schema.
However, if some users only want to use the various schema editors to view
the definitions of project schema objects to learn more information about
them, they can use read only mode. This allows another user to modify the
schema, while other users can view the schema objects without making any
modifications.
The mode can be chosen in the Read Only dialog box that opens when
opening any schema editor, which has the following options:
• Read Only: Read only mode allows you to view the schema objects
without locking the schema from other users. However, you cannot make
any changes to the schema object.
If you open a schema editor in read only mode, the entire project is
enabled to use read only mode. This means that every schema editor
automatically opens in read only mode. However, from the Schema menu
in Developer, you can clear the Read Only option to switch to edit mode.
If you have a schema editor open, you must close and re-open the
schema editor to switch to edit mode for that schema editor.
If you are working in read only mode, you cannot access schema editors
that require the ability to make updates to the project, which includes the
If you open a schema editor in edit mode, the entire project is enabled to
use edit mode. This means that every schema editor automatically opens
in edit mode. However, from the Schema menu in Developer, you can
select the Read Only option to switch to read only mode. If you have a
schema editor open, it is also switched to read only mode automatically
and you cannot make any changes to schema objects.
You must use edit mode to access schema editors that require the ability
to make updates to the project, which includes the Attribute Creation
Wizard, Fact Creation Wizard, Warehouse Catalog, MDX Cube Catalog,
and the options to update the project schema.
If you select this check box, this becomes the default mode for all schema
editors and you cannot change the default mode. However, you can switch
between read only mode and edit mode in Developer, from the Schema
menu, by selecting or clearing the Read Only Mode option.
• Fact definitions: The Fact Editor allows you to create, edit, and
configure facts one at a time. This is covered in Creating and modifying
simple and advanced facts, page 210.
Architect also allows you to create, edit, and configure any and all facts
for your project. This is covered in Creating and modifying facts, page
152.
• Attribute definitions: The Attribute Editor allows you to create and edit
attributes, attribute relationships, attribute forms, and attribute form
expressions for attributes one at a time. This is covered in Adding and
modifying attributes, page 255.
Architect also allows you to create and edit any and all attributes,
attribute relationships, attribute forms, and attribute form expressions for
your project. This is covered in Creating and modifying attributes, page
166 and Defining attribute relationships, page 193.
Architect also allows you to create any and all user hierarchies for your
project. This is covered in Creating and modifying user hierarchies, page
200.
▫ The tools used to create aggregate tables and partitions are the
Warehouse Catalog, the Metadata Partition Mapping Editor, and the
Warehouse Partition Mapping Editor. This information is covered in
Chapter 8, Optimizing and Maintaining Your Project.
Now that you have completed most of the key steps in creating a new
project, proceed to the chapters referenced above to complete the next
steps in the project creation process.
Facts and attributes provide the backbone of the reports and documents
created by report designers. Facts are used to create metrics, and metrics
and attributes are essential components of reports.
Metrics, and other report objects such as filters, custom groups, and
prompts, are beyond the scope of this guide. For a complete discussion of
metrics, filters, reports, and other report objects, see the Basic Reporting
Helpand the Advanced Reporting Help.
To learn more about how to deploy your project using MicroStrategy Web,
see the Installation and Configuration Help.
CREATIN G A PROJECT
U SIN G A RCH ITECT
Pr er eq u i si t es
2 From the Schema menu, select Create New Project. The Project
Creation Assistant opens, as shown below:
• Name: A name for the project. This name is used to identify a project
within a project source.
• Enable the guest user account for this project: Select this check
box to allow users to log in to a project without any user credentials.
Users can then to connect to Intelligence Server with a limited set of
privileges and permissions (defined by the Public group).
• Enable Change Journal for this project: Select this check box to
enable the Change Journal for the project. An entry is automatically
included in this journal when any object in a project is modified,
allowing you to keep track of any changes to your project. For
information on the Change Journal, see the System Administration
Help.
6 Click the arrow for Architect. The Warehouse Database Instance dialog
box opens.
To continue creating the project with the Project Creation Assistant, see
Creating a new project using the Project Creation Assistant, page 95.
10 Define the various options for how Architect displays data, automatically
creates and maps schema objects, loads the Warehouse Catalog, and
updates the project's schema.
Reviewing and defining these options before using Architect can save
you a lot of time when creating and modifying projects. For information on
all the options available, see Creating and modifying projects, page 114.
11 Click OK. You can now begin to add tables to your project, and create
attributes, facts, user hierarchies, and so on. These tasks are listed
below:
Modifying your project using Architect also allows you to lock the schema of
your project, preventing users from encountering reporting issues or
returning outdated data during periods of scheduled project maintenance.
When opening a project with Architect, basic information is loaded for all the
objects in a project. These objects include attributes, facts, tables, and so
on. Once the project is open and accessible in Architect, additional
information for the objects are loaded incrementally as well as on an as-
needed basis. This allows Architect to load projects faster than if all
information for a project was loaded when first opening the project in
Architect.
Pr er eq u i si t e
• If you are only given the option of opening Architect in read only
mode, this means another user is modifying the project's schema.
You cannot open Architect in edit mode until the other user is
finished with their changes and the schema is unlocked.
• For information on how you can use read only mode and edit mode
for various schema editors, see Using read only or edit mode for
schema editors, page 108.
5 Define the various options for how Architect displays data, automatically
creates and maps schema objects, loads the Warehouse Catalog, and
updates the project's schema.
The options you can define determine how Architect displays data,
automatically creates and maps schema objects, loads the Warehouse
Catalog, and updates the project's schema. Some of these options are
available in the MicroStrategy Architect Settings dialog box. For steps to
access this dialog box, see Accessing the Architect options, page 122. The
available options are described in the sections listed below:
• Controlling the view that is displayed when starting Architect, page 123
You can also access various Architect options from the Architect toolbar, as
described below:
▫ In the View area, click the arrow icon ( ) to access the following
configurations:
▫ In the Auto Arrange area, click the arrow icon ( ) to access the
following configurations:
▫ In the Auto Recognize area, click the arrow icon ( ) to access the
following configurations:
▫ In the Editors area, click the Edit logical size of tables icon (shown
below) to access the Logical Size Editor, which provides access to the
following configurations:
• Last Used: Select this option to display the view that was used last
during the most recent use of Architect.
• Project Tables View: Select this option to display the Project Tables
View.
You can define how attributes and facts are created when tables are added
to your project by defining the automatic column recognition rules. To
access the options listed below, from the Design tab, in the Auto
Recognize area, click the arrow icon ( ):
This can be a good option to use if you are updating a project in which
you have already defined the bulk of the project schema. In this scenario,
it prevents Architect from automatically defining attributes and facts that
might not be needed in the project. After adding extra tables to your
project you can create any required attributes and facts in a way that fits
your current project schema.
This option can save time during the schema creation process of
designing a project by allowing Architect to automatically create
attributes and facts.
When selecting this option, facts are created for database columns that
use numeric data types and are not used for attribute forms. Attributes
and attribute forms are created based on various schema creation
heuristics and the rules that you define with the Advanced Options
listed below:
You can also define how the attribute name is created. Use the
vertical bar (|) to define what the suffix is replaced with in the
resulting attribute name. The text to the left of the | character is the
suffix, and the text to the right of the | character is what replaces the
suffix in the attribute name that is created.
For example, including ID|; creates new attributes for any database
columns that use the suffix ID, and removes the ID suffix from the
You can also define how the attribute form name is created. Use the
vertical bar (|) to define what the suffix is replaced with in the
resulting attribute form name. The text to the left of the | character is
the suffix, and the text to the right of the | character is what replaces
the suffix in the attribute form name that is created.
▫ Auto recognize form format: Select this check box to define when
attribute form formats are applied to newly created attribute forms.
Attribute form formats control how the form is displayed and how
filters are defined. For example, specifying a format type of Big
Decimal allows users to preserve precision when qualifying on a form
with more than 15 digits. For more detailed information on each form
format type, see Format types, page 586.
You can define rules on when to apply attribute form formats by using
the Options listed below:
— Default form format: Select the form format to use for forms that
do not fit any of the other form format rules. The default selection
is Text. You cannot define the rules for when to use the default
form format, as it is implicitly defined to be used when all other
form format rules are not met.
— Form format: Select a form format, and define the rules for
applying the form format to newly created attribute forms. The
rules for when to apply a certain form format are defined by the
options listed below. If you supply neither a column data type nor a
column naming rule for a form format, the form format is never
automatically applied to a newly created attribute form.
An attribute form can only have one form format. The rules for each form
format should be defined so that they are all mutually exclusive. If an
attribute form meets the rule requirements of more than one form format,
the first form format in the Form format list is applied to the form.
existing attribute forms and facts automatically when you add tables to your
project.
You can enable the automatic mapping of columns to attribute forms and
facts in your project when tables are added to your project by selecting the
Use automatic column mapping check box. To access this option, from the
Design tab, in the Auto Recognize area, click the arrow icon ( ).
When this option is enabled and tables are added to your project, the column
expressions included in the table are compared to the column expressions
used in attribute forms and facts. If an attribute form or fact is found that
matches the column expression, then the column is mapped to that attribute
form or fact. For example, the MicroStrategy Tutorial project maps the
Revenue fact to the column TOT_DOLLAR_SALES. If automatic column
mapping is enabled and you use Architect to add a table that includes the
TOT_DOLLAR_SALES column to the project, the TOT_DOLLAR_SALES
column for the table is automatically mapped to the Revenue fact.
While enabling or disabling this option, you can also select or clear the
Display message if objects are not recognized check box. If this check
box is selected, which it is selected by default, a message is displayed
during the automatic creation of schema objects if some of these objects are
not created. By clearing this check box, this message is never displayed.
The display of data available in the tables included in your project can be
defined using the options listed below.
To access the options listed below, from the Home tab, in the View area,
click the arrow icon ( ).
Prior to selecting options in the Project Tables view area, you must choose
to display the data available in tables in either physical view or logical view.
This can be defined using the following Architect toolbar options:
display the columns that are available in the table. Columns are
displayed in the form Column_Name : Column_Data_Type. For
example, the YR_CATEGORY_SLS table from the MicroStrategy Tutorial
project shown below is displayed in physical view:
If you display tables in physical view, the options in the Project Tables
View area have no affect on the display of data within the tables in
Architect.
display the columns that are available in the table and how they relate to
If you display tables in logical view, the options in the Project Tables
View area can be used to modify the display of data within tables in
Architect. These options are described below:
In the LU_YEAR table shown above, selecting this option displays the
PREV_YEAR_ID : INTEGER column which has not been mapped to a
schema object.
You can also display this information for an individual table by right-
clicking a table, pointing to Properties, then pointing to Logical
View, and selecting Display Available Columns.
Selecting this option also allows you to select the option described
below:
In the LU_YEAR table shown above, selecting this option displays the
ID form and the Date form for the attribute Year.
You can also display this information for an individual table by right-
clicking a table, pointing to Properties, then pointing to Logical
View, and selecting Display Attribute Forms.
• Maximum number of visible links per table row: Define the number of
link lines that are displayed when you select a column, fact, attribute, or
attribute form in a table. When selecting one of these objects in a table, a
line is drawn to each occurrence of this object in other tables included in
the project. For example, selecting the Year attribute in the LU_YEAR
table displays a line that connects to every other occurrence of the Year
attribute in other tables.
You can disable the ability to add new tables to your project using Architect
by selecting the Disable loading warehouse catalog check box. This
option is available in the Configuration tab of the MicroStrategy Architect
Settings dialog box. Any tables not included in the project are hidden from
view in Architect.
Updating your project schema every time that you exit Architect can be
disabled. The schema update process can require a substantial load on your
Intelligence Server and require a considerable amount of time to complete.
You may also have other project updates that you plan to perform after using
Architect. In these scenarios, you can disable the project schema update
process, and instead execute a schema update manually at the desired time.
You can disable the project schema update process from occurring when
closing Architect by clearing the Update schema after closing Architect
check box. This option is available in the Configuration tab of the
MicroStrategy Architect Settings dialog box.
The options to create metrics based on the facts of your project are
available in the Metric Creation tab of the MicroStrategy Architect Settings
dialog box. On this tab, you can allow the automatic creation of metrics
using the aggregation functions listed below:
Average %1
If you create a fact named Cost and select to create metrics with the Avg
aggregation function, a metric with the name Average Cost is created by
substituting the fact name for the %1 characters in the metric naming
convention.
When a fact is created for a project, metrics are created for the fact using
the selected aggregation functions. A separate metric is created to support
each aggregation of a fact. The metrics are created in the
Public Objects/Metrics folder of a MicroStrategy project.
Attribute relationships are created based on the rules that you select in
the Advanced Options, as described below:
Architect analyzes sample data for the table. The attributes with fewer
distinct values are defined as parents of the attributes with more
distinct values, using a one-to-many relationship from the parent
attribute to the child attribute. For example, a lookup table includes
four rows of data, which include data related to year and quarter.
Each row includes the same year (for example, 2009), but the quarter
changes for each row (Q1, Q2, Q3, Q4). In this case, the Year
attribute is created as a parent of the Quarter attribute.
After all relationships are determined by the rules that you selected,
Architect performs a final analysis on the attribute relationships that are
to be created. Any attribute relationships that are found to be redundant
are not created. This ensures that attribute relationships are created that
properly reflect the design of the data in your data source. For
To access the options listed below, from the Home tab, in the Auto Arrange
area, click the arrow icon ( ).
• Margin to the left: Type the number of pixels to use as a margin for the
left side of the Architect working area. This provides white space at the
left margin of the working area, which can provide visual separation
between the working area and the other panes and options available on
the Architect interface.
• Margin to the right: Type the number of pixels to use as a margin for the
right side of the Architect working area. This provides white space at the
right margin of the working area, which can provide visual separation
between the working area and the other panes and options available on
the Architect interface.
would provide the same data. The table with the lowest logical table size is
used, as a lower logical table size means the table has a higher level of
aggregation. The performance of accessing a table with a higher level of
aggregation is usually better than accessing a table with a lower level of
aggregation.
To access the options listed below, in the Editors area, click the Edit
logical size of tables icon (shown below) to access the Logical Size Editor.
• Size value: Displays the current size value for each table. Architect
initially assigns logical table sizes based on an algorithm that takes into
account the number of attribute columns and the various levels at which
they exist in their respective hierarchies. See Defining logical table sizes,
page 505 for details on how table sizes are calculated.
You can click in the Size value cell for a table to manually define the
logical size for the table. You can then lock the table size for the table to
ensure that this manual value is retained.
• Row count (optional): This column displays the number of rows in each
table. Click the Display each table row count in the editor icon ( ) to
The options that are available on the toolbar are determined by whether you
are in Project Tables View or Hierarchy View. To review detailed information
on each toolbar option, with Architect open, press F1 to open the Architect
Help and search for the topic Architect: Toolbar options.
You can also use the Warehouse Catalog to add tables to and remove
tables from your project, as described in Creating a new project using the
Project Creation Assistant, page 95.
Architect displays all of the available data sources for the project in the
Warehouse Tables pane, as shown below.
If the Warehouse Tables pane is not displayed in Architect, from the Home
tab, in the Panels area, click Show the Warehouse tables section. The
Warehouse Tables pane is only available in the Project Tables View of
Architect.
Within each data source is a list of all the tables in the data source to which
you are connected through a database instance. From this list, you select
the lookup, fact, and relationship tables to use in your new project. You
should also include all other tables needed to complete your project,
including transformation tables, aggregate tables, and partition mapping
tables.
The database login you use must have read privileges so you are able to
view the tables in the selected data source. Database instances and
database logins are MicroStrategy objects that determine the data sources
to which a project connects. To learn more about these objects, refer to the
Installation and Configuration Help.
Using Architect, you can perform the following tasks to add, remove, update,
and manage tables for your project:
Pr er eq u i si t es
• A database instance has been created for the data source. For
information on database instances and examples on how to create them,
see the Installation and Configuration Help.
2 From the list of data sources, you can display or hide a data source:
• Clear a check box for a data source to hide it in Architect. You cannot
hide a data source that is used in a project.
Adding tables
Before you can begin creating attributes, facts, and hierarchies for your
project, you must add tables to your project.
Along with making data available in your project, adding tables to your
project can also trigger the creation of attributes and facts, and the mapping
of columns to attributes and facts. For information on defining how attributes
and facts are created and mapped when adding tables to your project, see
Defining project creation and display options, page 121 and Defining project
creation and display options, page 121.
Once tables are selected from the data source and added to your project,
they become schema objects known as logical tables in MicroStrategy.
Logical tables are representations of the tables that are available in the
data warehouse, and are discussed in detail in Appendix B, Logical Tables.
The procedure below provides steps to add tables to your project using
Architect.
Pr er eq u i si t es
• If changes have been made to the tables within the tables' data source,
you must update the structure of the tables in MicroStrategy to ensure
they can be added to a project successfully. For steps to update table
structures, see Updating, modifying, and administering tables, page 144.
If you have the MultiSource Option, you can add tables from multiple data
sources into your project. For information on adding tables from multiple
data sources into your project with the Warehouse Catalog or Architect,
see Accessing multiple data sources in a project, page 350.
3 Right-click a table, and then select Add Table to Project. The table is
added to the project and included in the Project Tables View of Architect.
To view a sample of the data within a table, right-click the table and select
Show Sample Data.
Attributes, attribute forms, and facts that can be created based on the
columns of the table added to the project are displayed. Select the check
box for each object to create in the table when the table is added to the
project. If more than one attribute form is available for creation for an
attribute, you must select the ID form. Any other attribute forms for that
attribute are optional. Click OK to complete the processes of adding the
table to the project and creating any selected attributes, attribute forms,
and facts.
5 Once you have imported tables for your project, you can continue with
other project design tasks, which include:
Removing tables
You can remove tables from your project to keep your project from becoming
cluttered with tables that are no longer required for your project. You can
remove a table from a project using Architect by accessing Project Tables
View, right-clicking a table, and selecting Delete.
However, you cannot remove a table from a project if schema objects in the
project are dependent on the table. For example, an attribute is dependent
on the table that is set as the lookup table for the attribute.
When you attempt to remove a table that has dependent objects, you can
view a list of dependent objects for the table. You must first delete all
dependent objects from the project before you can delete the table.
The steps below show you how to perform this task using Architect. To
remove these tables using the Warehouse Catalog, see Managing
warehouse and project tables, page 327.
If tables that were not included in a project are removed from the data
source, these tables are automatically removed from the display of available
tables in Architect.
To remove tables from a project that have been removed from a data
source
• If you are only given the option of opening Architect in read only
mode, this means another user is modifying the project's schema.
You cannot open Architect in edit mode until the other user is
finished with their changes and the schema is unlocked.
• For information on how you can use read only mode and edit mode
for various schema editors, see Using read only or edit mode for
schema editors, page 108.
4 If the Warehouse Tables pane is not displayed, from the Home tab, in the
Panels area, click Show the Warehouse tables section.
5 In the Warehouse Tables pane, expand the database instance for the
data source, which has had tables removed. The Warehouse Catalog
dialog box opens. If this dialog box does not open, there are no tables
that need to be removed from the project.
6 Select the check box for a table to remove it from the project.
7 After you have selected all the tables to delete, click OK to remove the
tables that were selected to be deleted and return to Architect.
9 From the Home tab, in the Save area, click Save and Update Schema to
save your changes.
Updating tables
With Architect, you can update individual tables or all of the tables for a data
source at once. This ensures that the data available in your project is up to
date with any changes made to the tables in the data source. The procedure
below describes how to update tables using Architect.
Pr er eq u i si t e
2 From the Warehouse Tables pane, you can update all tables for a data
source or update individual tables as described below:
• To update all tables for a data source, right-click a data source, and
select Update. All the tables for the data source are updated to reflect
their definitions in the data source.
When you select a table in Architect, the Properties pane allows you to
modify and view table definitions as described below.
You can select a property in the Properties pane to view a description of the
property. The description is displayed at the bottom of the Properties pane.
When you select a table in Architect, the Definition section of the Properties
pane displays the various properties for the table. These properties and how
to use them are described below:
• ID: The identifier of the table. You cannot modify this value.
Objects that are hidden are not displayed to a user unless the user has
changed his or her Developer Preferences and selected the Display
hidden objects check box. Therefore, defining an object as hidden does
not necessarily prevent users from viewing or accessing an object. The
best way to prevent users from viewing or accessing an object is to
restrict the user permissions for it.
• Database Name: The name of the table in the data source. If the name of
a table has changed in the data source, you can type the new name for
the table in this property. This allows a MicroStrategy project to locate a
table after its name has changed in its data source.
• Row Count: The number of rows in the table. To calculate a table's row
count, right-click the table and select Calculate Row Count.
The Calculate Row Count option is displayed only if the data source for the
table is expanded in the Warehouse Tables pane.
• Table Name Space: The table name space for a table in a data source.
For information on table name spaces, see Modifying data warehouse
connection and operation defaults, page 334.
• Logical size locked: Specifies whether the logical size of a table can be
modified. Select the check box to set the value to True, which locks the
table's logical table size.
When you select a table in Architect, the Mapped Attributes section of the
Properties pane displays the attributes that are mapped to columns in the
table. From the Properties pane, you can select a column mapped to an
attribute form and click the ... button to open the Modify Form Expression
dialog box. From this dialog box, you can modify the attribute form
expression.
When you select a table in Architect, the Mapped Facts section of the
Properties pane displays the facts that are mapped to columns in the table.
From the Properties pane, you can select a column mapped to a fact and
click ... (the browse button) to open the Modify Fact Expression dialog box.
From this dialog box, you can modify the fact expression.
Modifying colum n nam es and data types in a table: Mem ber Colum ns
section
When you select a table in Architect, the Member Columns section of the
Properties pane displays the columns that are available in the table. From
the Properties pane, you can select a column and click the ... button to open
the Column Editor dialog box. From this dialog box, you can modify the
column name and data type.
You can modify the column name and data type if this information has
changed in the data source. This allows a MicroStrategy project to be able to
locate a column after it has been renamed in the data source.
Pr er eq u i si t e
2 From the Warehouse Tables pane, right-click a data source and select
Warehouse Catalog Options. The Warehouse Catalog options dialog
box opens.
• Read Settings: These options allow you to customize the SQL that
reads the Warehouse Catalog for every platform except Microsoft
Access. For information on these options, see Modifying data
warehouse connection and operation defaults, page 334.
In the Project Tables View of Architect, you can select one or more tables
and define the group of tables as a layer. This layer can be accessed from
the Layers drop-down list to focus on only the tables included in the layer.
Any modifications performed while viewing a layer are applied to the project
as a whole.
For example, you can select all of the fact tables in your project and create a
new layer named Fact Tables. This allows you to quickly focus on only the
fact tables included in your project.
The All Project Tables layer is a default layer that includes all tables
included in a project. This layer cannot be deleted.
• If you are only given the option of opening Architect in read only
mode, this means another user is modifying the project's schema.
You cannot open Architect in edit mode until the other user is
finished with their changes and the schema is unlocked.
• For information on how you can use read only mode and edit mode
for various schema editors, see Using read only or edit mode for
schema editors, page 108.
4 From the Project Tables View, select all the tables to include in a layer.
To remove a table from a layer, right-click the table, and select Remove
From Layer.
5 From the Home tab, in the Layer area click the Create New Layer
option. A dialog box to name the layer opens.
6 In the Please enter the layer name field, type a name for the layer and
click OK. You are returned to Architect and the new layer is displayed in
the Project Tables View.
This section describes how to use Architect to create and modify facts,
which includes:
Before you create facts for your project, you can select the type of metrics
that are created automatically when a fact is created for a project. This can
reduce the time it takes to create the basic metrics for your project. For
information on configuring Architect to automatically create these basic
metrics, see Defining project creation and display options, page 121.
Creating facts
With Architect you can create facts as part of your initial project design
effort as well as throughout the entire life cycle of a project.
To save the time it takes to create all the facts required for your project, you
can allow Architect to automatically create facts when tables are added to
your project. When tables are added to the project using Architect, facts are
created for columns in tables that use numeric data types and are not used
for attribute forms. To enable this automatic fact creation, see Defining
project creation and display options, page 121.
Pr er eq u i si t es
• The procedure below assumes you have already created a project object
and added tables to the project. For information on creating a project
using Architect, see Creating projects using Architect, page 115.
• If you are only given the option of opening Architect in read only
mode, this means another user is modifying the project's schema.
You cannot open Architect in edit mode until the other user is
finished with their changes and the schema is unlocked.
• For information on how you can use read only mode and edit mode
for various schema editors, see Using read only or edit mode for
schema editors, page 108.
4 From the Project Tables View, locate and select the table that includes
a column or columns to use in a fact definition.
5 Right-click the table and select Create Fact. A dialog box opens to name
the fact.
a Right-click the table, point to Recognize, and then select Facts. The
Results Preview dialog box opens.
— Facts can be created for columns in tables that use numeric data
types and are not used for attribute forms, as described in Defining
project creation and display options, page 121.
c Click OK. The facts you selected for creation are created within the
table. If you use this option to create simple facts, you can then skip
to To define fact expressions and column aliases, page 156.
6 Type a name for the fact, and click OK. The Create New Form Expression
dialog box opens to create a fact expression.
7 From the Available columns pane, drag and drop a column into the
Form expression pane.
You can include multiple columns as well as use numeric constants and
mathematical operators and functions to create a fact expression. For
information on creating various types of fact expressions, see Mapping
physical columns to facts: Fact expressions, page 219.
• Automatic mapping means that all of the tables in the project with the
columns used in the fact expression are selected as possible source
tables for the fact. You can then remove any tables mapped
automatically and select other tables.
• Manual mapping means that all of the tables in the project with the
columns used in the fact expression are located but are not selected
as possible source tables for the fact. You can then select which of
those tables are used as source tables for the fact. Other scenarios in
which you should use the manual mapping method include:
▫ If the same column name does not contain the same data across
different tables, manually select the appropriate source tables for
each fact.
For example, suppose you have a column named Sales, which exists
in both the Fact_Sales table and the Fact_Discount table. In the
Fact_Sales table, the Sales column contains revenue data.
However, in the Fact_Discount table, the Sales column contains
discount data. In other words, although the column name is the same
in both tables (Sales), the columns contain different fact data in each
table. When creating the Revenue fact, you must select the Manual
mapping method so you can select the Fact_Sales table as a source
table for the Revenue fact. When creating the Discount fact, you must
select the Manual mapping method so you can select the Fact_
Discount table as a source table for the Discount fact. If you use the
Automatic mapping method in both cases, the MicroStrategy SQL
Engine may use the incorrect column for the facts.
9 Click OK to close the Create New Form Expression dialog box and create
the fact. The fact is displayed in the table used to create the fact.
10 You can continue to define the fact by right-clicking the fact and selecting
Edit. The Fact Editor opens. Use the tabs of the Fact Editor to define fact
expressions and create column aliases as described below:
• Column Alias: This tab allows you to create a column alias for the
fact. Column aliases are discussed in Fact column names and data
types: Column aliases, page 225.
• For detailed information about the options on each tab within the
Fact Editor, refer to the MicroStrategy Developer Help (formerly
MicroStrategy Desktop Help).
12 From the Home tab, in the Save area, click Save and Update Schema to
save your changes.
You cannot create fact level extensions using Architect. For information on
how to create fact level extensions, see Modifying the levels at which facts
are reported: Level extensions, page 228.
• Creating and modifying fact column names and data types: Column
aliases, page 164
When selecting a fact in Architect, the Properties pane allows you to modify
and view facts as described below.
You can select a property in the Properties pane to view a description of the
property. The description is displayed at the bottom of the Properties pane.
When you select a fact in Architect, the Definition section of the Properties
pane displays the various properties for the fact. These properties and how
to use them are described below:
• ID: The identifier of the fact. You cannot modify this value.
• Hidden: Specifies whether the fact is defined as hidden. Select the check
box to set the value to True, which defines the table as hidden.
Objects that are hidden are not displayed to a user unless the user has
changed his or her Developer Preferences and selected the Display
hidden objects check box. Therefore, defining an object as hidden does
not necessarily prevent users from viewing or accessing an object. The
best way to prevent users from viewing or accessing an object is to
restrict the user permissions for it.
When you select a fact in Architect, the Fact Expressions section of the
Properties pane displays the tables that the fact is included in, as well as the
fact expression used for the fact in that table.
In the Cost fact example shown in Modifying facts with the Properties pane,
page 157, TOT_COST is displayed as the fact expression for most of the
tables. However, the Cost fact uses a derived fact expression in the ORDER_
DETAIL table (derived fact expressions are described in Creating derived
facts and fact expressions, page 160). The Cost fact also uses a different
column name in the ORDER_FACT table (heterogeneous column naming is
described in Creating facts with varying column names: Heterogeneous
column names, page 162).
From the Properties pane, you can select a column mapped to a fact and
click the ... (browse) button to open the Modify Fact Expression dialog box.
From this dialog box, you can modify the fact expression.
A derived fact has its value determined by an expression that contains more
than just a column in a table. Any operation on a column such as adding a
constant, adding another column's values, or setting the expression to be an
absolute value creates a derived fact. In other words, you are creating a fact
from information that is available in the data warehouse.
For more information on derived facts and derived fact expressions, see
Mapping physical columns to facts: Fact expressions, page 219. The
procedure below describes how to create a derived fact using Architect, and
follows the example scenario provided in Mapping physical columns to facts:
Fact expressions, page 219.
If you are only given the option of opening Architect in read only mode, this
means another user is modifying the project's schema. You cannot open
Architect in edit mode until the other user is finished with their changes and
the schema is unlocked.
For information on how you can use read only mode and edit mode for
various schema editors, see Using read only or edit mode for schema
editors, page 108.
4 From the Project Tables View, locate and select a table that includes a
column or columns to use in a fact definition.
5 Right-click the table and select Create Fact. The Create New Form
Expression dialog box opens.
6 From the Available columns pane, drag and drop a column into the
Form expression pane.
For the example scenario, drag and drop the QTY_SOLD column to add it
to the Form expression pane.
7 With the cursor in the Form expression pane, click * (the multiplication
operator) to add it to the expression.
11 Click OK. You are returned to Architect. The derived fact is given a
default name and is displayed in the ORDER_DETAIL table.
To change the default name of the fact, right-click the fact in the table and
select Rename. Type the new name in the dialog box that appears and click
OK to save and return to Architect.
12 From the Home tab, in the Save area, click Save and Update Schema to
save your changes.
Creating facts with varying colum n nam es: Heterogeneous colum n nam es
In your warehouse, the same fact can access columns with different column
names. MicroStrategy allows you to identify heterogeneous fact column
names for each fact. With heterogeneous column names, you can refer the
same fact to multiple columns with different column names and from
different tables that identify the same quantitative value.
• If you are only given the option of opening Architect in read only
mode, this means another user is modifying the project's schema.
You cannot open Architect in edit mode until the other user is
finished with their changes and the schema is unlocked.
• For information on how you can use read only mode and edit mode
for various schema editors, see Using read only or edit mode for
schema editors, page 108.
4 From the Project Tables View, locate and select a table that includes a
column or columns to use in a fact definition.
For the example scenario, select the ORDER_FACT table. This is one of
the tables in which a heterogeneous fact column for the Units Sold fact
exists.
5 Right-click the table and select Create Fact. The Create New Form
Expression dialog box opens.
6 From the Available columns pane, drag and drop a column into the
Form expression pane.
For the example scenario, drag and drop the QTY_SOLD column to add it
to the Form expression pane.
8 Click OK. You are returned to Architect and the derived fact appears in
the ORDER_FACT table.
9 Right-click the new fact and select Edit. The Fact Editor opens and the
fact expression you just created appears in the Expressions pane.
To ad d ad d i t i o n al co l u m n s f o r h et er o gen eo u s f act s
Now you must add the other heterogeneous fact column as separate
expression for the fact.
10 Click New. The Create New Fact Expression dialog box opens.
14 Click OK. You are returned to the Fact Editor and the fact expression that
you just created appears in the Expressions pane. Now the fact that you
are creating maps correctly to its heterogeneous fact columns.
15 Click OK. You are returned to Architect. The fact is given a default name
and is now displayed in the table.
To change the default name of the fact, right-click the fact in the table and
select Rename. Type the new name in the dialog box that appears and click
OK to save and return to Architect.
16 From the Home tab, in the Save area, click Save and Update Schema to
save your changes.
data type for a fact is inherited from the data type of the column on which the
fact is defined in the data warehouse.
For information on column aliases, see Fact column names and data types:
Column aliases, page 225. The procedure below describes how to create a
column alias using Architect.
Pr er eq u i si t es
• This procedure assumes you have already created a fact with a valid fact
expression.
• If you are only given the option of opening Architect in read only
mode, this means another user is modifying the project's schema.
You cannot open Architect in edit mode until the other user is
finished with their changes and the schema is unlocked.
• For information on how you can use read only mode and edit mode
for various schema editors, see Using read only or edit mode for
schema editors, page 108.
4 Right-click the fact and select Edit. The Fact Editor opens.
6 In the Column alias area, click Select. The Column Editor - Column
Selection dialog box opens.
7 Select New to create a new column alias. The Column Editor - Definition
dialog box opens.
8 You can modify the following properties for the column alias:
• Column name: The name for the column alias. This name is used in
any SQL statements which include the fact column.
• Data type: The data type for the fact. For a description of the different
data types supported by MicroStrategy, see Appendix C, Data Types.
• Depending on the data type selected, you can specify the byte length,
bit length, precision, scale, or time scale for your column alias. For a
detailed description on each of these properties, see the
MicroStrategy Developer Help (formerly the MicroStrategy Desktop
Help).
9 Click OK to save your changes and return to the Column Editor - Column
Selection dialog box.
12 From the Home tab, in the Save area, click Save and Update Schema to
save your changes.
This section describes how to use Architect to create and modify attributes,
which includes:
Creating attributes
With Architect you can create attributes as part of your initial project design
effort as well as throughout the entire life cycle of a project.
To save the time that it takes to create all the attributes required for your
project, you can allow Architect to automatically create attributes when
tables are added to your project. When tables are added to the project using
Architect, attributes are created based on the automatic column recognition
rules that you define in Architect. To enable and define this automatic
attribute creation, see Defining project creation and display options, page
121.
Pr er eq u i si t es
• The procedure below assumes you have already created a project object
and added tables to the project. For information on creating a project
using Architect, see Creating projects using Architect, page 115.
• If you are only given the option of opening Architect in read only
mode, this means another user is modifying the project's schema.
You cannot open Architect in edit mode until the other user is
finished with their changes and the schema is unlocked.
• For information on how you can use read only mode and edit mode
for various schema editors, see Using read only or edit mode for
schema editors, page 108.
4 From the Project Tables View, locate and select a table that includes a
column or columns to use in an attribute definition.
5 Right-click the table and select Create Attribute. The Create New Form
Expression dialog box appears.
Select the check box for an attribute form to create the attribute form.
If more than one attribute form is available for creation for an
attribute, you must select the ID form. Any other attribute forms for
that attribute are optional. For example, to create an attribute
description form you must select the description form along with the
ID form for the attribute.
c Click OK. The attribute forms you selected for creation are created
within the table. If you use this option to create simple attributes, you
can then skip to To define attribute lookup tables, form expressions,
and column aliases , page 170.
6 Create a form expression for the ID form of the new attribute being
created, as described below:
• Automatic mapping means that all of the tables in the project with the
columns used in the attribute form expression are selected as
possible source tables for the attribute form. You can then clear any
tables mapped automatically or select other tables.
• Manual mapping means that all of the tables in the project with the
columns used in the attribute form expression are located but are not
selected as possible source tables for the attribute form. You can then
select which of those tables are used as source tables for the attribute
form.
To use an attribute for meaningful analysis, you must verify that it includes
a column from a fact table in its definition, or is related to an attribute that
does. For example, to use the Month attribute for analysis, you must create
a relationship to the Day attribute, which must include the DAY column from
the fact table in its definition. To create relationships between attributes,
see Defining attribute relationships, page 193.
9 Click OK to close the Create New Form Expression dialog box and create
the attribute. The attribute is given a default name and is displayed in the
table.
To change the default name of the attribute, right-click the attribute in the
table and select Rename. Type the new name in the dialog box that appears
and click OK to save and return to Architect.
10 You can continue to define the attribute by right-clicking the ID form for
the attribute and selecting Edit. The Modify Attribute Form dialog box
opens.
11 From the Source tables pane, select a table and click Set as Lookup to
set it as the lookup table for the attribute. A lookup table acts as the main
table which holds the information for an attribute. If you chose manual
mapping, select the check boxes of the tables to map to the attribute
form.
12 You can use the tabs of the Modify Attribute Form dialog box to define
attribute form expressions and create column aliases as described
below:
• Column Alias: This tab allows you to create a column alias for the
fact. Column aliases are discussed in Modifying attribute data types:
Column aliases, page 283.
For detailed information about the options on each tab within the Modify
Attribute Form dialog box, refer to the MicroStrategy Developer Help
(formerly MicroStrategy Desktop Help).
14 From the Home tab, in the Save area, click Save and Update Schema to
save your changes.
• Creating and modifying attribute data types: Column aliases, page 182
• Modifying how to use attributes to browse and report on data, page 187
• Specifying attribute roles: Attributes that use the same lookup, page 189
You can select a property in the Properties pane to view a description of the
property. The description is displayed at the bottom of the Properties pane.
• ID: The identifier of the attribute. You cannot modify this value.
Objects that are hidden are not displayed to a user unless the user has
changed his or her Developer Preferences and selected the Display
hidden objects check box. Therefore, defining an object as hidden does
not necessarily prevent users from viewing or accessing an object. The
best way to prevent users from viewing or accessing an object is to
restrict the user permissions for it.
• Lock Type: Specifies how you can browse attribute elements within the
System Hierarchy in the Data Explorer. You have the following options:
▫ Unlocked: All elements of the attribute are shown within the System
Hierarchy in the Data Explorer. For example, if the attribute Year is
unlocked, all elements of Year (such as 2005, 2006, and 2007)
display in the Data Explorer when Year is expanded from the System
Hierarchy.
• Lock Limit: If you choose the Limit lock type above, you can define the
number of elements to incrementally retrieve and display within the
System Hierarchy in the Data Explorer.
• Apply Security Filters: Enables and disables the use of security filters
in element requests. This setting also applies to the use of security filters
for creating an element cache.
This setting covers situations where only certain attributes need the
security filters for element requests. For example, if you have an
external-facing data warehouse for your suppliers, security filters can be
used on attributes in the product dimension so one supplier cannot see
another supplier's products. However, since security is not necessary on
attributes in the Time dimension, security filters do not need to be
applied and the element cache can be shared.
attribute. The properties for attribute forms and how to use them are
described below:
• Attribute form category: The first property for an attribute form reflects
the category used for the attribute form. In the example shown above in
Modifying attributes with the Properties pane, page 172, ID is displayed
as the first property. You can select the attribute form property and click
the ... button to modify the attribute form.
If the attribute form uses a form group to combine multiple attribute forms,
you can modify the separate attribute forms that are included in the form
group. For information on creating form groups in Architect, see Creating
attributes with multiple ID columns: Compound attributes, page 184.
• Shape File: Defines the shapes used to display the attribute form on
various MicroStrategy mapping features.
• Category: The category used for the attribute form, which can help group
or identify attribute forms. From the drop-down list, select the category to
use for the attribute form. For information on how the category helps
group attribute forms, see Attribute form expressions, page 273.
• Format: The format of the attribute form, which controls how the form is
displayed and how filters are defined. From the drop-down list, select the
format to use for the attribute form. For information on the format of
attribute forms, see Attribute form expressions, page 273.
• Report Sort: Defines the default sort order of the attribute form when it is
included in a report. From the drop-down list, you can choose from
Ascending, Descending, or None. For information on how attribute
forms are sorted when multiple attribute forms of a single attribute define
a default sort order, see Displaying forms: Attribute form properties, page
270.
• Browse Sort: Defines the default sort order of the attribute form when it
is viewed in the Data Explorer. From the drop-down list, you can choose
from Ascending, Descending, or None. The Data Explorer is discussed
in Hierarchy browsing, page 400.
The ID form of an attribute does not have this option as these forms are
used strictly for identification purposes.
• Column Alias: The column alias of the attribute form, which allows you
to define a new data type that you can use in place of the default data
type for a given attribute form. You can select the Column Alias property
and click the ... button to modify the attribute form's column alias. For
• Attribute Expressions: The expressions used for the attribute form. You
can select an attribute expression and click the ... button to modify the
attribute form expression.
If you are only given the option of opening Architect in read only mode, this
means another user is modifying the project's schema. You cannot open
Architect in edit mode until the other user is finished with their changes and
the schema is unlocked.
For information on how you can use read only mode and edit mode for
various schema editors, see Using read only or edit mode for schema
editors, page 108.
4 From the Project Tables View, locate and select a table that includes a
column or columns to use in an attribute definition.
5 Right-click the Customer attribute and select New Attribute form. The
Create New Form Expression dialog box opens.
7 In the Form expression pane, place the cursor to the right of [CUST_
LAST_NAME] and type + ", " +.
13 From the Category drop-down list, select None since Last Name, First
Name is neither the ID form of Customer nor the primary description
form.
14 Because this is only an example, you can close Architect without saving
your changes.
If you are only given the option of opening Architect in read only mode, this
means another user is modifying the project's schema. You cannot open
Architect in edit mode until the other user is finished with their changes and
the schema is unlocked.
For information on how you can use read only mode and edit mode for
various schema editors, see Using read only or edit mode for schema
editors, page 108.
4 From the Project Tables View, locate and select a table that includes a
column or columns to use in an attribute definition.
5 Right-click the Customer attribute and select New Attribute form. The
Create New Form Expression dialog box opens.
9 Right-click the new attribute form and select Edit. The Modify Attribute
Form dialog box opens.
10 Click New. The Create New Form Expression dialog box opens.
11 From the Source table drop-down list, select the ORDER_DETAIL table.
14 Click OK. The Create New Attribute Form dialog box opens.
Notice that there are now two expressions for the attribute form
definition, both of which use different tables as the source of their
information. You can continue this process to add as many
heterogeneous columns as part of one attribute form as necessary.
18 From the Category drop-down list, select None since this is an example
scenario.
19 Because this is only an example, you can close Architect without saving
your changes.
For information on column aliases for attributes, see Modifying attribute data
types: Column aliases, page 283. The procedure below describes how to
create a column alias using Architect, and follows the example scenario
provided in Modifying attribute data types: Column aliases, page 283.
Prerequisites
This procedure assumes you have already created an attribute with a valid
attribute expression for which to create a new column alias.
If you are only given the option of opening Architect in read only mode, this
means another user is modifying the project's schema. You cannot open
Architect in edit mode until the other user is finished with their changes and
the schema is unlocked.
For information on how you can use read only mode and edit mode for
various schema editors, see Using read only or edit mode for schema
editors, page 108.
4 From the Project Tables View, locate and select a table that includes an
attribute to create a column alias for.
5 Right-click the attribute form to create a column alias for, and select Edit.
The Modify Attribute Form dialog box opens.
7 In the Column alias area, click Select. The Column Editor - Column
Selection dialog box opens.
8 Select New to create a new column alias. The Column Editor - Definition
dialog box opens.
9 You can modify the following properties for the column alias:
• Column name: The name for the column alias. This name is used in
any SQL statements which include the fact column.
• Data type: The data type for the fact. For a description of the different
data types supported by MicroStrategy, see Appendix C, Data Types.
• Depending on the data type selected, you can specify the byte length,
bit length, precision, scale, or time scale for your column alias. For a
detailed description on each of these properties, see the
MicroStrategy Developer Help (formerly MicroStrategy Desktop Help).
10 Click OK to save your changes and return to the Column Editor - Column
Selection dialog box.
11 Click OK to save your changes and return to the Modify Attribute Form
dialog box.
13 From the Home tab, in the Save area, click Save and Update Schema to
save your changes.
If you are only given the option of opening Architect in read only mode, this
means another user is modifying the project's schema. You cannot open
Architect in edit mode until the other user is finished with their changes and
the schema is unlocked.
For information on how you can use read only mode and edit mode for
various schema editors, see Using read only or edit mode for schema
editors, page 108.
4 From the Project Tables View, locate and select a table that includes
the columns to use for a compound attribute.
5 Right-click the table and select Create Attribute. The Create New Form
Expression dialog box opens.
11 Right-click the attribute and click New Attribute form to create the other
attribute ID form. The Create New Form Expression dialog box opens.
You can change the default name of the fact by right-clicking it in the table
and selecting Rename.
You can also create a form group by dragging and dropping one attribute
form onto another attribute form for the same attribute.
18 Click Yes to create a form group. The two attribute forms are included in
a form group.
19 In the first Name field for the attribute form, type ID.
20 Because this is only an example, you can close Architect without saving
your changes.
For information on modifying the attribute forms used for reporting and
browsing, see Using attributes to browse and report on data, page 315. The
procedure below describes how to define attribute form display using
Architect. The steps below follow the example scenario provided in Defining
how attribute forms are displayed by default, page 317.
If you are only given the option of opening Architect in read only mode, this
means another user is modifying the project's schema. You cannot open
Architect in edit mode until the other user is finished with their changes and
the schema is unlocked.
For information on how you can use read only mode and edit mode for
various schema editors, see Using read only or edit mode for schema
editors, page 108.
4 From the Project Tables View, locate and select a table that includes
the attribute to define how its attribute forms are displayed by default.
5 Select an attribute.
• Report Sort: Defines the default sort order of the attribute form when
it is included in a report. From the drop-down list, you can choose
from Ascending, Descending, or None. For information on how
attribute forms are sorted when multiple attribute forms of a single
attribute define a default sort order, see Displaying forms: Attribute
form properties, page 270.
• Browse Sort: Defines the default sort order of the attribute form when
it is viewed in the Data Explorer. From the drop-down list, you can
choose from Ascending, Descending, or None. The Data Explorer is
discussed in Hierarchy browsing, page 400.
• Use as Report Form: Defines whether the attribute form is displayed on reports
by default. To define an attribute form to be displayed on reports by default, select
the check box to set the value to True.
8 You can also define the default sort order for attributes on reports and
the Data Explorer. For information on attribute form sorting options, see
Displaying forms: Attribute form properties, page 270.
9 Because this is only an example, you can close Architect without saving
your changes.
For information on attribute roles, see Attributes that use the same lookup
table: Attribute roles, page 303. The procedure below describes how to
specify attribute roles using explicit table aliasing. The steps below follow
the example scenario provided in Specifying attribute roles, page 306.
You can also define attribute roles using automatic role recognition, which
utilizes MicroStrategy VLDB properties and is described in Specifying
attribute roles, page 306.
If you are only given the option of opening Architect in read only mode, this
means another user is modifying the project's schema. You cannot open
Architect in edit mode until the other user is finished with their changes and
the schema is unlocked.
For information on how you can use read only mode and edit mode for
various schema editors, see Using read only or edit mode for schema
editors, page 108.
4 From the Project Tables View, locate and select the LU_STATE table
that includes the attribute to define attribute roles for.
5 Right-click the LU_STATE table and select Create Table Alias. An LU_
STATE(1) table is created.
7 Right-click the LU_STATE table and select Create Table Alias. An LU_
STATE(1) table is created.
Cr eat e t h e at t r i b u t es
11 Select Manual mapping and click OK. You are returned to Architect and
the new attribute is created in the LU_STATE_STORE table.
12 Right-click the new attribute, select Rename, and type State Store.
13 Right-click the State Store attribute table and select New Attribute
form. The Create New Form Expression dialog box opens.
14 Map any other columns to attribute forms for the State Store attribute.
You must make sure to map any State Store attribute forms to columns
from the LU_STATE_STORE table.
16 Create a Vendor State attribute with the same sub-procedure (Create the
attributes, page 191) used to create State Store above, except you must
use the LU_STATE_VENDOR table instead of the LU_STATE_STORE table.
Pr er eq u i si t es
If you are only given the option of opening Architect in read only mode, this
means another user is modifying the project's schema. You cannot open
Architect in edit mode until the other user is finished with their changes and
the schema is unlocked.
For information on how you can use read only mode and edit mode for
various schema editors, see Using read only or edit mode for schema
editors, page 108.
6 Select the Support multiple languages check box to set the value to
True, which enables data internationalization for the attribute form. You
can clear the check box and set it to False, which disables
internationalization for the attribute form.
The ID form of an attribute does not have this option as these forms are
used strictly for identification purposes.
7 From the Home tab, in the Save area, click Save and Close to save your
changes and close Architect.
The four types of direct relationships that can exist between attributes
include one-to-one, one-to-many, many-to-one, and many-to-many. For
information on these direct relationships and steps to define them with the
Attribute Editor, see Attribute relationships, page 287.
The steps below show you how to manually define parent and child
relationships between attributes, and also provides an example scenario of
Prerequisite
• If you are only given the option of opening Architect in read only
mode, this means another user is modifying the project's schema.
You cannot open Architect in edit mode until the other user is
finished with their changes and the schema is unlocked.
• For information on how you can use read only mode and edit mode
for various schema editors, see Using read only or edit mode for
schema editors, page 108.
4 From the Hierarchy View, on the Home tab, in the drop-down list on the
Hierarchy area of the toolbar, select System Hierarchy View. The
system hierarchy is displayed.
5 Prior to defining any relationships, you should gather the attributes that
you want to relate to each other in the same area within the Hierarchy
View of Architect. For example, the attributes Year, Quarter, Month of
Year, Month, and Day in the MicroStrategy Tutorial project are gathered
close together in the Hierarchy View, as shown below.
• One-to-one
• One-to-many
• Many-to-one
• Many-to-many
8 A table in which both attributes exist is chosen as the table to support the
attribute relationship. To modify the relationship table, right-click the
relationship line, point to Relationship table, and select a table.
If you are finished defining attribute relationships, you can save your
changes and close Architect. The rest of this procedure describes how to
define attribute relationships with other techniques and completes the
example scenario.
10 For the Month attribute, in the Relationship type drop-down list, select
One-to-many. You can select any of the available relationship types from
the Relationship type drop-down list to create the required relationship.
11 For the Month attribute, in the Relationship table drop-down list, keep
the default of LU_MONTH.
12 Keep the Relationship type drop-down list at None for the other
attributes listed. Quarter is not directly related to any of these attributes.
13 Click OK to close the Children Relations dialog box and create the
attribute relationship between Quarter and Month.
14 Drag from the middle of the Month of Year attribute to the Month
attribute. A one-to-many relationship line is drawn between the two
attributes.
15 Drag from the middle of the Month attribute to the Day attribute. A one-to-
many relationship line is drawn between the two attributes.
Pr er eq u i si t e
• You have created attributes for your project (see Creating and modifying
attributes, page 166).
• If you are only given the option of opening Architect in read only
mode, this means another user is modifying the project's schema.
You cannot open Architect in edit mode until the other user is
finished with their changes and the schema is unlocked.
• For information on how you can use read only mode and edit mode
for various schema editors, see Using read only or edit mode for
schema editors, page 108.
4 From the Hierarchy View, on the Home tab, in the drop-down list on the
Hierarchy area of the toolbar, select System Hierarchy View. The
system hierarchy is displayed.
5 Right-click within the area that displays the attributes for your project,
and select Recognize Relationships. The System Hierarchy dialog box
opens.
6 You can select from the following options to automatically define attribute
relationships:
Architect analyzes sample data for the table. The attributes with fewer
distinct values are defined as parents of the attributes with more
distinct values, using a one-to-many relationship from the parent
attribute to the child attribute. For example, a lookup table includes
four rows of data, which include data related to year and quarter.
Each row includes the same year (for example, 2009), but the quarter
changes for each row (Q1, Q2, Q3, Q4). In this case, the Year
attribute is created as a parent of the Quarter attribute.
• If you selected the Show preview results check box to preview the
results of automatically defining attribute relationships (see Defining
project creation and display options, page 121) the Results Preview
dialog box is displayed. From this dialog box, you can select which
attribute relationships should be created and which attribute
relationships should be excluded. After you have made all your
selections, click OK to allow Architect to automatically define attribute
relationships.
• If you cleared the Show preview results check box (see Defining
project creation and display options, page 121) Architect
automatically creates all potential attribute relationships without first
displaying them in the Results Preview dialog box.
After all relationships are determined by the rules that you selected,
Architect performs final analysis on the attribute relationships that are to
be created. Any attribute relationships that are found to be redundant are
not created. This ensures that attribute relationships are created that
properly reflect the design of the data in your data source. For
information on modifying the attribute relationships that are created, see
Defining attribute relationships, page 193.
This section describes how to use Architect to create and modify user
hierarchies.
Pr er eq u i si t es
• The procedure below assumes you have already created a project object
and added tables to the project. For information on creating a project
using Architect, see Creating projects using Architect, page 115.
• If you are only given the option of opening Architect in read only
mode, this means another user is modifying the project's schema.
You cannot open Architect in edit mode until the other user is
finished with their changes and the schema is unlocked.
• For information on how you can use read only mode and edit mode
for various schema editors, see Using read only or edit mode for
schema editors, page 108.
5 In the Please enter the hierarchy name field, type a name for the
hierarchy and click OK. You are returned to Hierarchy View with the
attribute you selected included in the hierarchy.
8 Click OK to close the Select Attributes dialog box and return to Architect.
The attributes you selected appear in Hierarchy View.
11 Each attribute in a user hierarchy has properties that affect how that
attribute is displayed and accessed in a hierarchy. You can right-click an
attribute and configure the properties listed below:
• Set As Entry Point: Specifies whether the user can begin browsing in
this hierarchy using this attribute (see Entry point, page 398).
12 From the Home tab, click Save and Close to save your changes and
close Architect.
13 You can save user hierarchies in any folder. However, to make the user
hierarchy available for element browsing in the Data Explorer, you must
place it in the Data Explorer sub-folder within the Hierarchies folder. This
is discussed in Hierarchy browsing, page 400.
TH E B UILD IN G B LOCKS
OF B USIN ESS D ATA :
FACTS
Facts are one of the essential elements within the business data model.
They relate numeric data values from the data warehouse to the
MicroStrategy reporting environment. Facts generally represent the answers
to the business questions on which users want to report.
Facts are stored in the data warehouse in fact tables. These fact tables are
composed of different columns. Each cell in the columns represents a
specific piece of information. When fact information is requested for a report
in MicroStrategy, that column is accessed to retrieve the necessary data.
Facts are based on physical columns within tables in the data warehouse, as
shown below.
Like other schema objects such as attributes, facts are logical MicroStrategy
objects that correspond to physical columns and tables. Unlike attributes,
facts do not describe data. Facts are the actual data values stored at a
specific fact level. A fact entry level is the lowest set of attributes at which a
fact is stored.
While creating facts is a major step in the initial creation of a project, it can
often be necessary to modify and create facts throughout the life cycle of a
project. The procedures to perform these tasks are discussed in the first
section (Creating facts, page 206) of this chapter. The later sections discuss
conceptual information on facts, as well as highlight some advanced fact
design techniques and procedures.
Creating facts
A fact has two common characteristics: it is numeric and it is aggregatable.
Examples of facts include sales dollars, units sold, profit, and cost.
It is important to understand how to define facts because facts are the basis
for almost all metrics. Facts also allow you to create advanced metrics
containing data that is not stored in the warehouse but can be derived by
extending facts.
This section provides steps to create facts at different phases of the project
design process, using different techniques and MicroStrategy interfaces:
You can also create multiple simple or advanced facts as part of the
initial project design effort using Architect, as described in Creating and
modifying simple and advanced facts, page 210.
• Creating and modifying simple and advanced facts, page 210 covers
steps to add and modify both simple and advanced facts for an existing
project.
The Project Creation Assistant utilizes the Fact Creation Wizard to help you
create the facts for your initial project creation effort. You can also access
the Fact Creation Wizard in MicroStrategy Developer from the Schema
menu.
• The Fact Editor, which is discussed in Creating and modifying simple and
advanced facts, page 210, is used to add advanced features to facts that
already exist or to create new simple or advanced facts as your project
evolves.
This procedure is part of an initial project creation effort using the Project
Creation Assistant, which launches the Fact Creation Wizard to complete the
fact creation tasks. For steps to access the Project Creation Wizard, see
Creating a new project using the Project Creation Assistant, page 95. You
can also access the Fact Creation Wizard in MicroStrategy Developer from
the Schema menu.
1 In the Project Creation Assistant, select Create facts. The Fact Creation
Wizard opens, as shown below:
2 Click Define Rules to set some basic fact creation rules. The Fact
Creation Rules page opens.
Rules help automate and govern the fact creation process. If the naming
conventions in your warehouse do not conform to the defaults in the Fact
Creation Rules page, you may need to change these rules.
3 The Column data type area allows you to select the column data types
that are available as possible fact ID columns. Select the check boxes for
the data types to be included when the wizard searches the data
warehouse for available fact columns.
For example, if you select Character and Numeric and leave the
remaining check boxes cleared, only columns whose data types are
numeric or character-based are displayed in the Fact Creation Wizard as
possible columns to use for your facts.
4 The Fact name area allows you to determine how to create default fact
names, that is, whether to replace underscores in the fact name with
spaces and whether the first letter is capitalized. Select the appropriate
check boxes to create the desired default fact names.
5 Click OK to accept your rule changes and return to the Fact Creation
Wizard.
Fa ct col u m n se l e ct i on
6 Click Next. The Column Selection page opens, with columns that are not
currently being used in the project listed in the Available columns pane.
7 From the Available columns pane, select the fact columns to use for your
facts and click > to add them to your project. Click >> to add all the listed
columns.
• You can rename any fact to make its name more user-friendly by
right-clicking the fact and selecting Rename.
• The Fact Creation Wizard cannot handle columns that hold the
same information but have different column names (that is,
heterogeneous columns). For more information about mapping
facts to heterogeneous columns, see Mapping physical columns
to facts: Fact expressions, page 219.
8 To remove fact columns from your project, select them from the Facts
pane and click < to move them to the left side. Click << to remove all the
columns in your project.
10 Review the summary information in the Finish page and click Finish to
create the facts.
With Architect, you can support all of the simple and advanced fact
features that are available in the Fact Editor. Rather than focusing on
one fact at a time with the Fact Editor, you can use Architect to create
and modify multiple facts for a project at one time. For information on
how to use Architect, see Creating and modifying simple and advanced
facts using Architect, page 216.
The Fact Creation Wizard can create multiple facts quickly and easily.
However, it limits you to creating simple facts and does not allow you to
edit existing facts. Typically, you only use the Fact Creation Wizard as
part of the initial project creation, for creating most of the facts for the
project. For steps to use the Fact Creation Wizard, see Creating one or
more simple facts with the Fact Creation Wizard, page 212.
You can use the Fact Editor to edit existing facts and create fact
expressions, column aliases, level extensions; map multiple or
heterogeneous columns; and configure other settings. The Fact Editor
allows you to modify one fact at a time, which can be helpful when only a
few facts in a project need to be modified. For steps to use the Fact
Editor, see Creating simple and advanced facts with the Fact Editor,
page 212 and Modifying simple and advanced facts with the Fact Editor,
page 215.
Creating one or more simple facts with the Fact Creation Wizard
Although the Fact Creation Wizard is primarily used to create most of a
project's facts during initial project creation, you can use it at any time to
create one or more simple facts at the same time.
You must use a login that has Architect privileges. For more information
about privileges, see the List of Privileges chapter in the System
Administration Help.
3 From the Schema menu, select Fact Creation Wizard. The Fact
Creation Wizard opens.
To use the Fact Creation Wizard to add facts, follow the procedures
outlined in Simultaneously creating multiple, simple facts, page 207.
The following procedure describes how to use the Fact Editor to create a
simple fact based on a single fact column in a table.
You must use a login that has Architect privileges. For more information
about privileges, see the List of Privileges chapter in the System
Administration Help.
3 From the File menu, select New, and then Fact. The Fact Editor opens,
with the Create New Fact Expression dialog box displayed on top of it.
4 From the Source table drop-down list, select the source table for the
fact.
The source table is the table or logical view that contains the fact column on
which you want to base a new fact.
5 From the Available columns pane, drag and drop a column into the Fact
expression pane.
You can include multiple columns as well as use numeric constants and
mathematical operators and functions to create a fact expression. For
information on creating various types of fact expressions, see Mapping
physical columns to facts: Fact expressions, page 219.
• Automatic mapping means that all of the tables in the project with the
columns used in the fact expression are selected as possible source
tables for the fact. You can then remove any tables mapped
automatically or select other tables.
• Manual mapping means that all of the tables in the project with the
columns used in the fact expression are located but are not selected
as possible source tables for the fact. You can then select which of
those tables are used as source tables for the fact. Other scenarios in
which you should use the manual mapping method include:
▫ If the same column name does not contain the same data across
different tables, manually select the appropriate source tables for
each fact.
8 Use the tabs of the Fact Editor to define fact expressions, create column
aliases, and create extensions, as described below.
For detailed information about the options on each tab within the Fact
Editor, refer to the MicroStrategy Developer Help (formerly MicroStrategy
Desktop Help).
• Column Alias: This tab allows you to create a column alias for the
fact. Column aliases are discussed in Fact column names and data
types: Column aliases, page 225.
• Extensions: This tab allows you to create fact level extensions. Fact
extensions are discussed in Modifying the levels at which facts are
reported: Level extensions, page 228.
10 In the Save As dialog box, navigate to the location in which to save the
fact. Enter a name for the fact and click Save. The fact is saved and the
Fact Editor closes.
11 From the Schema menu, select Update Schema to update the project
schema.
2 Double-click the fact to open the Fact Editor and edit the fact.
You can learn how to create more advanced facts in the various sections
below.
With Architect, you can support all of the simple and advanced fact features
that are available in the Fact Editor. Rather than focusing on one fact at a
time with the Fact Editor, you can use Architect to create and modify multiple
facts for a project at one time. Review the chapters and sections listed
below for information on Architect and steps to create and modify facts using
Architect:
• Fact level extensions allow facts stored in the data warehouse at one
level to be reported at an unrelated level. Extensions can also prevent a
fact from being reported at a certain level, even though it is stored at that
level. Level extensions are very effective for advanced data modeling
scenarios. Level extensions are discussed in detail in Modifying the
levels at which facts are reported: Level extensions, page 228.
You create facts in MicroStrategy Developer using the Fact Creation Wizard
and the Fact Editor. During project creation with the Fact Creation Wizard,
when you select the numeric column used to represent the fact, both the fact
definition and column alias are automatically defined. Level extensions are
optional.
For a discussion of the tools used to created facts and procedures on how to
use them, see Creating facts, page 206.
Fact
Expression Source Tables
Name
LU_ITEM
Unit
All_Sales ORDER_
Price
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.
• For each of the tables, fact expressions define how the fact is
calculated.
The following image illustrates a column in the fact table and the associated
fact expressions:
Valid fact expressions are formulas constructed from fact columns with or
without numeric constants or mathematical operators. The mathematical
operators that can be used in a fact expression are:
• Addition (+)
• Subtraction (-)
• Multiplication (*)
• Division (/)
You can use the Fact Editor to create fact expressions. These steps are
covered in Creating and modifying simple and advanced facts, page 210.
For example, you can use implicit fact expressions to create "temporary
columns" in the database with a value of "1" for every row. These temporary
columns allow you to keep track of how many rows are returned for a certain
attribute. You may also find it helpful to use implicit facts when building
metrics, where you can sum the column holding the constant to create a
COUNT. For example, if you want to build a metric defined as Sum(1), you
can define a fact equal to the constant "1." For detailed information about
metrics, see the Advanced Reporting Help.
You can create a new fact, Sales, by creating the following derived fact:
One advantage of creating a derived fact is that a derived fact allows one
consistent fact to exist in the project in lieu of having to retrieve multiple
intermediary facts from multiple tables. Using a single fact saves storage
space and limits the number of SQL passes used in queries.
Rather than creating a derived fact, you can create such analysis in
MicroStrategy with the use of metrics. Metrics allow you to perform
calculations and aggregations on your fact data. For more information on
what metrics are and how to create them, see the Advanced Reporting Help.
The Cost fact in the MicroStrategy Tutorial contains the derived fact
expression Qty_Sold * Unit_Cost. This expression implies that columns
containing data about the quantity of items sold and the price of those units
can be multiplied to produce a useful business calculation. In this case, the
columns are used to answer the business question, "How much did it cost
the company to create the items purchased by customers?"
The following procedure describes how to create a derived fact that uses the
derived fact expression described above. You can also created derived facts
that use derived fact expressions using Architect, which is described in
Creating and modifying multiple facts, page 157.
3 From the File menu, point to New, and then select Fact. The Fact Editor
opens, with the Create New Fact Expression dialog box displayed on top
of it.
4 From the Source table drop-down list, select the ORDER_DETAIL table.
10 Click OK. The derived fact expression appears in the Fact expression
pane in the Fact Editor.
11 From the File menu, select Save As. The Save As dialog box opens.
Copyright © 2023 All Rights Reserved 222
Pr o ject Design Gu id e
13 When you create a fact for your project, at this point, you must update the
project schema. However, since this is only an example, it is not
necessary to update the schema.
In the example above, creating a heterogeneous fact column name for dollar
sales informs the system that the Dollar_Sales and Dollar_Sls columns
represent the same fact. When you call for the information in a report
through the use of a metric, both fact columns are used in the SQL, resulting
in an accurate representation of the fact in the report.
The Units Sold fact in MicroStrategy Tutorial consists of two fact columns in
the warehouse, Qty_Sold and Tot_Unit_Sales. Although these fact
columns have different names and exist in different fact tables, they
represent the same data and are therefore both mapped to the Unit Sold
fact.
The following procedure describes how to create the Units Sold fact that
already exists in MicroStrategy Tutorial. In the procedure, you create the
Units Sold fact and map its corresponding heterogeneous fact columns to it.
You can also use Architect to create a fact with heterogeneous column
names, which is described in Creating and modifying multiple facts, page
157.
3 From the File menu, point to New, and then select Fact. The Fact Editor
opens, with the Create New Fact Expression dialog box displayed on top
of it.
4 From the Source table drop-down list, select the ORDER_FACT table.
This is one of the tables in which a heterogeneous fact column for the
Units Sold fact exists.
7 Click OK. The Fact Editor opens and the fact expression you just created
appears in the Fact expression pane.
Now you must add the other heterogeneous fact column as separate
expression for the Units Sold fact.
8 Click New. The Create New Fact Expression dialog box opens.
12 Click OK. The Fact Editor opens and the fact expression you just created
appears in the Fact expression pane. Now the Units Sold fact you are
creating maps correctly to its heterogeneous fact columns.
13 From the File menu, select Save As. The Save As dialog box opens.
15 When you create a fact for your project, at this point, you must update the
project schema. However, since this is only an example, it is not
necessary to update the schema.
By default, the data type for a fact is inherited from the data type of the
column on which the fact is defined in the data warehouse. However, there
are cases where you may need to change this.
For example, you can define a fact to be the difference between two dates to
perform a calculation such as the average number of days between a start
and an end date. You could create this fact using the following expression:
The data type for this fact is automatically set to a Date data type because
the Start_Date_ID and End_Date_ID have Date data types. However, the
result of the calculation, that is, the difference between the two dates, is an
integer.
This is used when a temporary SQL table needs to be created for the
calculation. If you did not change the data type of the column alias, then the
system uses a Date data type and tries to insert integer data into this
column. This can cause an error for some database platforms. To avoid the
possibility of an error due to conflicting data types, you should modify the
column alias for the fact to change the default Date data type to an Integer
data type.
The procedure below describes how to use the Fact Editor to create column
aliases. You can create column aliases using Architect, which is described
in Creating and modifying multiple facts, page 157.
Prerequisite
• This procedure assumes you have already created a fact with a valid fact
expression for which to create a new column alias.
• If you are only given the option of opening the Fact Editor in read
only mode, this means another user is modifying the project's
schema. You cannot open the Fact Editor in edit mode until the other
user is finished with their changes and the schema is unlocked.
• For information on how you can use read only mode and edit mode
for various schema editors, see Using read only or edit mode for
schema editors, page 108.
4 In the Column alias area, click Modify. The Column Editor - Column
Selection dialog box opens.
5 Select New to create a new column alias. The Column Editor - Definition
dialog box opens.
6 You can modify the following properties for the column alias:
• Column name: The name for the column alias which is used in any
SQL statements which include the fact column.
• Data type: The data type for the fact. For a description of the different
data types supported by MicroStrategy, see Appendix C, Data Types.
• Depending on the data type selected, you can specify the byte length,
bit length, precision, scale, or time scale for your column alias. For a
7 Click OK to save your changes and return to the Column Editor - Column
Selection dialog box.
Level extensions are necessary when facts are stored in the data warehouse
at one level and reported at different levels. Every fact is tied to a set of
attributes that may or may not satisfy all users' reporting requirements. A
fact extension is needed when a fact does not relate directly or indirectly to
an attribute included on a report.
If the entry level of a fact is at the lowest level of a hierarchy, all attributes at
a higher logical level in the hierarchy are available for use as well, without
the use of level extensions. For example if you have a cost fact at the level
of a date attribute in a time hierarchy, MicroStrategy can aggregate the cost
fact data to the level of the year attribute because it is in the same hierarchy
as the date attribute and at a higher level. However, facts require level
extensions to be related to any attributes that are at a lower logical level in
the same hierarchy than the entry level for a fact (see Lowering the level of
fact data: Fact degradations, page 238).
You can use level extensions to change a fact level and extend a fact level
to a level in a completely different hierarchy. For example, you record a
Discount fact at the Item/Date level. That is, discounts apply to particular
items on particular days. To see if some call centers are selling significantly
more items at a discount than other call centers, you have to extend the
level of the Discount fact to the Call Center level, which is an attribute from
a different hierarchy.
Level extensions are not required like the fact definition and column alias,
and they tend to be used only in specific cases.
Before a metric containing a fact can be used with an attribute that is not in
or related to the attribute's entry level, a level extension must be defined for
the fact. This is because if a fact is stored at a level unrelated to an attribute
on a report, a level extension must exist to relate the fact data to the
attribute. Otherwise, there is no way to make a connection between the fact
data and the attribute.
You can create fact level extensions by using any of the following methods:
• Forcing facts to relate to attributes: Using cross product joins, page 237
You can find complete descriptions for each of these methods in the online
help for the Level Extension Wizard in the Fact Editor.
2 The Freight fact cannot simply be joined with a table containing Item
information to return a meaningful freight value for each item. An
allocation expression is required to extend Freight to the Item level.
Notice that the ORDER_FACT and ORDER_DETAIL tables include Order-
level Units Sold and Item-level Units Sold columns respectively. These
two columns are used to allocate the fact expression in the procedure
below.
The following procedure steps through how to create the fact extension that
has been created for the Freight fact of the Tutorial project. The procedure
also describes general principles of creating fact extensions which you can
use to create fact extensions for the facts in your project.
2 Browse to the Facts folder and double-click the Freight fact to edit it. If a
message is displayed asking if you want to use read only mode or edit
mode, select Edit and click OK to open the Fact Editor in edit mode so
that you can make changes to the fact. The Fact Editor opens.
• If you are only given the option of opening the Fact Editor in read
only mode, this means another user is modifying the project's
schema. You cannot open the Fact Editor in edit mode until the other
user is finished with their changes and the schema is unlocked.
• For information on how you can use read only mode and edit mode
for various schema editors, see Using read only or edit mode for
schema editors, page 108.
4 Select Extension to Item and click Modify. The Level Extension Wizard
opens.
To create a new fact extension you would click New. However, this example
steps through how the Freight fact extension Extension to Item was created.
5 Read the Welcome statement and click Next. The General Information
page opens.
• Lower the fact entry level: define a fact degradation (see Lowering
the level of fact data: Fact degradations, page 238)
For this example you are creating a fact extension on a table relation, so
select Extend the fact entry level, and click Next. The Extended
Attributes page opens.
7 Select the attributes you want to extend the fact to, allowing the fact to be
reported at the new level. For this example Item is already selected. Click
Next. The Extension Type page opens.
For this example select Specify the relationship table used to extend
the fact, and click Next to continue defining your fact extension on a
table relation. The Table Selection page opens.
9 Select the table used to extend the fact to the new level. For this
example, the ORDER_DETAIL table is already selected. Click Next. The
Join Type page opens.
11 You can choose to join using the attribute, or join using the attribute and
its children. In this case Order has no children, so you do not have to
click the Join against arrow to change the default. Click Next. The
Allocation page opens.
12 Enter an allocation expression that calculates the fact at the new level.
For this example, the allocation expression is already provided,
((Freight * [Item-level Units Sold]) / [Order-level
Units Sold]).
When the engine processes a report containing Order, Item, and Freight, it
joins ORDER_FACT and ORDER_DETAIL and considers the resulting table as
one logical fact table at the Item, Day, Order, Employee, Promotion level.
The SQL generated for the report containing Order, Item, and Freight (metric
mapped to the Freight fact) is:
The SQL statement above is for an Access database. The SQL for your
reports may vary depending on the type of DBMS that you use.
To view how the fact extension is an estimation of freight values for each
item of an order, review the values of the first order with an extra metric that
calculates the number of each item type in an order shown below.
Notice that the Freight metric averages the amount of freight per item in an
order. The larger freight values occur because more than one of the item
type was included in the order. This illustrates how fact extensions often
provide an estimation of values at a different level rather than an exact
calculation. If you want to provide exact values of data at a certain level, you
most likely need to capture such data and store it in your data source.
The following diagram shows the schema from the example in Defining a join
on fact tables using table relations, page 230 after two summary tables are
added to it.
To extend the entry level of the Freight fact to Customer, you can create a
fact relation using the Order Unit Sales fact.
The joins described above demonstrate how the join attributes can be either
Distribution Center and Order or just Distribution Center.
You can define the fact relation in the Level Extension Wizard which you can
access from the Fact Editor. Open the Order Unit Sales fact and extend it to
either Distribution Center and Order or just Distribution Center. Next, select
the Select the relationship table dynamically option and specify the
tables to use for the extension. This option is set in the step immediately
after Defining a join on fact tables using table relations, page 230 in the
procedure above. The tables and attributes you specify in the wizard
determine the different types of joins that are created, as explained above.
The SQL statement above is for an Access database. The SQL for your
reports may vary depending on the type of DBMS you use.
As with table relations, you can specify the best fit as the join strategy so
that the engine calculates the joins. In a best fit join, the set of join attributes
must contain the entire key of the left-hand-side fact table (Table 3 in the
example SQL above).
Cross products should only be used when no other way to extend the fact
exists. When you specify a cross product join to relate a fact to an attribute,
you are creating a Cartesian product of the lookup attribute. Since this
method can be inefficient, MicroStrategy does not recommend using the
cross product join.
For example, in the following schema, Distribution Center does not relate to
Dollar Sales:
You can define this cross product join in the Level Extension Wizard in the
Fact Editor. Open the Dollar Sales fact and extend it to the Distribution
Center attribute. Next, select the Perform the extension through a cross
product option. This option is set in the step immediately after Defining a
join on fact tables using table relations, page 230 of the procedure above.
For this example, you do not need to specify an allocation expression.
Notice that no join attributes are specified. The MicroStrategy Engine always
cross-joins the lookup tables of the attributes in the extension.
The SQL statement above is for an Access database. The SQL for your
reports may vary depending on the type of DBMS you use.
The following procedure steps through how to create the fact degradation
that has been created for the Planned Compensation fact of the Human
Resources Analysis Module. The procedure also describes general
principles of creating fact degradations which you can use to create fact
degradations for the facts in your project.
• If you are only given the option of opening the Fact Editor in read
only mode, this means another user is modifying the project's
schema. You cannot open the Fact Editor in edit mode until the other
user is finished with their changes and the schema is unlocked.
• For information on how you can use read only mode and edit mode
for various schema editors, see Using read only or edit mode for
schema editors, page 108.
To create a new fact degradation you would click New. However, this
example steps through how the Planned Compensation fact degradation
Degradation to Employee was created.
5 Read the Welcome statement and click Next. The General Information
page opens.
For this example you are creating a fact degradation so select Lower the
fact entry level, and click Next. The Extended Attributes page opens.
7 Select the attributes you want to degrade the fact to, allowing the fact to
be reported at the new level. For this example Employee is already
selected. Click Next. The Join Type page opens.
8 Select what attribute(s) to perform the join. For this example, the
Department attribute is already selected. Click Next. The Join Attributes
Direction page opens.
9 You can choose to join using the attribute, or join using the attribute and
its children. For this example, the join is performed on the Department
attribute and its children. Click Next. The Allocation page opens.
10 Enter an allocation expression that calculates the fact at the new level.
For this example, you do not need to include an allocation expression.
See Fact degradations with allocation expressions, page 242 for an
example of using an allocation expression for a fact degradation.
For example, if your fact is stored at the yearly level and you want to report
the data at the monthly level, you can create a degradation on the fact to
relate it to the monthly level. You select Month to be the attribute to which to
degrade. You then specify that the allocation expression is fact/12.
Fact degradations often produce data estimates rather than exact values for
the fact data at lower logical levels. For example, consider the allocation
Disallowing a fact to be extended to a level lower than the fact's entry level
due to unnecessary complexity and the cost of analyzing fact data at such a
level is a common use for this feature. If a fact is stored at a level that is
counterproductive to a query, such as data that is stored at the Minute or
Second level, you can disallow the lower levels. For example, if you have
three years' worth of data, querying at the Minute or Second level consumes
too many resources and returns extensive data. With a disallow in place, if
you create a report and attempt to include the fact at the Minute or Second
level, an error is returned, indicating that the report cannot be run at that
level.
on fact tables using table relations, page 230 of the procedure to create a
fact extension above. After updating the schema and re-executing the
report, the report fails because the disallow setting now prevents the cross-
joins between the lookup tables and fact tables. This setting, however, does
not affect normal joins.
In the previous example, for the Sales fact, assume you specify an
extension to the Month attribute and also disallow extension to Year which
is a parent of the extended attribute, Month. If you execute the report
containing the Year attribute and Sales metric, the report runs successfully.
In this case, the engine sorts the extension conditions specified in some
order and calculates the report based on the sorted order of extensions.
This is not an expected design condition, although the engine returns a
valid SQL. It is advisable to avoid fact definitions that contain contradictory
extension definitions.
The Disallow the fact entry level setting applies only to attributes that can be
considered as extended attributes. For example, you create a report that
contains the attributes Subcategory and Item and the Revenue metric, which
is defined as sum of the Revenue fact. You now disallow an extension on the
Revenue fact for the Item attribute and update the schema. If you re-execute
the report, you can still see Revenue by Item. This implies that the fact
extension has not been disallowed. This is because Revenue exists at the
same level as Item in the MicroStrategy Tutorial project. So you encounter
only normal joins and no extensions. There must be a valid reason to
disallow reporting a fact at a certain level. In this case, disallowing the
Revenue fact at the level it is stored at in the data warehouse does not make
logical sense.
Business data represented by facts can offer little insight without the
presence of business concepts and context, which take the form of attributes
in MicroStrategy. Attributes provide the business model with a context in
which to report on and analyze facts. While knowing your company's total
sales is useful, knowing where and when the sales took place provides the
kind of analytical depth users require on a daily basis.
For example, you have a report with the Month, Year, and Region attributes
on the template, as well as a Revenue metric based on the Revenue fact.
When executed, the report displays your company's revenue at the region,
month, and year levels. Because of the attributes on the report, a substantial
amount of information is available, including which regions produced the
least revenue and which years saw the highest growth in revenue. If you
remove the attributes from the report, you can only find out how much
revenue the company generated in total.
Overview of attributes
Creating attributes is an important step in the initial project design effort,
which comes after creating facts when using the Project Creation Assistant.
New user and application requirements make attribute creation and
modification an important part of the entire project life cycle.
In the SQL above, sales information will be retrieved by store and date. The
attributes and metrics in the report tell Intelligence Server where to look in
the data warehouse for the information and how to create the SQL that will
retrieve it. Because of this process, report analyzers do not have to know
SQL to extract information from a data warehouse.
The lowest level attribute you include in a report, such as Day, is the lowest
level of detail reported. A high-level report, such as a report at the Year
level, includes the Year attribute but lacks the detail of a similar report which
includes the lower level attributes Month and Week. It is important to
understand the data is still the same, it is just not aggregated.
A discussion about metrics, filters, and reports is beyond the scope of this
guide and is covered in the Advanced Reporting Help.
The following diagram illustrates how the attribute properties listed above
are related:
section (Creating attributes, page 249) of this chapter. The later sections
discuss conceptual information on attributes, as well as highlight some
advanced attribute design techniques and procedures.
Creating attributes
An attribute is primarily used to group and aggregate fact data to add
business context to the fact data. The ability to report on and analyze data
requires data to have a business context; therefore, creating attributes is a
major step in any project design effort.
• Adding and modifying attributes, page 255: Provides steps to add and
modify attributes for an existing project. This includes adding advanced
features such as attribute forms to attributes that already exist or adding
new attributes as your project evolves.
You can also create and modify attributes at any phase of the project design
process using Architect. For information on creating and modifying attributes
using Architect, see Adding and modifying attributes, page 255.
You can also create multiple attributes using Architect, which is described
in Chapter , Adding and modifying attributes.
This procedure is part of an initial project creation effort using the Project
Creation Assistant, which launches the Attribute Creation Wizard to
complete the attribute creation tasks. For steps to access the Project
Creation Wizard, see Creating a new project using the Project Creation
Assistant, page 95. You can also access the Attribute Creation Wizard at
any time in the development of a project from the Schema menu in
MicroStrategy Developer.
Def i n e at t r i b u t e cr eat i o n r u l es
These rules can make the process of choosing attribute columns and
naming your attributes considerably easier, especially if you use
consistent naming conventions and data types in your data warehouse.
The Attribute Creation Wizard uses these rules below to help automate
the attribute creation process. Change these rules if the naming or data
type conventions in your warehouse do not conform to these defaults.
3 Click Define Rules to set some basic attribute creation rules. The
Attribute Creation Rules page opens.
4 The Column data type area allows you to select the column data types to
be available as possible attribute ID columns. Select the check boxes for
the data types that should be included when the wizard searches the data
warehouse for available attribute ID columns.
5 The Attribute name area allows you to determine how to create default
attribute names. You can select the appropriate check boxes to set the
following default behaviors for creating attribute names:
7 Click OK to accept your rule changes and return to the Attribute Creation
Wizard.
Sel ect t h e ID co l u m n
When choosing the ID column for an attribute, make sure that all values in
the column are unique and that it does not contain NULL values. You should
never use a column that has NULL or repeated values as the ID column for
an attribute. Doing so results in unexpected behavior and errors.
Only those columns with data types that match those chosen in the rules
you defined above appear on the ID Selection page. The columns that
match the identifier naming convention that you set in the warehouse
search rule above are automatically highlighted.
9 From the Available columns pane, select the columns to use for your
attribute IDs and click > to add them to your project. Click >> to add all
the listed columns.
• The Attribute Creation Wizard cannot handle columns that hold the
same information but have different column names (that is,
heterogeneous columns). For more information about mapping
attributes to heterogeneous columns, see Attribute form expressions,
page 273.
Cr eat e co m p o u n d at t r i b u t es
a Click Compound Attributes and then click Add. The New Compound
Attribute dialog box opens.
Description columns provide the data which gives context and meaning to
your attributes.
11 After adding all your attribute ID columns, click Next. The Description
Column Selection page opens.
In general, you should use the default description column for each attribute.
In some cases, however, it may make sense to use the ID column as the
description column, such as Year.
Other attribute forms need to be created through the Attribute Editor after
you complete steps in the Project Creation Assistant. Refer to Adding and
modifying attributes, page 255, for more information about attribute forms.
Sel ect t h e l o o ku p t ab l e
13 Click Next when you are finished selecting description columns for
attributes. The Lookup Table Selection page opens.
The table that follows the lookup naming convention that you set in the
warehouse search rule is automatically selected. In general, you should
choose the default lookup table for each attribute.
15 Click Next:
column for the compound attributes and click Next. The Relationship
Definition page opens.
Def i n e t h e r el at i o n sh i p
For each attribute, you specify the children and the type of relationship:
one-to-one, one-to-many, or many-to-many. When you design a logical
data model for your project (see Chapter 2, The Logical Data Model), the
relationships between attributes should become apparent. Related
attributes such as City, State, or Region are often grouped in a common
hierarchy, like Location. In a logical data model, when attributes are in
the same hierarchy they must be related to each other, whereas
attributes in different hierarchies cannot be related.
a In the Attributes pane, select an attribute and click Add. The Select
Children Attributes dialog box opens.
b Select the child attributes from the list of available child attributes and
click OK. You are returned to the Attribute Creation Wizard.
c In the Children of: attribute name pane, select the relationship type
for the attribute to its child attribute. For more information on the
different attribute relationship types, see Attribute relationships, page
287.
17 When you have defined children for all the attributes that need them,
click Next. The Finish page opens.
18 Review the summary information in the Finish page and click Finish to
create the attributes.
After you have completed the steps of the Attribute Creation Wizard, the
attributes are created. This completes the initial creation of a project with
the Project Creation Assistant.
For example, a health care company, with offices only in the United States,
decides to extend its operations into Europe and Asia. Before the shift
overseas, the company does not include lookup tables with information
about different countries in its data warehouse.
However, when the company opens its offices in Europe and Asia, it must
add lookup tables that contain data about its new offices to its warehouse. It
must then add these tables to its MicroStrategy project, and create the
appropriate attributes so report users can analyze business data for their
appropriate country.
You can use various techniques and interfaces to create and modify
attributes for a project:
The Attribute Creation Wizard works well for building a large number of
attributes initially, but you cannot use it to modify existing attributes or to
define more advanced attributes. In general, you only use the Attribute
Creation Wizard as part of the initial project creation to create most of the
attributes for the project. For steps to use the Attribute Creation Wizard,
You can use the Attribute Editor to edit existing attributes and create
additional attribute forms, map heterogeneous column names, define
advanced expressions, configure additional settings, and so on. The
Attribute Editor allows you to modify one attribute at a time, which can be
helpful when only a few facts in a project need to be modified. For steps
to use the Attribute Editor, see Adding attributes with the Attribute Editor,
page 257 and Modifying attributes, page 260.
With Architect, you can support all of the simple and advanced attribute
features that are available in the Attribute Editor. Rather than focusing on
one attribute at a time with the Attribute Editor, you can use Architect to
create and modify multiple attributes for a project at once. For
information on how to use Architect, see Adding and modifying simple
and advanced attributes using Architect, page 261.
you need to create multiple attributes from remaining lookup columns in your
warehouse.
Follow the steps below to use the Attribute Creation Wizard to create simple
attributes in bulk.
You must use a login that has Architect privileges. See the List of Privileges
chapter in the System Administration Helpfor more information.
2 From the Folder List, select the project to which to add new attributes.
4 To create attributes with the Attribute Creation Wizard, follow the steps
outlined in Simultaneously creating multiple attributes, page 249.
2 From the File menu, select New, and then Attribute. The Attribute Editor
opens, with the Create New Form Expression dialog box displayed on top
of it.
3 From the Source table drop-down list, select a table which contains the
columns of data for the attribute. Its columns are listed in the Available
Columns pane.
4 Create a form expression for the ID form of the new attribute being
created.
• Automatic mapping means that all of the tables in the project with the
columns used in the attribute form expression are selected as
possible source tables for the attribute form. You can then clear any
tables mapped automatically or select other tables.
• Manual mapping means that all of the tables in the project with the
columns used in the attribute form expression are located but are not
selected as possible source tables for the attribute form. You can then
select which of those tables are used as source tables for the attribute
form.
To use an attribute for meaningful analysis, you must verify that it includes
a column from a fact table in its definition, or is related to an attribute that
does. For example, to use the Month attribute for analysis, you must create
a relationship to the Day attribute, which must include the DAY column from
the fact table in its definition. To create relationships between attributes,
see Attribute relationships, page 287.
7 Click OK. The Create New Attribute Form dialog box opens, from which
you can create attribute forms for the attribute (Column data descriptions
and identifiers: Attribute forms, page 267).
8 From the Source tables pane, select a table and click Set as Lookup to
set the lookup table for the attribute. A lookup table acts as the main
table which holds the information for an attribute. If you chose manual
mapping, select the check boxes of the tables to map to the attribute
form.
9 In the Form general information area, type a name and description in the
associated fields for the attribute form.
11 In the Form format area, select a display type and a default sorting
option from the associated drop-down lists.
Custom groups are sorted by the Default sort of the form that appears first
in the Report display forms. For more information on custom groups, refer to
the Advanced Reporting Help.
14 From the File menu, select Save As. The Save dialog box opens.
15 Navigate to the folder in which to save the attribute. Enter a name for the
attribute. Click Save.
16 From the Schema menu, select Update Schema to update the project
schema. This ensures that your project is updated to recognize the new
attribute definition.
Modifying attributes
After creating an attribute, you can modify the attribute at any time using the
Attribute Editor. You cannot use the Attribute Creation Wizard to modify
attributes.
• If you are only given the option of opening the Attribute Editor in read
only mode, this means another user is modifying the project's
schema. You cannot open the Attribute Editor in edit mode until the
other user is finished with their changes and the schema is unlocked.
• For information on how you can use read only mode and edit mode
for various schema editors, see Using read only or edit mode for
schema editors, page 108.
You can then modify all the options available when creating and attribute
in the Attribute Editor, which is described in the previous procedure To
create an attribute using the Attribute Editor, page 257.
You can learn how to create more advanced attributes in the various
sections in this chapter.
With Architect, you can support all of the simple and advanced attribute
features that are available in the Attribute Editor. Rather than focusing on
one attribute at a time with the Attribute Editor, you can use Architect to
create and modify multiple attributes for a project at one time. Review the
chapters and sections listed below for information on Architect and steps to
create and modify attributes using Architect:
The following example displays the physical warehouse table that stores
elements and data for the Customer attribute. Each attribute element is a
row in an attribute lookup table in your data warehouse, as shown below:
(attribute element) has its own set of information such as last name, first
name, email address, and so on which are defined by the attribute forms
(see Column data descriptions and identifiers: Attribute forms, page 267).
The display of attributes and their attribute elements is also affected by the
location of the metrics on the report. The report above uses the common
practice of putting the metrics (Sales Orders Quantity (Base Units) and Cost
Sales Orders) on the columns of the report.
For example, consider the simple report below which displays profits for
each month of the year.
This is the data that is shown to a user running the report with their regional
settings defined as English. By supporting internationalized data, the same
report can return the data shown below to a user with their regional settings
defined as German.
Pr er eq u i si t es
• The translated data has been stored in your data source, as described in
Supporting data internationalization, page 61.
2 Navigate to the Schema Objects folder, open the Attributes folder, and
then open a folder that contains attributes to enable or disable data
internationalization for.
• If you are only given the option of opening the Attribute Editor in read
only mode, this means another user is modifying the project's
schema. You cannot open the Attribute Editor in edit mode until the
other user is finished with their changes and the schema is unlocked.
• For information on how you can use read only mode and edit mode
for various schema editors, see Using read only or edit mode for
schema editors, page 108.
4 In the Attribute forms pane, select an attribute form and click Modify.
The Modify Attribute Form dialog box opens.
The ID form of an attribute does not have this option as these forms are
used strictly for identification purposes.
7 Click Save and Close to save your changes and return to Developer.
Every attribute must have at least one form, and most have at least two:
• A description form
Some attributes can have additional descriptive forms that do not serve as
the primary description form. For the Customer attribute, Email is included
as an additional descriptive form, as shown in the following diagram:
In the data warehouse, a lookup table with three columns holds the following
separate forms, described below:
In this example, the LU_CUSTOMER table records all of the attribute form
data for the Customer attribute.
Attributes must contain at least one ID form, which uniquely identifies the
attribute. The forms you create must have a reference to a lookup table and
can include multiple expressions. Each table must have an ID form; the ID
forms are used to join tables. When creating an attribute form, you can
choose a lookup table in the Attribute Editor from a list of tables existing in
the project. In the warehouse, two columns with different names can
represent the same information about an attribute. In such cases, you must
map the appropriate columns to the same attribute to retrieve accurate and
complete results when using an attribute on a report. Heterogeneous column
names are discussed in Attribute form expressions, page 273.
For example, two tables exist, one with the forms Customer_ID, Name, and
SSN. The second lookup table contains Customer _ID and Email. The
attribute will have the Customer_ID, Name, SSN, and Email forms and the
tables will join together through the ID columns because that is the column
they have in common.
• Format types: Control how the form is displayed and how filters are
defined. For example, specifying a format type of Big Decimal allows
users to preserve precision when qualifying on a form with more than 15
digits. Big Decimal is discussed in detail in Appendix C, Data Types.
• Report Sort: Defines how the attribute form is sorted by default when
included in a report. From the drop-down list, you can choose from
Ascending, Descending, or None. For information on how attribute forms
are sorted when multiple attribute forms of a single attribute define a
default sort order, see Default sorting of multiple attribute forms on
reports, page 272 below.
• Browse Sort: Defines how the attribute form is sorted by default when
viewed in the Data Explorer. From the drop-down list, you can choose
from Ascending, Descending, or None. The Data Explorer is discussed in
Hierarchy browsing, page 400.
Additional examples on how you can use the Report Sort and Browse Sort
options to display attribute information are provided in Using attributes to
browse and report on data, page 315.
• Shape File: Defines the shapes used to display the attribute form on
various MicroStrategy mapping features.
Of these five attribute forms, only Last Name has a default report sort order
defined. Modify the Address form so that it has a descending report sort
order. If you include Customer on a report with both Last Name and Address,
customers are sorted by their Last Name in ascending order. This is because
Last Name was created first and therefore is considered for sorting before
the Address form. If you remove the Last Name form from the report,
customers are sorted by their address in descending order.
This is the default functionality for how attributes are sorted by their
attribute forms on reports. It is important to note that you can change how
attribute forms are sorted from within a report. In a report you can use
advanced sorting to define how attribute forms, metrics, and other report
objects are sorted. Sorting defined for a report takes precedence over
default sorting defined for attribute forms. For more information on advanced
sorting, refer to the Advanced Reporting Help.
For example, the form expression for the Customer First Name attribute form
is CUST_FIRST_NAME. The form expression for the Customer Last Name
attribute form is CUST_LAST_NAME. In this instance, the CUST_FIRST_NAME
and CUST_LAST_NAME columns in the warehouse provide information about
first and last names respectively.
You can also create a form expression using Apply functions. These
functions are discussed in the Functions Reference.
Simple expressions
A simple expression is based on a single warehouse column. The definition
of the simple expression includes the tables in which the column is found.
At this point, the project designer must add the column containing the
customer dates of birth as an additional attribute form of the Customer
attribute. This will enable report designers to display each customer's date
of birth alongside each customer's name on reports.
You can also use Architect to create an attribute form with a simple
expression, as described in Creating attributes, page 167.
2 Navigate to the Schema Objects folder, open the Attributes folder, and
then the Customers folder.
• If you are only given the option of opening the Attribute Editor in read
only mode, this means another user is modifying the project's
schema. You cannot open the Attribute Editor in edit mode until the
other user is finished with their changes and the schema is unlocked.
• For information on how you can use read only mode and edit mode
for various schema editors, see Using read only or edit mode for
schema editors, page 108.
4 Click New. The Create New Form Expression dialog box opens.
5 From the Source table drop-down list, select the LU_CUSTOMER table.
This is the table that contains customers' dates of birth.
7 Click OK. The Create New Attribute Form dialog box opens.
8 In the Form general information area, in the Name field, type Customer
Birth Date.
9 From the Category used drop-down list, select DATE since Customer
Birth Date is neither the ID form of Customer nor the primary description
form.
10 Click OK. The new Customer Birth Date attribute form is added to the
Attribute form pane in the Attribute Editor.
11 Because this is only an example, close the Attribute Editor without saving
your changes.
Derived expressions
Derived expressions are created using a combination of warehouse
columns, mathematical operators, functions, and constants. While simple
expressions have their value determined by just one column in a warehouse
table, derived expressions are defined using one or more columns as well as
other operators and values. Any operation on a column (such as adding a
constant, adding another column, or setting the expression to be an absolute
value) creates a derived expression.
consists of the two strings. Using the Customer attribute, the syntax of the
derived expression for Name reads:
You can also use Architect to create an attribute form with a derived
expression, as described in Prerequisites, page 183.
2 Navigate to the Schema Objects folder, open the Attributes folder, and
then the Customers folder.
• If you are only given the option of opening the Attribute Editor in read
only mode, this means another user is modifying the project's
schema. You cannot open the Attribute Editor in edit mode until the
other user is finished with their changes and the schema is unlocked.
• For information on how you can use read only mode and edit mode
for various schema editors, see Using read only or edit mode for
schema editors, page 108.
4 Click New. The Create New Form Expression dialog box opens.
5 From the Source table drop-down list, select the LU_CUSTOMER table.
This is the table that contains customers' first and last names.
7 In the Form expression pane, place the cursor to the right of [CUST_
LAST_NAME] and type + ", " +.
10 Click OK. The Create New Attribute Form dialog box opens.
11 In the Form general information area, in the Name field, type Last Name,
First Name.
12 From the Category used drop-down list, select None since Last Name,
First Name is neither the ID form of Customer nor the primary description
form.
13 Click OK. The new attribute form is added to the Attribute form pane in
the Attribute Editor.
14 Because this is only an example, close the Attribute Editor without saving
your changes.
In the above example, you can use heterogeneous mapping to map the Day
attribute to all of the columns in the data warehouse that represent the same
concept of Day. You can map Order_Date and Day_Date to the Day
attribute. This ensures that both columns are used when information about
the Day attribute is displayed on a report.
Each expression is linked to a set of source tables that contain the columns
used in the expression. Of all the tables in which the columns exist, you can
select as many or as few as you want to be used as part of the attribute's
definition.
In the Attribute Editor, you can view the chosen tables in the source Tables
area to the right of the Form Expressions area.
You can also use Architect to create an attribute form with a heterogeneous
column mapping, as described in Prerequisites, page 183.
2 Navigate to the Schema Objects folder, open the Attributes folder, and
then the Time folder.
• If you are only given the option of opening the Attribute Editor in read
only mode, this means another user is modifying the project's
schema. You cannot open the Attribute Editor in edit mode until the
other user is finished with their changes and the schema is unlocked.
• For information on how you can use read only mode and edit mode
for various schema editors, see Using read only or edit mode for
schema editors, page 108.
4 Click New. The Create New Form Expression dialog box opens.
5 From the Source table drop-down list, select the LU_DAY table.
7 Click OK. The Create New Attribute Form dialog box opens.
8 Click New. The Create New Form Expression dialog box opens.
9 From the Source table drop-down list, select the ORDER_DETAIL table.
11 Click OK. The Create New Attribute Form dialog box opens.
Notice that there are now two expressions for the attribute form
definition, both of which use different tables as the source of their
information. You could continue this process to add as many
heterogeneous columns as part of one attribute form as necessary.
12 In the Form general information area, in the Name field, type Date
Example.
13 From the Category used drop-down list, select None since this is simply
an example scenario.
14 Click OK. The new Date Example attribute form is added to the Attribute
form pane in the Attribute Editor.
15 Because this is only an example, close the Attribute Editor without saving
your changes.
Implicit expressions
While most attributes map directly to one or more physical columns in the
warehouse, an implicit attribute is a virtual or constant attribute that does
not physically exist in the warehouse. Such an attribute has an implicit
expression, which is a constant value, although nothing is saved in an actual
column. Implicit expressions are not defined by column names; they are
defined by constants that you specify. Any constant is acceptable, for
example, RushOrder="Yes". Some attribute definitions can be implied by the
existence of a row in a certain table, rather than being defined in terms of
columns. Implicit attributes are useful in analyzing and retrieving relevant
information.
Implicit attributes are not commonly used, but are useful in special cases
such as the scenario described below.
The Rush Order attribute is defined by the implicit expression "Y", which
stands for Yes. This implicit expression is based on an order's existence in
the RUSH_ORDER table, rather than being based on a column in a table. This
is shown in the image below, which shows the RUSH_ORDER table and the
ORDER_FACT table, the latter being the lookup table for the Order attribute.
The ORDER_FACT table includes more schema objects than are shown
below, which are hidden as they are not important to this example.
In the RUSH_ORDER table shown above, the Order attribute and the Rush
Charge fact both display the table column that they use for their
expressions. You can identify Rush Order as an implicit attribute because it
has no associated table column to define its implicit expression.
The Tutorial project also includes a Rush Orders by Call Center report,
which displays the Rush Order attribute on a report. For each order that is a
rush order, a "Y" is displayed in the Rush Order column, as shown below.
In the report shown above, the Rush Charge is also displayed to show
additional shipping costs that were charged to send the order as a rush
order.
They can also help you take more advantage of the data in your data
warehouse. For attributes, a column alias performs the same function as it
does for facts. By default, the data type for an attribute form is inherited
from the data type of the column on which the form is defined. This
inheritance is governed by MicroStrategy, which attempts to use a data type
as similar as possible to the data type in your database or other data source
(see Appendix C, Data Types for more information on how MicroStrategy
selects a matching data type). However, there are cases where you may
need to change the data type. The following are some examples of such
cases.
In your data warehouse you have a lookup table for an Accounts attribute
where the ID is Account Number and the ID is stored in the database as
DECIMAL(18, 0). Because this column stores high-precision values, you
must modify the column alias for the attribute form and map it to a special
data type, Big Decimal. By doing so, the precision can be preserved when
performing filtering, drilling, or page-by on the Account attribute.
Another example could be a case in which your warehouse does not have a
lookup table for year information, but you would like to create a Year
attribute. Many database platforms have functions that can extract parts of a
date from a Date data type. For example, SQL Server has a Year function
that extracts just the year from a date. In such a case, you can create a Year
attribute using the following form expression:
ApplySimple("Year(#0)",[Date_Id])
The data type for this attribute is automatically set to a Date data type. This
is because Date_ID is a Date data type. However, the result of the
ApplySimple calculation is an integer value that represents a given year,
such as 2011.
When a temporary SQL table is created, if you do not change the data type
of the column alias, the system uses a Date data type and tries to insert
integer data into this column. While this does not create a problem in all
database platforms, some databases will return an error. To avoid the
possibility of an error due to conflicting data types, modify the column alias
for the attribute form and change the default Date data type to an Integer
data type.
In addition to specifying the data type to be used for an attribute form, the
column alias also lets you specify the column alias name to be used in the
SQL generated by MicroStrategy. When you create a form expression using
a custom expression or multiple columns (as discussed in Attribute form
expressions, page 273), the column alias for the attribute form defaults to
CustCol (or CustCol_1, CustCol_2, and so on). The following piece of
SQL shows, in bold, where the column alias name is used:
While the column alias name does not affect the actual results or your
report, you can change the column alias name to be more meaningful. The
above example is a simple one, but this can be useful for troubleshooting the
SQL for a particularly complex report.
You can use the Attribute Editor to create column aliases. You can also use
Architect to create column aliases, as described in Prerequisites, page 183.
Pr er eq u i si t e
• If you are only given the option of opening the Attribute Editor in read
only mode, this means another user is modifying the project's
schema. You cannot open the Attribute Editor in edit mode until the
other user is finished with their changes and the schema is unlocked.
• For information on how you can use read only mode and edit mode
for various schema editors, see Using read only or edit mode for
schema editors, page 108.
3 Select an attribute form and click Modify. The Modify Attribute Form
dialog box opens.
5 In the Column alias area, click Modify. The Column Editor - Column
Selection dialog box opens.
6 Select New to create a new column alias. The Column Editor - Definition
dialog box opens.
7 You can modify the following properties for the column alias:
• Column name: The name for the column alias which is used in any
SQL statements which include the attribute form column.
• Data type: The data type for the attribute form. For a description of
the different data types supported by MicroStrategy, see Appendix C,
Data Types.
• Depending on the data type selected, you can specify the byte length,
bit length, precision, scale, or time scale for your column alias.
8 Click OK to save your changes and return to the Column Editor - Column
Selection dialog box.
In general, you should map data to an attribute form rather than a separate
attribute if:
Attribute relationships
After you have created attributes for your project, you can define attribute
relationships to define how the engine generates SQL, how tables and
columns are joined and used, and which tables are related to other tables.
The implications of whether attributes are related become clear when you
begin building reports. You can run a report with two attributes that are
related without any problems. For example, it is easy to include Country and
For example, the Distribution Center attribute is the parent of the Call
Center attribute. A one-to-one relationship exists between Distribution
Center and Call Center. This means that only one call center exists in each
distribution center. Country, in turn, is the parent of Distribution Center and
multiple distribution centers exist in each country. So these two attributes
have a one-to-many relationship.
Follow the procedure below to view and edit the parents and children of the
Distribution Center attribute.
2 Navigate to the Schema Objects folder, open the Attributes folder, and
then the Geography folder.
• If you are only given the option of opening the Attribute Editor in read
only mode, this means another user is modifying the project's
schema. You cannot open the Attribute Editor in edit mode until the
other user is finished with their changes and the schema is unlocked.
• For information on how you can use read only mode and edit mode
for various schema editors, see Using read only or edit mode for
schema editors, page 108.
4 Click the Children tab. The Call Center attribute is listed, along with the
relationship type it shares with Distribution Center, and the relationship
table in which the relationship exists.
Consider a scenario in which multiple call centers now exist in the same
distribution center so they no longer have a one-to-one relationship; in
this case, you must change the relationship type between Call Center
and Distribution Center.
6 You also want the relationship between the two attributes to be defined in
the LU_Employee table instead of the LU_Call_Ctr table in which it is
defined now. To change the relationship table, select the LU_Employee
table from the Relationship table drop-down list.
7 Click the Parents tab. The Country attribute is listed, along with the
relationship type it shares with Distribution Center, and the relationship
table in which the relationship exists.
From this Parents tab, you can view or modify the existing parent
attribute relationships, as well as create or delete new parent attribute
relationships.
While the topics are largely related to logical model design, a working
knowledge of physical schemas is helpful when dealing with the challenges
involved with these topics.
Before reading this section, you should know what logical data models and
physical warehouse schemas are, and how to read and interpret them.
Logical data models and physical warehouse schemas are discussed in
Chapter 2, The Logical Data Model and Chapter 3, Warehouse Structure for
Your Logical Data Model respectively. These chapters discuss how to plan
and create a conceptual framework for your business intelligence data.
Many-to-many relationships
The presence of many-to-many relationships introduces complexity during
the warehouse design process. With the presence of many-to-many
relationships, you must make additional considerations to effectively plan
your design.
The following sections use the example of items and colors to demonstrate a
many-to-many relationship and the options you have for dealing with them.
One item can come in many colors, such as red hats, blue hats, and green
hats, and one color can be associated with many items, such as red dress,
red hat, red shoes, and red socks.
With the color and item many-to-many relationship, there are usually two
business questions for which users want answers:
Answering the first question requires a table that contains a list of all
possible item/color combinations. Recall that one-to-many relationships are
usually in the child's lookup table.
Answering the second question requires a fact table that has sales
information as well as color and item information. The following diagram
shows the same scenario as before, but in addition it shows a simple fact
table containing sales data keyed by item, color, and date.
The fact table in the above diagram alone is not sufficient to answer the first
question. Only item and color combinations that were actually sold, and
therefore have sales recorded, can be retrieved from this table. If you have
item and color combinations that are available but that have never been
sold, this fact table cannot provide a complete list of item and color
combinations to answer question one.
You can implement the above points in several different ways, which are
discussed in Working with many-to-many relationships, page 297.
Multiple counting
• You attempt to aggregate data to the level of one of the attributes in the
many-to-many relationship, or a higher level than one of the attributes in
the many-to-many relationship.
• All of the attributes in the many-to-many relationship are not in the fact
table.
Recall the example from above, but make the following change: remove
color from the fact table.
Assume that there are three items, including hats, dresses, and socks.
These items come in three colors, including red, blue, and green, with the
exception of socks, which come in only green and blue. The following
diagram shows this data in the lookup tables as well as some simple sales
data:
The risk of multiple counting occurs when you run a query requesting the
sales by color, effectively aggregating to the item attribute level in the many-
to-many relationship. This query would require both the fact table, which has
the sales information by item, and the relationship table, since color is not
recorded in the fact table.
The difficulty lies in the fact that color is not in the fact table. There is no
way to directly relate the sales of an item in the fact table to the color of that
particular item. For example, instead of calculating the sales of red items,
the query aggregates sales for all items that come in red according to the
relationship table. The sum includes all hats and all dresses, including blue
ones and green ones. This obviously leads to numbers that are higher than
the true sales for red items.
For example, using the given data, the following questions cannot all be
answered accurately:
The answer is $35, which can be calculated directly from the fact table.
You cannot determine an accurate answer. The answer you get is $85,
which is the total for all hats and dresses, since socks do not come in
red. It is entirely possible that all the dresses sold are green; however,
you cannot confirm this since color is not recorded in the fact table.
Again, you cannot determine an accurate answer. If all the dresses sold
are indeed green, the correct answer is $0, but the answer you will get
based on the data in the fact table is $50.
As you can see, seemingly simple questions can require you to take a
number of steps to answer them when many-to-many relationships are
involved.
You can use one of three techniques to provide physical support to answer
the types of questions that cannot be answered accurately when using
many-to-many relationships. The three techniques all have differing levels of
flexibility, and flexibility is always a trade-off with complexity. In all cases,
the two fundamental components remain in place in one form or another:
All of the following methods require additional data in the fact table. This
means that you must capture the additional data in the source system. For
example, you need to have data in the source system as to what the color is
of each item sold. If this additional data was never captured in the source
system, you cannot fully resolve the many-to-many relationship to calculate
the amount of sales for items of a certain color.
Method 1
Method 1 requires you to create a separate relationship table (in this case,
Rel_Color_Item) and add both attribute IDs to the fact table as shown in
the following diagram.
Method 2
While this method eliminates the need for a separate relationship table, you
lose the ability to view items independent of color, or vice versa.
Method 3
Method 3 is the most versatile solution and has the following characteristics:
• Requires only one attribute column in the fact table for complete
flexibility, rather than two
Here you must create a new attribute, lower in level than either Color or
Item. This attribute is essentially a concatenation of Color and Item, which
gives it a one-to-many relationship between itself and each of its parent
attributes. This is the SKU attribute, particularly common in retail data
models or situations.
Finally, rather than including Color and Item in the fact table, you only need
to include this new child attribute SKU, as shown in the following diagram.
The major disadvantage of Method 3 lies in creating the new attribute if your
business model does not already use a similar structure, as well as possibly
adding complexity to the ETL process.
Joint child relationships connect special attributes that are sometimes called
cross-dimensional attributes, text facts, or qualities. They do not fit neatly
into the modeling schemes you have learned about thus far. These
relationships can be modeled and conceptualized like traditional attributes
but, like facts, they exist at the intersection of multiple attribute levels.
An example of a promotion might be a "Red Sale" where all red items are on
sale. A business might run this promotion around Valentine's Day and again
at Christmas time.
However, these tables are not sufficient to answer the following more
detailed and insightful questions:
To answer these questions, you must combine the two relationship tables,
creating one table to relate all three attributes.
The relationship in the distinct relationship table must exist for a joint child
relationship to be properly defined. However, it does not necessarily have to
be in its own, distinct relationship table. Defining the relationship directly in
the lookup table for the parent of the joint child—in this case, Promotion—
would be fine. Alternatively, you can build the relationship directly into the
fact table.
If you have a joint child relationship in your data, it is important for you to
define it in MicroStrategy so that you get the correct data for reports that use
the parent attribute in a joint child attribute. This ensures that when you
need to join the fact table to the parent attribute of a joint child relationship
(for example, to see sales by promotion) the join will always use both joint
children rather than just one or the other.
When multiple attributes are defined using the same lookup table and
column, the attributes are essentially playing different attribute roles. How
an attribute plays multiple roles depends on the specific attribute.
The Origin Airport and Destination Airport attributes share the same
attribute forms, or various aspects about them, such as description,
location, and so on. In the fact table, however, a separate column exists for
each of their roles; the fact columns are ORIGIN_AIRPORT_ID and
DESTINATION_AIRPORT_ID, as shown below.
If a report designer places both the Origin Airport and Destination Airport
attributes on a report to obtain the number of flights that originated from MIA
and arrived at LGA, an empty result set is returned. This occurs because the
SQL statement tries to obtain the description of an airport that is both MIA
and LGA at the same time (Airport_ID = "MIA" AND Airport_ID =
"LGA").
If you identify that one of your attributes needs to play multiple roles, you
must create an attribute in the logical model for each of the roles, as
explained in Specifying attribute roles, page 306. This ensures that a report
with attributes playing multiple roles returns correct data.
• Explicit table aliasing, where you create multiple logical tables pointing
to the same physical table and define those two logical tables as the
lookup tables for the two attributes.
Table aliasing provides advanced users with more control. If you are
upgrading or have a very complex schema, it may be the better alternative. If
you are new to MicroStrategy, however, it is easier to use automatic
attribute role recognition. MicroStrategy recommends that you take
advantage of automatic role recognition if you do not know the details of the
modeling logic or the database.
Automatic recognition does not work if the attributes are in the same
hierarchy, meaning that a child attribute is shared. For example, in the State
example provided above, the two State attributes do not have a common
child attribute.
In summary, if you identify that any one of your attributes needs to play
multiple roles, an attribute must be created in the logical model for each of
the roles. Remember this rule to help you identify attribute roles: If you want
to see the same attribute multiple times on one report, as Ship Month and
Order Month, for example, the attribute has multiple roles. In this example,
Month is the attribute that has multiple roles. You can use either automatic
attribute role recognition or explicit table aliasing to create the attribute
roles.
Note that both roles for the State attribute are included in the logical model
so that "State" can be considered from two different perspectives. Since the
state in which a vendor resides and the state in which one of the stores is
located are two different things, the logical model must reflect that.
Automatic recognition allows these two attributes, Vendor State and Store
State, to access the same lookup table, using different attribute names for
the same expression.
Automatic role recognition works only when the attributes use exactly the
same expression, which in most cases simply represents a column or
columns in a lookup table.
In this case, the request is, "Show me total sales by Store State for all my
vendors in Arkansas (Store State ID = 15)." The same lookup table, LU_
State, can be used for both attributes, Store State and Vendor State, if
attribute roles are used. The two attributes refer to the same columns of that
table.
To use automatic attribute role recognition, you must select the Engine
Attribute Role Options, found in the database instance-level VLDB
Properties under Query Optimization. See the MicroStrategy Developer Help
(formerly the MicroStrategy Desktop Help) or the System Administration
Help for steps to set this VLDB property.
An attribute such as State can play more than one role in the data
warehouse; it can represent the Vendor State or the Store State. In this
case, the State attribute is said to play two roles: it refers to both the
location of a vendor as well as the location of a store.
When you use explicit table aliasing to designate attributes that have
multiple roles, both roles for the State attribute are included in the logical
model so that State can be considered from two different perspectives. The
logical model would look like the following, just as it would if you used
automatic recognition:
If you use explicit table aliasing for the Store attribute, one table (LU_
STATE_STORE) contains the attribute Store State while the other (LU_
STATE_VENDOR) contains Vendor State, as shown in the following diagram.
Consider the following sample desired report that should provide data about
the total sales by Store State for all vendors in Arkansas (Store State ID =
15):
When explicit table aliasing is used, the two lookup tables LU_STATE_
STORE and LU_STATE_VENDOR are used. Since they are just different
names for the same physical table, the report accesses the same physical
table, LU_STATE, for both state names, as shown by this sample SQL:
When you create a table alias, the selected table is copied, allowing you to
rename a copy of the same table. When you are ready to create new
attributes—as in the example discussed above—you can map the
appropriate table to each attribute. In the case above, you would select the
LU_STATE_STORE table for the Store State attribute and LU_STATE_
VENDOR for Vendor State.
Table aliases are one kind of logical table. For information about logical
tables, refer to Appendix B, Logical Tables.
You can also use Architect to create attribute roles with explicit table
aliasing, as described in Prerequisites, page 183.
2 Navigate to the Schema Objects folder, and then select the Tables
folder.
3 Right-click the LU_STATE table and select Create Table Alias. An LU_
STATE(1) table is created.
5 Right-click the LU_STATE table and select Create Table Alias. An LU_
STATE(1) table is created.
Cr eat e t h e at t r i b u t es
8 From the File menu, select New, and then Attribute. The Create New
Form Expression dialog box opens.
11 Select Manual mapping and click OK. The Create New Attribute Form
dialog box opens.
12 From the Source table drop-down list, select the same LU_STATE_
STORE table.
14 Click New to create any other required attribute forms for the State Store
attribute, such as a description attribute form. You must make sure to
map any State Store attribute forms to columns from the LU_STATE_
STORE table.
15 Save the State Store attribute once you are finished mapping attribute
forms to columns of the LU_STATE_STORE table.
16 Create a Vendor State attribute with the same sub-procedure (Create the
attributes, page 311) used to create State Store above, except you must
use the LU_STATE_VENDOR table instead of the LU_STATE_STORE table.
For example, a retail project has two attributes, Class and Item. Class is the
parent of Item and has a one-to-many relationship with it. The values in the
Item_ID column do not uniquely identify an item. The item shirt has an
Item_ID of 1. However, there are different shirts, depending on the class,
which includes men's, women's, and children's. Therefore, to uniquely
identify a man's shirt, Item_ID and Class_ID must be grouped together,
creating a compound attribute.
All of the ID forms of the compound attribute should be within the same
lookup table.
3 From the File menu, select New, and then Attribute. The Attribute Editor
opens, with the Create New Form Expression dialog box displayed on top
of it.
4 From the Source table drop-down list, select the LU_DIST_CTR table.
This is the table in which the two ID columns of Distribution Center
reside.
6 Select Automatic mapping and click OK. The Create New Attribute Form
dialog box opens.
7 In the Form general information area, in the Name field, type Country
ID.
9 In the Attribute Editor, click New to create the other attribute ID form.
This attribute form maps to the distribution center ID column necessary to
complete the definition of the Distribution Center attribute.
11 Select Automatic mapping and click OK. The Create New Attribute Form
dialog box opens.
13 In the Form category section, from the Category used drop-down list,
select ID. Click OK.
Cr eat e a f o r m gr o u p
14 A dialog box notifies you that another form (in this case, COUNTRY_ID) is
already using the ID form category and that you must create a form group
to combine the two ID columns. Click Yes. The Create New Attribute
Form dialog box opens.
15 In the Name field, type Distribution Center and click OK. The Attribute
Editor opens, with the form group you created in the Attribute forms pane.
If you create a compound attribute, you must update the schema to see
your changes in the project. Close all editors. Then, from the Schema
menu, select Update Schema.
You must choose a default attribute display for browsing and another for
reporting. Report display forms are the attribute forms that appear as
columns in a completed report. Browse forms are the attribute forms that
appear as a user browses through the element list of an attribute in the Data
Explorer in a project. Therefore, browse forms identify attribute elements.
This separation allows for greater attribute display flexibility depending on
the application.
The browse forms of the attribute are also used to display the attribute
elements in the prompt details auto text code of a Report Services
document. For information on creating Report Services documents, see the
Document Creation Help.
When creating attributes, all forms are included as report display forms and
browse forms by default. The only exception is if you create multiple
attribute forms, the first form you create is not included as a report display
or browse form.
You can also select which attribute forms are retrieved with the report
results but not displayed on the grid. These browse forms are found in the
Report Objects pane. In Grid view, you can add the attribute forms in Report
Objects to the report without re-executing the report. For example you can
include a cities URL attribute form as a browse attribute form so that your
users can choose to display the form on a report.
• From the Data menu, select Attribute Display to open the Attribute
Display dialog box
For steps to display attribute forms on a report or template, see the online
help and the section below.
You can use the Attribute Editor to determine how the attribute forms are
displayed on a report. In the case of the Distribution Center attribute, you
can specify whether the identification number of each distribution center, the
distribution center names, or both are displayed. You can also determine
which attribute forms are displayed when browsing a project with the Data
Explorer.
Follow the example procedure below to set one of the Distribution Center
attribute's forms to be displayed in reports and while browsing the
MicroStrategy Tutorial project.
You can also use Architect to define how attribute forms are displayed in
reports, as described in Prerequisites, page 183.
• If you are only given the option of opening the Attribute Editor in read
only mode, this means another user is modifying the project's
schema. You cannot open the Attribute Editor in edit mode until the
other user is finished with their changes and the schema is unlocked.
• For information on how you can use read only mode and edit mode
for various schema editors, see Using read only or edit mode for
schema editors, page 108.
On the right, in the Report display forms pane, the description form of the
Distribution Center is set as the only display form. This means that, when
the Distribution Center attribute is used on a report, the actual names of
the distribution centers are displayed. The ID 2 form in the Available
forms pane represents the distribution centers' identification numbers.
5 You can also define the default sort order for attributes on reports and
the Data Explorer. For information on attribute form sorting options, see
Displaying forms: Attribute form properties, page 270.
6 Because this is only an example, close the Attribute Editor without saving
your changes.
You can also determine how attributes are displayed while users are editing
and viewing reports. See the Basic Reporting Help for details.
O PTIM IZIN G AN D
M AIN TAIN IN G YOUR
PROJECT
Although the concepts are related, the project schema is not the same as the
physical warehouse schema. Rather, the project schema refers to an
internal map that MicroStrategy uses to keep track of attribute relationships,
fact levels, table sizes, and so on within the project.
Whenever you make any changes to a schema object you must indicate to
MicroStrategy that new schema object definitions have been included and
that these definitions need to be loaded into memory.
2 In the Schema Update dialog box, select or clear the following check
boxes:
• Recalculate table keys and fact entry levels: Use this option if you
changed the key structure of a table or if you changed the level at
which a fact is stored.
Logical table sizes are a significant part of how the MicroStrategy SQL
Engine determines the tables to use in a query.
3 Click Update.
You can also update the schema with the last saved settings by clicking the
Update Schema icon in the toolbar.
project. The Warehouse Catalog queries the data warehouse and lists the
tables and columns that exist in it. From this list, you can select the tables to
add to your project. Every project can have a unique set of warehouse
tables.
You can add warehouse tables to your project with the Warehouse Catalog
or Architect. The Warehouse Catalog is well-equipped at maintaining the
warehouse tables used for an existing project. For information on Architect,
see Chapter 5, Creating a Project Using Architect.
• You can connect to MDX Cube sources such as SAP BI, Hyperion
Essbase, and Microsoft Analysis Services instead of a relational
database. In this case, the MDX Cube Catalog handles tasks similar
to the Warehouse Catalog. For more information, refer to the
MicroStrategy MDX Cube Reporting Guide.
• Your schema, so you know how the information in your data warehouse
should be brought into MicroStrategy
You must use a login that has Architect privileges. For more information
about privileges see the List of Privileges chapter of the System
Administration Help.
3 If you are using read only mode for the project, from the Schema menu,
clear the Read Only Mode option to switch to edit mode.
to your project. Also, as your project matures, you may need to remove
tables from your project that are no longer used and are taking up space in
the metadata.
You can access the Warehouse Catalog at any time to add additional tables
from your data warehouse to your project and remove tables from your
project.
For information on removing tables from a project that were removed from a
data source, see Managing warehouse and project tables, page 327.
2 The left side of the Warehouse Catalog lists all available tables and the
number of rows each table contains. The list on the right shows all the
tables already being used in the project:
• To add tables: From the left side, select the tables you want to add to
the Warehouse Catalog, and click > to add the selected tables. Click
>> to add all the listed tables.
• To remove tables: From the right side, select the tables you want to
remove from the Warehouse Catalog, and click < to remove the
selected tables. Click << to remove all the listed tables.
• If you have the MultiSource Option, you can add tables from multiple
data sources into your project. For information on adding tables from
multiple data sources into your project with the Warehouse Catalog,
see Accessing multiple data sources in a project, page 350.
3 In the toolbar, click Save and Close to save your changes to the
Warehouse Catalog. The table definitions are written to the metadata.
This process can take some time to complete.
4 Update the project schema from the Schema menu, by selecting Update
Schema.
• Select current database instance: From the drop-down list, select the
database instance for the data source to view tables for. This option is
available as part of the MultiSource Option, which allows you to access
multiple data sources in a project, as described in Accessing multiple
data sources in a project, page 350.
• Tables being used in the project: Displays tables that have been
selected to be part of the project. You can remove tables from the project
by double-clicking the tables or by selecting the tables and then clicking
<.
You can add or remove all the tables from one section to the other by
clicking << and >> buttons.
Menu Description
File
• Save Saves the current settings and status of the Warehouse Catalog.
Tools
• Table
Displays the structure of a table selected in the Warehouse Catalog.
Structure
• Calculate
Table Row Calculates the number of rows in the selected tables.
Count
• Table Prefix Allows you to add or remove a table prefix for the selected table.
• Import Prefix Allows you to import the prefixes from the warehouse table name space.
Allows you to specify various settings for the Warehouse Catalog such
• Options as changing the database instance, changing or assigning default table
prefixes and structures, automatic mapping, row calculation, and so on.
Actions
Menu Description
• Read the
Allows you to update and reflect the changes done to tables in the
Warehouse
warehouse.
Catalog
Some of these options are also available through toolbar buttons and
through right-click menus for quick access.
The dialog box displays the columns available in the selected table and the
data type of each column. You can also click Update Structure to reflect
any recent changes done to that table (see Updating table structure, page
330).
When the data type of one or more columns is modified, you get a warning
message of this change, which provides the following options:
• Click OK to apply the change to this column in all the tables it appears.
• Click Cancel to undo all data type changes. This action results in no
changes being applied to any tables or columns.
The warning message appears only if you have selected the Display a
warning if the columns data types are modified when updating the
table structure option in the Warehouse Catalog Options dialog box. This
option is selected by default.
1 Access the Warehouse Catalog for your project (see Accessing the
Warehouse Catalog, page 325). The Warehouse Catalog opens.
2 In the Tables being used in the project list, right-click the table that has
changed and select Update Structure.
3 Click Save and Close to close the Warehouse Catalog dialog box.
a Right-click the fact and select Edit. The Fact Editor opens.
b Select the fact expression and click Modify. The Modify Fact
Expression dialog box opens.
c From the list of source tables select the source table from which
the fact has been created. Edit the fact expression and click OK.
You are returned to the Fact Editor.
d Click Save and Close to save the changes and close the Fact
Editor.
f Click Update.
g Repeat the first two steps of this procedure to open the Warehouse
Catalog and update the table structure.
h Click Save and Close to save the changes and close the
Warehouse Catalog dialog box.
view an accurate list of tables that are included in the project from the
selected data source.
The steps below show you how to perform this task using the Warehouse
Catalog. To remove these tables using MicroStrategy Architect, see
Removing tables, page 143.
If tables that were not included in a project are removed from the data
source, these tables are automatically removed from the display of available
tables in the Warehouse Catalog.
To remove the display of project tables that have been removed from
the data source
3 From the Warehouse Catalog toolbar, click Check for deleted catalog
tables. The Deleted Catalog Tables dialog box opens.
4 Select the Delete check box for a table to remove it from the Tables
being used in the project pane.
5 After you have selected all the tables to delete, click OK to return to the
Warehouse Catalog.
6 From the Action menu, select Read the Warehouse Catalog. All tables
that were selected to be deleted in the Deleted Catalog Tables dialog box
are removed from the Tables being used in the project pane.
7 Click Save and Close to save your changes and close the Warehouse
Catalog.
If you use database gateway support, you cannot use the MultiSource
Option feature to add tables from multiple data sources into your project. For
information on adding tables from multiple data sources into your project
with the Warehouse Catalog, see Accessing multiple data sources in a
project, page 350.
1 Access the Warehouse Catalog for your project (see Accessing the
Warehouse Catalog, page 325). The Warehouse Catalog opens.
2 Right-click a table being used in the project, (in the pane on the right
side) and select Table Database Instances. The Available Database
Instances dialog box opens.
6 From the toolbar, select Save and Close to save your changes and close
the Warehouse Catalog.
• Displaying table prefixes, row counts, and name spaces, page 339
• Mapping schema objects and calculating logical sizes for tables, page
340
▫ Database Instance: You can select the primary database instance for
the Warehouse Catalog from the drop-down list.
The primary database instance acts as the main source of data for a
project and is used as the default database instance for tables added
to the project. Non-database related VLDB property settings are also
inherited from the primary database instance.
▫ Custom Database Login: You can either select the database login or
clear the login to use no database login.
• Read Settings: You can define how database catalog tables are
retrieved:
You can customize the SQL to read the Warehouse Catalog for every
platform (except Microsoft Access), by clicking Settings. This allows
you to directly edit the catalog SQL statements that are used to
retrieve the list of available tables from the Warehouse Catalog and
the columns for the selected tables. The default catalog SQL retrieves
a DISTINCT list of tables and columns from all users. You could
restrict the information returned, for example, by specifying certain
conditions and table owners (see Customizing catalog SQL
statements, page 342).
You can also choose from the following options to read the database
catalog tables:
▫ Read the table Primary and Foreign Keys: Select this option to
display, in MicroStrategy, which columns are defined as primary keys
or foreign keys in the data source. Primary keys and foreign keys can
help facilitate joining tables to create Query Builder reports, as
described in the Advanced Reporting Help.
▫ Count the number of rows for all tables when reading the
database catalog: Select this option if you want to control whether
the Warehouse Catalog should get the number of rows each table has
when loading from the data warehouse. This option is helpful when
you want to identify fact tables and aggregation tables. If performance
is more important than obtaining the row count, do not select this
option as it will have a negative effect on performance. By default this
option is selected when you open the Warehouse Catalog for the first
time.
▫ Ignore current table name space when reading from the database
catalog and update using new table name space: This option
allows you to switch between warehouses found in different database
name spaces. For more information, see Ignoring table name spaces
when migrating tables, page 341 of this appendix. By default this
option is selected.
▫ Column Merging Options: When you add a new table to your data
warehouse, it may redefine the data type for a column included in the
project. For example, your project includes a table named Table1 that
has column C1 of data type char(1). Then a new table named Table2
is added to the project, but it has column C1 set to data type char(4).
This example is used to illustrate the options described below. When
you update the table structure, the column data types are modified to
The options below do not handle the merge if the data type has changed to
an incompatible data type. For example, a column is changed from data
type char to data type integer. If the data type has changed to an
incompatible data type, a warning is displayed and you are asked if you
want to use the new data type.
— Use most recent data type: This option updates the column data
type to use the most recent column definition. In the example
above, the column data type for C1 would be changed to char(4)
since Table2 was added after Table1.
• Table Prefixes: You can specify whether table prefixes are displayed in
table names and how prefixes are automatically defined for tables that
are added to the project. You have the following options:
▫ Automatically define prefixes for all tables that are added to this
project: This setting enables/disables the following options:
database supports prefixes. You can select the default prefix from
the Default prefix box drop-down list or create a new table prefix
by clicking Modify prefix list.
— Modify prefix list: You can create a new tables prefix or delete an
existing prefix by selecting this option. The Table Prefixes dialog
box opens. For more information on modifying the prefix list, see
the online help.
• Table Row Counts: You can show or hide the number of rows per table,
using the check box:
▫ Display the number of rows per table: You can show or hide the
values calculated for the number of rows for the tables. By default,
this option is selected and the number of rows are shown.
• Table Name Spaces: You can show or hide the name space for each
table, using the check box:
▫ Display the name space for each table (if applicable): You can
show or hide the owner or table name space where the table is
located in the warehouse. By default, this option is selected and table
name spaces are shown.
If the table was added to the Warehouse Catalog first and then the attribute
was created, the Warehouse Catalog automatic mapping settings do not
determine whether the attribute and table are automatically mapped.
Automatically mapping tables to schema objects when adding attributes or
facts to a project is controlled by the Attribute Editor and Fact Editor,
respectively.
• Table Logical Sizes: You can select whether the Warehouse Catalog
calculates logical sizes for new tables using one of the following options:
Most database management systems (Oracle, DB2, and others) support the
concept of a table name space, which is a way of organizing database tables
into different storage spaces. This method allows you to repeat the same
table name in different table name spaces. For instance, you can have LU_
STORE in a table name space called dbo and another table LU_STORE in
another table name space called admin. You now have two tables dbo.LU_
STORE and admin.LU_STORE. The table name space provides an extra
piece of information that uniquely identifies the table.
When you add tables to a project, the Warehouse Catalog saves information
to the appropriate table name space. This can cause a problem when you
migrate from a warehouse that resides in a certain table name space to
another warehouse in a different table name space. The Warehouse Catalog
interprets the table as already in the project and not found in the new
warehouse. This is because the Warehouse Catalog is looking for a table
named dbo.LU_STORE, and the table is actually stored as admin.LU_
STORE in the new production warehouse.
To solve this problem, select the Ignore current table name space when
reading from the database catalog and update using new table name
space check box. You can find this option in the Warehouse Catalog
Options dialog box under the Catalog - Read Settings options subcategory.
If you select this option, the Warehouse Catalog ignores the current table
name space when it reads the catalog information. Thus, the Warehouse
Catalog recognizes the two tables as the same table and saves the new
table name space information. This setting allows you to migrate much more
easily between warehouses. If the check box is cleared, the Warehouse
Catalog defaults to identifying the table by both table name space and table
name.
These catalog SQL statements vary from platform to platform and can be
customized according to the characteristics of the specific warehouse.
Microsoft Access does not have catalog tables, so an ODBC call must be
used to retrieve information about tables and columns in Access. By default,
a similar ODBC call is used for the Generic DBMS database type, but you
can choose to use custom catalog SQL for the generic type if you want.
The two retrieval options use different catalog SQL, but both can be
customized in the Warehouse Catalog Options dialog box. In the following
sections, the name Catalog Table SQL refers to the catalog SQL to retrieve
the tables in the warehouse; that is, the first SQL used in a two-pass catalog
retrieval.
The name Full Catalog SQL refers to the SQL used to read all the tables and
columns in one pass.
The table name space is optional. A customized catalog SQL can omit the
name space if duplicate table names do not present a problem in the
warehouse database.
Full Catalog SQL must return its rows ordered first by NAME_SPACE, if
available, and then by TAB_NAME.
The following example is the default Full Catalog SQL for Microsoft SQL
Server 7.0:
1 Access the Warehouse Catalog for your project (see Accessing the
Warehouse Catalog, page 325). The Warehouse Catalog opens.
2 From the Tools menu, select Options. The Warehouse Catalog Options
dialog box opens.
3 Expand the Catalog Category, and select Read Settings. The Catalog -
Read Settings options are displayed.
4 Click the Settings button, the catalog SQL options are displayed as
shown below.
The top pane controls the Catalog Table SQL and the bottom pane controls
the Full Catalog SQL.
1 Access the catalog SQL options for your project (see Modifying catalog
SQL, page 346). A dialog box for the catalog SQL options is displayed.
• The top pane controls the Catalog Table SQL, which retrieves a list of
available tables in the Warehouse Catalog.
• The bottom pane controls the Full Catalog SQL, which retrieves
column information for the selected tables.
Before performing the next step, cut and paste the SQL statements in the
two panes into any text editor. This allows you to save any modifications
you have made previously to the catalog SQL statements, and then compare
them to the default statements you are about to generate.
2 Generate and view the default catalog SQL for your database platform.
Any text in the panes is overwritten with the default catalog SQL
statements:
• To generate and view the default Catalog Table SQL for your
database platform, click the upper-most Use Default button.
• To generate and view the default Full Catalog SQL for your database
platform, click the bottom-most Use Default button.
You can use the default catalog SQL statements or compare and combine
them with your own customized catalog SQL statements.
Tables missing
This happens when one or more tables already in the project are removed
from the data warehouse. Two cases can be seen:
▫ Remove the table from the project. In this case, the Warehouse
Catalog does not check for any dependencies until you save the
changes. If there are any dependencies, they are presented to you,
and you have the option to proceed or cancel the operation.
• When the Warehouse Catalog tries to update the structure of a table that
is missing in the warehouse, a message is shown which explains that the
table structure update cannot proceed because the table was not found in
the warehouse. In this case, no changes occur and the original table
structure remains intact.
Columns missing
Missing columns are detected when Update Structure is performed. If this
happens, the Warehouse Catalog checks for the following:
• Column is not mapped to any schema object: If this is the case, then
no error message is shown.
MultiSource Option also allows you to use Freeform SQL, Query Builder, and
MDX cube reports, that access secondary data sources, as filters on
standard reports. For information on Freeform SQL and Query Builder
reports, see the Advanced Reporting Help. For information on MDX cube
reports, see the MDX Cube Reporting Help.
If you have the MultiSource Option, you can access multiple data sources in
a project as described below:
l You can create logical views on data sources other than the data source
for the primary database instance. This technique along with steps to
create logical views are described in Creating logical views, page 510.
l You can support fact tables that are partitioned across multiple databases.
Using metadata partitioning is described in Metadata partition mapping,
page 377.
l You can include MDX cube data in regular reports, which lets you include
MDX cube data along with data from your relational project as well as MDX
cube data from other MDX cubes. For examples of this capability and
steps to create these types of reports, refer to the MDX Cube Reporting
Help.
Any object using a data source other than the primary data source is
considered as having multiple data sources. Therefore, the Execute Report
that uses multiple data sources privilege is required. This rule also
applies to scenarios when the object uses data only from a non-primary data
source.
Once database instances have been created for your data sources, you can
connect them to your project. However, keep in mind that if you include
multiple data sources in a project, the data sources should all fit into the
same logical data model and warehouse structure planned for your project.
For information on planning a logical data model and a physical warehouse
structure, see Chapter 2, The Logical Data Model and Chapter 3, Warehouse
Structure for Your Logical Data Model.
Pr er eq u i si t es
• Database instances have been created for the data sources to include in
a project.
• You must have the MultiSource Option to connect multiple data sources
to a project.
3 From the Categories list, expand Database Instances, and then select
SQL Data Warehouses.
4 In the Database Instance pane, select the check box next to the
database instances for the data sources to include in a project.
Selecting a check box for a database instance also makes its data source
available for use with Query Builder and Freeform SQL. The availability
of multiple data sources through Query Builder or Freeform SQL does not
require the MultiSource Option. However, only one data source can be
used at a time in a Query Builder or Freeform SQL report. For information
on Query Builder and Freeform SQL, see the Advanced Reporting Help.
5 In the drop-down list near the top, select a database instance to act as
the primary database instance.
The primary database instance acts as the main source of data for a
project and is used as the default database instance for tables added to
the project. Non-database related VLDB property settings are also
inherited from the primary database instance.
To d et er m i n e t h e o r d er o f d at a so u r ce access
You can define the order in which data sources are used to provide data
as part of the MultiSource Option, when the same data can be retrieved
from multiple data sources.
6 From the Categories list, expand Report definition, and then select
SQL generation.
7 In the Database Instance Ordering area, you can define the order in
which data sources are used to provide data as part of the MultiSource
Option, as described below:
c You can then use the up and down arrows to change the priority of
each database instance, with the database instance at the top of the
list having the highest priority. Highest priority means that the
database instance is used first if it is one of the database instances
that can be used to retrieve the requested data. In addition to using
this order for a project, you can enable or disable the use of this
ordering for individual reports, as described in the Developer Help
(formerly the MicroStrategy Desktop Help).
d You have the following options to determine the order in which data
sources are selected for the project:
By selecting this option, the data source priority list that you
defined for the project is used for all reports in a project by default.
You can enable or disable the use of this ordering for individual
reports, as described in the Developer Help (formerly the
MicroStrategy Desktop Help).
To save yo u r ch an ges an d co m p l et e t h e co n f i gu r at i o n
The data sources you included in the project can now be accessed from the
Warehouse Catalog and Architect to import tables into the project, as
described in Adding data into a project, page 355 below.
In Architect, you can use the Warehouse Tables pane shown below to
switch between the data sources you are importing tables for.
If the tables that you import from various sources all use different table
names, the tables are imported exactly as they are when only a single data
source is used. You can also import tables with the same name from
different data sources, and is described in Supporting duplicate tables in
multiple data sources , page 356 below.
For example, you have two data sources. One data source stores historical
data for your company. The other data source stores forecast data for the
same business sectors. Each data source includes duplicate copies of
tables that store attribute information, which describe the context of data.
The data sources differ in the availability of historical data versus forecast
data, which is integrated into your MicroStrategy project through the use of
facts and metrics.
In this scenario, including each copy of the tables that include attribute
information from both data sources allows some queries to be processed
within a single data source. By including these duplicate copies, users that
only need to view historical data can have their query resolved within a
single data source. Similarly, users that only need to view forecast data can
have their query resolved completely within the other data source. This
reduces the time and system resources required for these types of queries
since working within a single data source is more efficient than querying
across multiple data sources.
Including both historical and forecast data on the same report from these
different data sources is also possible in this scenario through the use of
MultiSource Option. However, since the historical and forecast data are only
available in separate data sources, this query must include both data
sources.
To import multiple copies of the same table from different data sources into
a project, the requirements listed below must be met:
• The table name and column names must be exactly the same.
• One of the copies of the table must act as the primary table used in the
project. All of the columns in this table must also be present in the other
copies of the table from other data sources. The other copies of the table
that are used as secondary tables can include additional columns of
information. However, these additional columns are not included in the
project when the table is added.
• When you import multiple copies of a table from multiple data sources,
import the table that is to act as the primary table first. Once you import
the primary table, you can begin importing secondary tables from the
other data sources.
If you do not import the primary table first, you may have to remove some
tables and then add them back into the project after the primary table is
imported. This workflow may be required to update existing projects that
did not previously use MultiSource Option.
▫ A Decimal data type with a scale of zero is compatible with the Integer
data type.
▫ Double, Float, and Real data types are all compatible with each other.
▫ Any other data types are only compatible with an identical data type.
Be aware that a Date data type is not compatible with a Time data
type, and NVarChar and NChar data types are not compatible with
VarChar and Char data types.
The procedures below describe how to import multiple copies of the same
table into MicroStrategy using the Warehouse Catalog or Architect:
Pr er eq u i si t e
3 From the Select current database instance drop-down list, select the
database instance for one of the data sources the table resides in. The
first data source you use to import a table should be the one you plan to
use as the primary data source for the table.
4 In the Tables available in the database instance pane, select the table
to add to the project and click the > button. The first copy of the table is
added to the project and is displayed in the Tables being Used in the
Project pane.
To ad d co p i es o f a t ab l e f r o m o t h er d at ab ase i n st an ces
5 From the Select current database instance drop-down list, select the
database instance for a different data source that also includes the table.
6 In the Tables available in the database instance pane, select the table
to add to the project and click the > button.
To ad d ad d i t i o n al t ab l es an d co n f i gu r e t h e t ab l es i n cl u d ed i n t h e p r o j ect
7 To add tables from additional data sources, repeat the steps in To add
copies of a table from other database instances, page 360 above.
8 In the Tables being used in the project pane, right-click the table and
select Table Database Instances. The Available Database Instances
dialog box opens.
10 The Secondary Database Instances pane lists the other data sources that
the table is available from for the project. You can clear the check box
next to a data source to remove that copy of the table from the project.
12 Click Save and Close to save your changes and close the Warehouse
Catalog.
Pr er eq u i si t es
• You must have the MultiSource Option to connect multiple data sources
to a project.
3 From the Project Tables View, in the Warehouse Tables pane, expand
the database instance for one of the data sources the table resides in.
The first data source you use to import a table should be the one you plan
to use as the primary data source for the table.
4 From the Warehouse Tables pane, right-click the table to add to the
project and select Add Table to Project. The first copy of the table is
added to the project and is displayed in the Project Tables View of
Architect.
To ad d co p i es o f a t ab l e f r o m o t h er d at ab ase i n st an ces
5 From the Warehouse Tables pane, expand the database instance for a
different data source that also includes the table.
6 From the Warehouse Tables pane, right-click the table to add to the
project and select Add Table to Project.
To ad d ad d i t i o n al t ab l es an d co n f i gu r e t h e t ab l es i n cl u d ed i n t h e p r o j ect
7 To add tables from additional data sources, repeat the steps in To add
copies of a table from other database instances, page 362 above.
8 From the Project Tables View, select the table. Information on the table
is displayed in the Properties pane.
9 From the Properties pane, select the Primary DB Instance option, and
then click ... (Browse). The Available Database Instances dialog box
opens.
11 The Secondary Database Instances pane lists the other data sources that
the table is available from for the project. You can clear the check box
next to a data source to remove that copy of the table from the project.
13 Click Save and Close to save your changes and close the Warehouse
Catalog.
• If you import a table from the primary database instance for a project, the
table's primary data source is updated when the primary database
instance for the project is changed. This supports scenarios such as
moving from a testing environment to a production environment where
different database instances are used for each environment.
For example, tables are imported into a project from the primary
database instance of a project. The primary database instance is for
testing purposes. When the system is switched into production, a new
production database instance is defined as the new primary database
instance for the project. During the switch of primary database instances,
all tables that were imported with the original (testing) primary database
instance are modified to use the new (production) primary database
instance. This example scenario is shown below, which illustrates that
the tables remain connected to the new primary database instance.
You can modify a table to always use the primary database instance as
its primary data source. Steps on how to switch the database instance for
a table are provided below.
3 In the Tables being used in the project area, right-click a table and
select Table Database Instances. The Available Database Instances
dialog box opens.
▫ If you select the database instance that is listed without the project
primary database instance distinction, this database instance
remains as the primary data source for the table even if a new
project primary database instance is selected.
• The other database instances listed that are not the project's primary
database instance can also be selected. If selected, the database
instance remains as the primary data source for the table.
5 Click OK. If any warnings are displayed, read the information and take
any required action.
6 In the Warehouse Catalog, click Save and Close to save your changes.
• MicroStrategy data marts that are stored in a database other than the
database used for the main data warehouse. For information on creating
and using data marts, refer to the Advanced Reporting Help.
• Metrics that use functions that are evaluated by the Analytical Engine.
For information on functions, refer to the Functions Reference.
Parameterized queries are SQL queries that can use placeholders for data.
Using placeholders allows these queries to be re-used. A common
application of this re-usability is to combine multiple inserts of data into a
database as a single query. The following is an example of a parameterized
query:
Combining multiple INSERT statements into a single query can improve the
performance of inserting data into the database. The steps below show you
how to enable the use of parameterized queries in MicroStrategy.
Prerequisites
5 On the Advanced tab, select the Use parameterized queries check box.
6 If you are enabling parameterized queries for one of the databases listed
below, you must also include the following parameters:
EnableDescribeParam=1
EnableExtendedStmtInfo=Yes
• Decrease the number of physical disk reads and the number of records
that must be read to satisfy a query
• Minimize the amount of data that must be aggregated and sorted at run
time
For example, sales data is stored by day in a fact table. A report requesting
month-level data is executed. The daily values from the fact table are
selected, sorted, and added to produce the monthly totals, as shown below.
Aggregation can also be completed before reports are executed; the results
of the aggregation are stored in an aggregate table. This process is called
pre-aggregation. You can build these pre-aggregated—or aggregate—tables
as part of the ETL process. If sales data is frequently requested at the month
level, as in the previous example, an aggregate table with the sales data
rolled up to the month level is useful.
If the daily sales fact table is the lowest-level fact table and contains atomic-
level data, it is referred to as a base table. In these terms, an aggregate
table is any fact table whose data is derived by aggregating data from an
existing base table.
Degree of aggregation
While MOLAP can provide fast performance when it answers a question, it
requires a completely aggregated schema to answer most questions. That
is, every possible combination of aggregate associations must be generated
when the multidimensional cube is built. This ensures that all possible
questions can be answered. This scenario becomes very difficult to maintain
as the number of attributes and the amount of data increase, and therefore
is not very scalable.
ROLAP, therefore, provides much greater flexibility than MOLAP. Only the
aggregate combinations that you determine are beneficial must be created.
That is, if the aggregate table is useful in answering frequently-asked
queries, its presence provides a response as fast as a MOLAP system can
provide. However, if a certain aggregate combination is rarely or never used,
the space in the RDBMS does not need to be consumed and the resources to
build that table during the batch process do not need to be used.
Dynamic relationships
When the relationship between parent and child elements change, the
relationship is called dynamic. These changes often occur because of
organizational restructuring; geographical realignment; or the addition,
reclassification, or discontinuation of items or services. For example, a store
can decide to reclassify the department to which items belong.
Static relationships
When elements rarely or never change relationships, they are a part of static
relationships. In these cases, maintaining aggregate tables is very easy. For
example, time hierarchies are seldom dynamic—days do not migrate into
different weeks, and fiscal weeks do not move into different months.
Compression ratio
The process of data aggregation applies an aggregate function, such as sum
or average, to a set of child records to produce a single parent record. The
average number of child records combined to calculate one parent record is
called the compression ratio. One measure of effectiveness of an aggregate
table can be estimated from this number, since it represents the decrease in
records that must be read to respond to a query at that level.
Recall that some of the reasons to build aggregate tables include the
reduction of disk I/O and the number of records that must be dynamically
sorted and aggregated. Therefore, pre-aggregating data is effective only if
the compression ratio is significant. For example, if the compression ratio is
3:2, the aggregate table requires 2/3 of the base table's storage space but
yields only a 1/3 reduction in the number of records. In contrast, if the
compression ratio is 4:1, the aggregate table reduces the number of records
by 3/4 and uses only 1/4 of the storage space.
Cardinality is the number of unique elements for an attribute and ratios are
the ratios between the cardinalities of related attributes., page 36.
1 Using the Warehouse Catalog, add the table to the project. For steps to
add tables using the Warehouse Catalog, see Adding and removing
tables for a project, page 325.
2 Use the new table in the desired fact expressions and attribute form
expressions.
If your aggregate table structure is consistent with your base fact table
structure, Architect automatically adds it to the definitions of your existing
attributes and facts. In other words, Architect is aggregate-aware. How does
Architect know to use the aggregate table rather than the base fact table,
when either could provide the answer to a query? The answer is logical table
size.
When you run a report, the Analytical Engine chooses the smallest of all
tables, based on logical table size, that contains enough data to answer the
query. The initial logical table size is based on the number of attribute
columns and the various levels at which they exist in their respective
hierarchies. For information on defining the logical table size of a table, see
Defining logical table sizes, page 505.
Server-level partitioning
The database server, rather than MicroStrategy, manages the partitioned
tables in RDBMS server-level partitioning. The original fact table is not
physically broken into smaller tables. Instead, the database server logically
partitions the table according to parameters specified by the database
administrator. You do not need to take any action in MicroStrategy to
support the partitioning.
Since only the logical table is displayed to the end user, the partitioning is
transparent to MicroStrategy. In contrast, in application-level partitioning the
relational database is unaware of the partitioned tables.
Application-level partitioning
In application-level partitioning the application, rather than the RDBMS
server, manages the partition tables. A partition base table (PBT) is a
warehouse table that contains one part of a larger set of data. Partition
tables are usually divided along logical lines, such as time or geography.
MicroStrategy supports two types of partitioning:
If you have the MultiSource Option (see Accessing multiple data sources in
a project, page 350) you can also support fact tables that are partitioned
across multiple databases.
MicroStrategy stores one PBT level for each partition. If all the PBTs within
a partition are not stored at the same level, the highest PBT level is used as
the PBT level of the partition. For instance, if all the sales data in the
previous example is stored in one partition, you cannot access current sales
at the day level. This is because the PBT level for the partition is month,
which is higher than day. If you save current data in a partition at the daily
level and the historical data in another partition at the month level, you are
able to fully access the data.
Data slices
After PBTs are created, you define a data slice. The data slice acts as a
filter that describes what portions of data are placed in the partition table.
Based on this data slice, the MicroStrategy engine knows which table to get
data from when generating the SQL.
A data slice holds the parameters that a partition is based upon, for
example, Month=January. Instead of retrieving data for all months, the
server knows to access a particular table that contains the data for January
only. By creating a data slice with the partition, you can retrieve specific
data quickly without time-consuming joins and searches.
Data slicing displays and can be modified only for the metadata partitioning.
Each partition mapping table must include at least one data slice. In a
heterogeneous mapping, data slices can exist at different levels and can be
composed of different keys.
Attribute qualifications
To create data slices, you use attribute qualifications. Attribute
qualifications are types of filters that are applied to attribute forms. These
qualifications allow you to limit the type and amount of data that is returned
for a report. For example, if you create a report that contains the attribute
Country but you want to return only the data for France, you can create a
qualification on the attribute Country and select France as the element that
appears on the report.
For steps to create a data slice, refer to the MicroStrategy Developer Help.
The original fact table, which contains all of the data, is not brought into the
project. Rather, the database administrator creates multiple smaller physical
tables in the data warehouse. Each table contains a subset of the data in the
original fact table. The database administrator is responsible for keeping the
partitions consistent and up-to-date. He or she must also create and
maintain a partition mapping table (PMT), which is used to identify and keep
track of the partitioned base tables as part of a logical whole.
After the PMT is created, when you run a report in Developer or Web that
requires information from one of the PBTs, the Query Engine first runs a pre-
query to the PMT to determine which PBT to access to bring the data back
for the report. The pre-query requests the PBT names associated with the
attribute IDs from the filtering criteria. When it finds the name of the PBT, it
calls the SQL Engine to write the appropriate SQL for the warehouse.
In Chapter 2, The Logical Data Model, you learned how to use hierarchies to
group related attributes in practical business areas. For example, you can
include a Time hierarchy in your model that consists of Day, Week, Month,
and Year attributes.
Follow the procedure below to create a user hierarchy with the Hierarchy
Editor. For information on how to use Architect, see Creating user
hierarchies using Architect, page 387.
1 In MicroStrategy Developer, log into the project source that contains your
project and open the project.
2 In the Folder List, navigate to and open the Schema Objects folder.
3 Open the Hierarchies folder, and then the Data Explorer folder.
4 From the File menu, select New, and then Hierarchy. The Hierarchy
Editor opens, followed immediately by the Select Attributes dialog box.
5 In the Available objects pane, select the attributes to use in the hierarchy
and click the arrow to add them to the Selected objects pane. Click OK to
close the Select Attributes dialog box. The attributes you selected appear
in the Hierarchy Viewer.
8 Each attribute in a user hierarchy has properties that affect how that
attribute is displayed and accessed in a hierarchy. You can right-click an
attribute and configure the properties listed below:
• Set As Entry Point: Specifies whether the user can begin browsing in
this hierarchy using this attribute (see Entry point, page 398).
10 Type a name for the hierarchy. Then navigate to the location in which you
want to save the hierarchy.
You can save user hierarchies in any folder. However, to make the user
hierarchy available for element browsing in the Data Explorer, you must
place it in the Data Explorer sub-folder within the Hierarchies folder. This
is discussed in Hierarchy browsing, page 400.
With Architect, you can support all of the features that are available in the
Hierarchy Editor. Rather than focusing on one hierarchy at a time with the
Hierarchy Editor, you can use Architect to create and modify multiple
hierarchies for a project at one time. Review the chapters and sections listed
below for information on Architect and steps to create and modify user
hierarchies using Architect:
Types of hierarchies
The two types of hierarchies that exist in MicroStrategy include:
You can view the system hierarchy in the Data Explorer or in the Hierarchy
Viewer, but not the Hierarchy Editor. You can access the Hierarchy Viewer
from Graphical View in the Schema menu. The Hierarchy Viewer is
discussed in detail in Using the Hierarchy Viewer, page 406.
Whereas browsing occurs through the Data Explorer, in drilling the user
actually chooses to move to higher or lower levels on a report or move
across to levels within different hierarchies. For example, if the user drills on
the Quarter attribute in a report, he or she can drill down to Month, up to
Year, or across to an attribute within another hierarchy.
You can create user hierarchies in the Hierarchy Editor using one or more
attributes from the system hierarchy.
A user hierarchy is the only type of hierarchy you can define, and you can
create any number of user hierarchies for each project. You should define
user hierarchies that correspond to specific areas of your company business
model and data warehouse schema.
Hierarchy organization
The best design for a user hierarchy is to organize or group attributes into
logical business areas. This allows users to more easily locate attributes in
a project and navigate from one attribute to another. For example, you can
place related attributes into hierarchies by their level.
When creating user hierarchies, keep in mind that hierarchies do not have to
be separate from one another or necessarily follow the dimensional
structure of your logical data model.
Hierarchy structure
While both a system hierarchy and user hierarchy allow you to navigate
attributes in your project, only the user hierarchy allows you to logically
define and order groups of attributes.
The rest of this chapter discusses user hierarchies and how to create and
configure them in your project.
When you group attributes together into user hierarchies, you are
developing a working design of the display and browse functions of the
attributes. In the example below, there are two instances of the Region
hierarchy. One hierarchy demonstrates Region having multiple States and
the States having multiple Stores.
This hierarchy allows you to create drilling and browsing options to the lower
levels to view Region, State, and Store on a report. However, if you only
include Store in the Region hierarchy, as in the second example, then the
only options for drilling or browsing are the Region and Store levels.
The Hierarchy Viewer is accessed from the Graphical View option in the
Schema menu. The Hierarchy Viewer is discussed in further detail in Using
the Hierarchy Viewer, page 406.
• Element Display: Determines the elements a user can see. The element
display may be locked, unlocked, or limited (see Controlling the display
of attribute elements, page 392).
hierarchy acts like a filter in a report. Only data satisfying the filter
criteria is displayed (see Filtering attributes in a hierarchy, page 396).
• Entry Point/Not an Entry Point: Specifies whether the user can begin
browsing in this hierarchy using this attribute (see Entry point, page 398).
• Browse Attributes: Shows the attributes to which users can browse from
a given attribute. Represented by lines that connect one attribute to
others (see Hierarchy browsing, page 400).
The following sections explain these properties and how to use the
Hierarchy Editor to configure each.
You can lock the hierarchy to restrict the user from viewing elements and
lower level attributes for security reasons or to better manage lengthy
hierarchies. By restricting the view of attribute elements and lower level
attributes in the Data Explorer, you can prevent the expansion of long
attribute element lists that can consume system resources. When you set
the element display to locked, a padlock icon appears next to the attribute
name.
For example, the attribute Order is locked in the Data Explorer sample
shown below.
While the user can view the attribute elements of Customer Region and
Customer City, he or she cannot view information about each customer's
order. The Order attribute may be locked in order to prevent unauthorized
users from accessing sensitive information about customer orders.
Pr er eq u i si t es
If a message is displayed asking if you want to use read only mode or edit
mode, select Edit and click OK to open the schema editor in edit mode so
that you can make changes to the hierarchy.
• If you are only given the option of using read only mode, this means
another user is modifying the project's schema. You cannot use edit
mode until the other user is finished with their changes and the
schema is unlocked.
• For information on how you can use read only mode and edit mode
for various schema editors, see Using read only or edit mode for
schema editors, page 108.
3 In the Hierarchy Editor or Architect, click Save and Close to save your
changes and return to Developer.
You can also lock and unlock attributes when you edit them in the Display
tab of the Attribute Editor. However, this locks and unlocks the attributes
within the system hierarchy, not any user hierarchies that contain the
attributes. For example, if the attribute Year is locked in the Attribute Editor,
no elements for Year display in the Data Explorer when Year is expanded.
negatively impact system performance. The user can then click the arrows to
see the next set of elements for that attribute.
Pr er eq u i si t es
If a message is displayed asking if you want to use read only mode or edit
mode, select Edit and click OK to open the schema editor in edit mode so
that you can make changes to the hierarchy.
• If you are only given the option of using read only mode, this means
another user is modifying the project's schema. You cannot use edit
mode until the other user is finished with their changes and the
schema is unlocked.
• For information on how you can use read only mode and edit mode
for various schema editors, see Using read only or edit mode for
schema editors, page 108.
3 Type the number of elements to display at one time and click OK.
4 In the Hierarchy Editor or Architect, click Save and Close to save your
changes and return to Developer.
You can add filters to a hierarchy to control how data is retrieved and
displayed. With a filter you can choose exactly which attribute elements to
display in a hierarchy. For example, you can filter a hierarchy so that data
for only one quarter is displayed, or data for only a few days of one quarter.
Filters make data retrieval faster by only allowing specific data to be
displayed.
Each attribute in the hierarchy can have multiple filters applied to it. When
filtering attributes in a hierarchy, you are limiting the elements of the data
returned when you browse the Data Explorer. Creating a limited hierarchy
reduces the number of elements displayed at one time. Filters, however,
limit the elements a user is allowed to see and therefore, perform a type of
security.
Filters increase efficiency when retrieving data because you can limit user
access to parts of a hierarchy when you apply filters to attributes. The filters
allow the Data Explorer to display only the criteria you select, and the user is
unable to see additional data in the hierarchy.
For example, you want to view only those customers who are younger than
30 years old. First, create a filter on Customer Age less than 30. In the
Hierarchy Editor, add the filter to the Customer attribute. Update the project
schema, and view the Customer hierarchy in the Data Explorer. Only those
customers younger than 30 years old are displayed.
Pr er eq u i si t es
If a message is displayed asking if you want to use read only mode or edit
mode, select Edit and click OK to open the schema editor in edit mode so
that you can make changes to the hierarchy.
• If you are only given the option of using read only mode, this means
another user is modifying the project's schema. You cannot use edit
mode until the other user is finished with their changes and the
schema is unlocked.
• For information on how you can use read only mode and edit mode
for various schema editors, see Using read only or edit mode for
schema editors, page 108.
3 If a tip about filtering opens, click OK. The Select Objects dialog box
opens.
4 In the Available objects pane, select the filters to apply and click > to add
them to the Selected objects pane.
5 Click OK to close the Select Objects dialog box. The attribute to which
you applied the filter appears in the hierarchy with a filter icon.
6 In the Hierarchy Editor or Architect, click Save and Close to save your
changes and return to Developer.
Entry point
An entry point is a shortcut to an attribute in the Data Explorer. Creating an
entry point grants users faster access to the attribute without having to
browse through multiple attributes to reach different levels in a hierarchy.
This is especially useful when accessing frequently-used attributes.
When you create a user hierarchy, the hierarchy, the attributes, and their
elements appear in the Data Explorer. When you set an attribute to be an
entry point, you are creating a shorter route to access that attribute. For
example, a typical hierarchy is Time. When you click on Time, elements for
each Year, such as 2007, 2006, and 2005, open. When you click on 2006, an
element for each Quarter, such as Q1, Q2, Q3, and Q4, opens. If you are
seeking Week 24, you need to open several levels of attributes to reach the
correct data level, which is Week. If you set the attribute Week as an entry
point, the attribute Week appears in the Data Explorer at the same level as
Year. If an attribute is not set to be an entry point, it appears in its normal
position within the hierarchy structure.
If you set a locked attribute as an entry point, it still appears in the hierarchy
but with a padlock icon. You can see the locked attribute, but are unable to
access elements or attributes below that level.
Pr er eq u i si t es
If a message is displayed asking if you want to use read only mode or edit
mode, select Edit and click OK to open the schema editor in edit mode so
that you can make changes to the hierarchy.
• If you are only given the option of using read only mode, this means
another user is modifying the project's schema. You cannot use edit
mode until the other user is finished with their changes and the
schema is unlocked.
• For information on how you can use read only mode and edit mode
for various schema editors, see Using read only or edit mode for
schema editors, page 108.
2 Right-click the attribute to set as an entry point, and select Set As Entry
Point. The attribute is marked with a green check mark to denote that it
is an entry point.
3 In the Hierarchy Editor or Architect, click Save and Close to save your
changes and return to Developer.
Hierarchy browsing
Once you choose which attributes to place in a hierarchy, you can define the
relationships between them. These relationships determine how users can
browse the attributes from the Hierarchies folder.
For example, if Catalog, Category, Subcategory, and Item are the attributes
that comprise the user hierarchy Catalog Items, the hierarchy resembles the
example below, showing the parent/child relationships between the
attributes. For example, in the hierarchy below, Catalog is a parent attribute
of Category and Category is the child attribute of Catalog.
A user hierarchy does not need to have these direct relationships defined. It
can simply be a collection of attributes.
For each attribute in a hierarchy, you can assign one or more browse
attributes to it. Using the example above, some of these attributes have
been assigned a browse attribute. Specifically:
Category Subcategory
Item
The addition of these browse attributes allows users to see the Subcategory
elements directly from the Catalog attribute, without having to first browse
down through the Category attributes to get to Subcategory. The ability to
browse more directly through the hierarchy can be represented as shown
below.
In the Data Explorer, the hierarchy described above resembles the example
below.
Users can now view the subcategories in the catalog without first having to
browse through the categories.
the system hierarchy and the user hierarchies. When you create a new
project, the system hierarchy for that project is automatically placed in the
Data Explorer.
You can save user hierarchies in any folder. However, to make a user
hierarchy available for browsing in the Data Explorer you must place it in the
Data Explorer folder—a subfolder of the Hierarchies folder, which is located
in the Schema Objects folder.
You can make user hierarchies available for drilling. This option enables you
to determine, at a project level, the attributes to which users can drill from
other attributes. In the example of the Year and Month attributes, drilling is
enabled in the Time hierarchy, which contains the two attributes. This allows
a user to drill down from Year to Month and, if they need to, drill back up
from Month to Year.
To enable a user hierarchy as a drill path, you must enable the user
hierarchy to be used as a drill hierarchy in the Hierarchy Editor. If a user
hierarchy is not enabled, the default drill path is defined by the System
Hierarchy.
browse attribute of Catalog, which means that you can access the elements
of Subcategory without having to necessarily access the elements of
Catalog in Data Explorer. If you enable drilling in this hierarchy, you can drill
from Catalog down to Subcategory—and any other browse attributes of
Catalog—on a report.
A drill hierarchy can be used for browsing as well as drilling. However, the
way in which you browse attributes may not be the same way in which you
drill on attributes in reports. If your drilling and browsing paths between
attributes are different, you should create separate drilling and browsing
hierarchies.
Pr er eq u i si t e
If a message is displayed asking if you want to use read only mode or edit
mode, select Edit and click OK to open the schema editor in edit mode so
that you can make changes to the hierarchy.
• If you are only given the option of using read only mode, this means
another user is modifying the project's schema. You cannot use edit
mode until the other user is finished with their changes and the
schema is unlocked.
• For information on how you can use read only mode and edit mode for
various schema editors, see Using read only or edit mode for schema
editors, page 108.
• With the Hierarchy Editor, select the Use as a drill hierarchy check
box located at the bottom of the Hierarchy Editor.
• With Architect, right-click within the Hierarchy View and select Use
As a drill hierarchy.
3 In the Hierarchy Editor or Architect, click Save and Close to save your
changes and return to Developer.
After a user hierarchy is enabled for drilling, the hierarchy contributes to the
drilling path of any attributes in it. Additional information on drilling is
available in the Advanced Reporting Help.
• When you view the system hierarchy, you can see the actual
relationships between attributes, as defined by the system when the
project was created.
• When you view a user hierarchy, you do not see true attribute
relationships, but rather the structure of the user hierarchy as defined by
a project designer, to facilitate user browsing and report development.
The Hierarchy Viewer gives you flexibility over how much of a given
hierarchy you choose to view at once. You can see all of the entry points into
a hierarchy at once, or you may select only one at a time. For details on
entry points, see Entry point, page 398.
The Hierarchy Viewer also gives you direct access to any of the attributes in
the hierarchy you choose to view. When you access a hierarchy's attributes
directly, you can define them as entry points. See Entry point, page 398 for
more details on creating entry points.
2 Select Hierarchies.
1 In the Hierarchy Viewer, from the Hierarchy menu, select the hierarchy
to view.
2 Attributes that have a green check mark next to them are entry points.
See Entry point, page 398 for more details on creating entry points.
2 Select Edit.
1 In the Hierarchy Viewer, from the View menu, select Aerial perspective.
An aerial view of the hierarchy you are currently viewing is displayed.
The green squares indicate attributes that are entry points.
The tables that are displayed here are logical tables. They represent and
indicate how Architect sees the tables that were brought into the project
when it was created.
If you make changes to the actual tables in the data warehouse, you will
need to update the logical table structure. See The size of tables in a
project: Logical table size, page 375 for information on updating logical
table structures.
You can also view all of this information using Architect, which is described
in Chapter 5, Creating a Project Using Architect.
2 Select Tables.
3 From the Options menu, select or clear the options for any of the
following, depending on what you want to see in the Table Viewer:
• Show joins
• Show relationships
• Show columns
CREATIN G
TRAN SFORM ATION S TO
D EFIN E TIM E-B ASED AN D
O TH ER COM PARISON S
Suppose you want to compare how much revenue your company grew last
year to how much it grew this year. This type of analysis, called a TY/LY
comparison (This Year versus Last Year), is a commonly used form of time-
series analysis and is relevant to many different industries, including retail,
banking, and telecommunications.
Creating transformations
A transformation is a schema object that typically maps a specified time period to another
time period, applying an offset value, such as current month minus one month.
While transformations are most often used for discovering and analyzing
time-based trends in your data, not all transformations have to be time-
based. An example of a non-time-based transformation is This Catalog/Last
Catalog, which might use Catalog_ID-1 to perform the transformation.
Creating the transformation metric and the report are discussed in the
Transformation metrics section in the Metrics chapter of the Advanced
Reporting Help.
2 From the File menu, point to New, and select Transformation. The
Transformation Editor opens with the Select a Member Attribute dialog
box displayed.
3 Double-click Time to open the folder, then double-click Year. The Year -
Define a new member attribute expression dialog box opens.
4 Select the LU_Year table from the Table drop-down list. The table's
columns appear in the Available columns list. Notice that this table
contains a previous year column, which maps this year to last year.
6 Click OK.
7 Click Save and Close on the toolbar. Name the transformation Last Year
(Table).
You have now created the transformation. A report designer can now use the
transformation in a revenue metric to calculate last year's revenue, then
create a report using that transformation metric to obtain last year's
revenue.
1 In MicroStrategy Developer, from the File menu, point to New, and select
Transformation. The Transformation Editor opens with the Select a
Member Attribute dialog box displayed.
2 Double-click Time to open the folder, then double-click Year. The Year -
Define a new member attribute expression dialog box opens.
3 Select the LU_Year table from the Table drop-down list. The table's
columns appear in the Available columns list.
5 Type -1 in the expression box. The transformation will subtract one from
the Year ID to calculate last year's ID.
7 Click OK.
8 Click Save and Close on the toolbar. Name the transformation Last Year
(Expression).
You have now created the last year transformation. A report designer can
now use the transformation in a revenue metric to calculate last year's
revenue, then add it to the report created in the previous example.
Transformation components
All transformations have the following components:
• Member tables: These tables store the data for the member attributes.
For example, you can create a Last Year transformation using Year_
ID-1 as the expression. However, many cases can exist where the
data is not conducive to such calculation. For instance, if you store
Month as 200001 (January 2000), you cannot subtract one and
receive December 1999 as the result.
For example, the joint child attribute Promotion is added to the previous
report. The report displays the quarter, the promotion associated with a
given quarter, and the revenue data from the date-promotion combination,
minus one year. To demonstrate the effect this has on the display of data on
the report, the report below shows the revenue for all quarters in 2009 and
2010, without any transformations:
The highlighted data in the report shown above indicates that in the fourth
quarter of 2009, there was $52,529 of revenue related to the Memphis
Special Sale promotion. You can also see in this report that the Memphis
Special Sale promotion was not held in the fourth quarter of 2010. The report
below shows how this data is displayed when a transformation of the data is
used:
In the report shown above, notice that the Memphis Special Sale is
displayed with the fourth quarter of 2010, and the fourth quarter of 2009 has
no listing of this promotion. This can seem contradictory as compared to the
previous report that did not include a transformation on the data. However,
this is due to the fact that the Last Year's Revenue metric is displaying data
for the previous year for each attribute element. Since the joint child
attribute is dependent on time, the attribute elements also must change to
reflect the transformation of data. This results in a report that displays the
Memphis Special Sale data for the fourth quarter of 2010, because this was
the revenue that was generated for this quarter during the previous year.
D ESIGN IN G A PROJECT
FOR FIN AN CIAL
REPORTIN G
Prerequisites
The best practices listed in this chapter can help you design a financial
reporting project in MicroStrategy. To create this type of financial reporting
project in MicroStrategy, you should also have knowledge of the following:
▫ Project design
▫ Logical data model for your financial data, such as whether your
financial data requires additional context including account, vendor,
customer, and time. The best practices provided include a high-level
discussion of creating context for your financial data, but it is
assumed that you have a defined logical data model for your financial
data.
To create this structure, you store each element in lookup tables, and then
define the hierarchical relationship between the elements using a
relationship table.
Level1_ID Level1_DESC
1 Revenue
2 Gross Profit
3 Operating Income
4 EBITDA
5 Net Income
Level2_ID Level2_DESC
1 Cost of Revenues
3 Operating Expense
4 Deprecation Expense
5 Operating Margin
6 EBIT
7 Interest Income
8 Interest Expense
9 Taxes
-1 null
-2 null
-3 null
-4 null
-5 null
Level3_ID Level3_DESC
1 Other Income
-1 null
-2 null
-3 null
-4 null
-5 null
-6 null
-7 null
-8 null
-9 null
-10 null
-11 null
-12 null
-13 null
-14 null
The number of levels needed is the number of lookup tables that need
to be created to represent this organization in your physical
warehouse.
In the example financial report, Level 1 has five items, Level 2 has
nine items, and Level 3 has two items.
With this information, you can create a lookup table for each level,
starting with Level 1, the highest level.
For example, if you are creating the Level 2 table, you need to
create a number of dummy elements equal to the total number of
elements in the Level 1 table. If you are creating the Level 3 table,
you need to create a number of dummy elements equal to the total
number of elements in the Level 2 table.
Revenue Cost of
1 1
Revenues
Gross Profit
2 2
Margin
Deprecation
2 4
Expense
3 Operating 5 Operating
3 6 EBIT
4 7 Interest Income
4 8
EBITDA
Interest Expense Interest Coverage
4 8 2
Ratio
4 9 Taxes
5 Net Income
This mimics the organization of the final required report, and provides a
relationship between all of the regular elements for the three level lookup
tables.
1 -5 -14
Revenue Cost of
1 1 -13
Revenues
2 -4 -12
Gross Profit
2 2 -11
Margin
Deprecation
2 4 -9
Expense
3 -3 -8
3 Operating 5 Operating -7
3 6 EBIT -6
4 -2 -5
4 7 Interest Income -4
4 8 -3
EBITDA
Interest Expense Interest Coverage
4 8 2
Ratio
4 9 Taxes -2
5 Net Income -1 -1
1 -5 -14
1 1 -13
2 -4 -12
2 2 -11
2 3 -10
2 4 -9
3 -3 -8
3 5 -7
3 5 1
3 6 -6
4 -2 -5
4 7 -4
4 8 -3
4 8 2
4 9 -2
5 -1 -1
Notice the ID column for the lowest level attribute in this table, in the
example above, Level3_ID. There is a unique value in this ID column for
each entry, which means that this column can be used as the primary key of
the table. Additionally, this single ID column can be used to uniquely identify
each financial line item. This value is used later to identify each financial
line item.
This table data is used to create attributes to represent your financial line
items in financial reports. Information on creating these attributes is
included in Creating attributes for financial line items, page 434.
Each separate line item on the report is an account, and this data needs to
be stored so that it can be retrieved by MicroStrategy for financial reporting.
There are various ways in which you can store data in a database. To
facilitate financial reporting in MicroStrategy, it is recommended to store all
of the data for all financial accounts in a single column, at the lowest logical
level. This results in a table with multiple columns that will be modeled as
attributes in MicroStrategy, and a single column that stores all financial
data. For example, the table would have a structure similar to the following:
Account, Vendor,
1/1/2012 -14 (Revenue) 300
Customer, etc.
Account, Vendor,
1/1/2012 -12 (Gross Profit) 125
Customer, etc.
Account, Vendor,
1/2/2012 -14 (Revenue) 480
Customer, etc.
Account, Vendor,
1/2/2012 -12 (Gross Profit) 95
Customer, etc.
• Include a column for each category that gives context to the financial
data. For example, you might need to know the account, vendor, or
customer for a given piece of financial data, as well as the day when the
transaction occurred. This should include all aspects of the financial data
at the lowest logical level of data. This concept is discussed more in
detail in Fact tables: Fact data and levels of aggregation, page 47.
• Include a column that identifies which financial line item the data is
associated with. These identification numbers must match the ID column
of the lowest level lookup table you created to define the hierarchical
organization of the final financial report (see Creating tables to provide
hierarchical organization, page 423). In the example scenario, the
Revenue line item is associated with the value -14 in the lowest level
lookup table, which is LU_LEVEL3. So any entry of Revenue data must
use the value of -14 in this Financial Account column to identify it as
Revenue data.
• Include a column that stores all of the financial data for each separate
financial line item. This data is entered for each line item for every record
that is applicable.
Do not include data for any financial line items that are percentages. This
includes financial line items such as margins and ratios. For example,
data such as Gross Profit Margin should not be included in this table.
This data is created later in MicroStrategy with the use of metrics.
The resulting table has more rows than columns. This is because, rather
than storing the financial data in their own separate columns, each entry is
stored in a single column.
reporting. With the tables included in a MicroStrategy project, you can then
assign the values to attributes. You can use MicroStrategy Architect to
perform the tasks outlined below. Details on how to use Architect are
provided in Chapter 5, Creating a Project Using Architect.
1 Create attributes for each level, and map the attribute forms to the
corresponding columns of data in the level lookup tables.
When a report that includes these financial line item attributes is exported to
Excel or as a PDF using MicroStrategy Web, all rows of data are exported.
Since these financial line item attributes include empty elements to support
the hierarchical structure of the financial data, this causes some of the rows
of the exported report to also be empty.
To prevent this, you can identify which of the financial line item attributes
include empty elements. These elements are then ignored when reports
including those attributes are exported using MicroStrategy Web.
2 Right-click the project that stores your financial data and select Project
Configuration. The Project Configuration Editor opens.
6 In the VLDB Settings pane, expand Export Engine, then select the GUID
of attributes in profit and loss hierarchy (separated by ':') that has
dummy rows to be removed VLDB property.
8 In the text field, type each ID value for all financial line item attributes
that include empty elements. Use a colon (:) to separate each attribute
ID value.
9 Click Save and Close to save your changes and close the VLDB
Properties Editor.
When you use MicroStrategy Web to export a report that includes financial
line item attributes, the empty elements will not be shown in the exported
data.
Your fact table should include a single column that stores the financial data
for all of the financial accounts.
2 Each category used to define the level of data in this fact table must be
included in MicroStrategy as an attribute. In addition to the fact table, you
may have additional lookup tables that provide the descriptive data for
these categories. Within the fact table, the ID column of each category
should be included. The image below shows an example of what the fact
table might look like in MicroStrategy, with a single fact column (Data) of
financial data, and additional attributes to categorize the financial data.
Notice that a Level3 attribute is included in the fact table above. This is
the lowest level attribute included as part of creating the financial line
items, as described in Creating attributes for financial line items, page
434. It is important to include this column of data and associated attribute
in this fact column because it identifies which financial line item is
associated with each value in the Data column. Without this column, you
cannot accurately identify the values for the Data fact that integrates this
data into MicroStrategy.
determine how data is related to each financial line item displayed in the
report.
This can be achieved by creating a filter for each financial line item. Each
filter is defined as an attribute qualification, with the following definition:
• Value is the value that corresponds to the financial line item, as defined
in the relationship table created in Creating tables to provide hierarchical
organization, page 423.
Revenue is displayed in the report along with other financial line items. In
the relationship table for this example, the value for the ID column of the
lowest level attribute (Level3) that is associated with the Revenue financial
line item is -14. So the filter definition for this line item is as follows:
You can use the relationship table you created in Creating tables to provide
hierarchical organization, page 423 to determine the value for each financial
line item, and then use this information to create a filter for each financial
line item. For details to create filters, see the Basic Reporting Help and the
Advanced Reporting Help.
• Fact is the single fact you created for your financial data, as described
in Creating schema objects for financial data, page 438. In the example
provided, the fact is named Data.
• Level is the hierarchy created for the attributes used to define the
hierarchical organization of the financial line items, as described in
Creating tables to provide hierarchical organization, page 423. In the
example provided, the hierarchy is named Level.
You can use any name for this metric; for this example the metric is named
StoredData.
For example, in the report shown below, the financial line items that are not
stored in the database include Gross Profit Margin, Operating Margin, and
Interest Coverage Ratio.
Determine the general calculation for each of these metrics. In the example,
these metrics would have the following general calculations:
With these general definitions, you need to define the metrics so that they
represent these values. Since each of these metrics relies on other financial
line items, you need to determine how to return the values for each financial
line item. This can be done with a definition with the following syntax:
• Fact is the single fact you created for your financial data, as described
in Creating schema objects for financial data, page 438. In the example
provided, the fact is named Data.
• Level is the hierarchy created for the attributes used to define the
hierarchical organization of the financial line items, as described in
Creating tables to provide hierarchical organization, page 423. In the
example provided, the hierarchy is named Level.
• The metric definition parameters @2; and - define how the filter is
applied to the metric.
In this example, this definition can be used to create the two values required
for Gross Profit Margin:
To create the metric for Gross Profit Margin, you include these two
definitions of financial line items in one metric definition for Gross Profit
Margin:
All metrics for financial line items can be created with this same format; for
this example, you would create the following metric definitions:
Notice that the only difference between these metrics is the filters used to
identify the required financial line items.
You must define each of these metrics as a smart metric. When creating the
metric in the Metric Editor, on the Subtotals/Aggregation tab, select the
Allow Smart Metric check box. This ensures that the division is calculated
correctly. For best practices in using smart metrics, refer to the Advanced
Reporting Guide.
database with the values of the metrics that calculate the percentage
financial line items into a single metric.
1 To create the metric that combines all of the data for your financial line
items into a single metric, you need to create the following metrics:
a A metric that retrieves all of the financial data that is stored in the
database. Creating this metric is described in Retrieving financial
data from the database, page 441.
b A metric that calculates the financial line items that are not stored in
the database, and instead are created within MicroStrategy. Creating
these metrics is described in Metrics for financial line items with
percentage values, page 442.
c A metric that helps to determine whether the data for a financial line
item is retrieved from the database, or from a metric in MicroStrategy.
The syntax for this metric is:
Min([LevelN]@ID) {<Level+}
▫ Level is the hierarchy created for the attributes used to define the
hierarchical organization of the financial line items, as described
in Creating tables to provide hierarchical organization, page 423.
In the example provided, the hierarchy is named Level.
Min([Level3]@ID) {<Level+}
You can use any name for this metric; for this example, the metric is
named Levels.
2 With these metrics, you are ready to build the single metric that combines
all of your financial line item data into one metric. The syntax for this
metric is:
• StoredData is the metric that retrieves all of the financial data that is
stored in the database. Creating this metric is described in Retrieving
financial data from the database, page 441.
In this example, the metric needs to determine whether to use one of four
different metrics as the source of data for the financial line item. This
includes the metrics for Gross Profit Margin, Operating Margin, Interest
Coverage Ratio, and the StoredData metric that retrieves all the financial
data that is stored in the database. The metric definition to select
between these metrics is as follows:
This metric selects data from the correct source for each financial line
item. You can use any name for this metric; for this example, the metric is
named Values. This Values metric is the metric that is included directly
on reports for your financial reporting project.
3 To ensure that the Values metric is displayed correctly, you must also
perform the following configurations for this metric.
c Select the Allow Smart Metric check box near the bottom of the
interface.
d From the Tools menu, select Metric Join Type. The Metric Join Type
dialog box opens.
f Select the Outer option, and click OK to return to the Metric Editor.
g Click Save and Close to save your changes and close the Metric
Editor.
When you create these reports, include the following objects on the reports.
2 Include the single metric that returns all the data for your financial line
items. Creating this metric is described in Returning financial data with
metrics, page 441. This single metric is highlighted in the report below:
3 Create thresholds that apply any required metric formatting for the
different financial line items. For example, some of the financial line
items can be formatted as percentages. For any financial line items that
should be formatted as percentages, you must create thresholds to apply
this formatting. For example, the report shown below has two financial
line items at Level2 and one financial line item at Level3 that need to be
displayed as percentages.
You create thresholds for the financial items at each level. For example,
the thresholds below define the percentage formatting for the financial
line items shown in the report above:
Notice that these thresholds are applied to both the metric values and the
subtotal values, as indicated by the selection of the metric and subtotal
icon on the far right of the toolbar.
5 In addition to these required objects, you can also include any other
attributes required to provide additional context to the financial data.
As you create these initial reports for your financial reporting project, you
can take advantage of the other reporting and analysis capabilities
available in MicroStrategy. Refer to the Basic Reporting Help and the
Once the reports for your financial data are created, they can be viewed and
analyzed using MicroStrategy Web. Features such as outline mode,
graphing, and other analysis features can be used in MicroStrategy Web to
further the reporting and analysis capabilities of your financial data.
M ICRO STRATEGY
TUTORIAL
The theme of the MicroStrategy Tutorial project is a retail store for the time
2009 to 2012 that sells electronics, books, movies, and music. The key
features of the MicroStrategy Tutorial project include the following:
• Subject Areas: This folder contains reports that are categorized further
by topic. Topics covered include Customer Analysis, Enterprise
Performance Management, Human Resource Analysis, Inventory and
Supply Chain Analysis, Sales and Profitability Analysis, and Supplier
Analysis.
store, product, and time, which are the three common business perspectives
typically associated with retail business.
For detailed information about data modeling, see Chapter 2, The Logical
Data Model.
Geography hierarchy
The Geography hierarchy contains attributes such as Country and Region,
as well as Distribution Center, Call Center, and employee-specific attributes.
It is easy to understand why Country and Region are in the Geography
hierarchy, but what about Distribution Center, Call Center, and the
employee-related attributes?
Where product phone-in orders are taken. Each call Atlanta, Boston,
Call Center
center is located in a different city. Charleston.
Employee Birth
The date each employee was born. 5/6/66, 1/1/77.
Date
Employee FTE
Indicates whether the employee's status is full-time. Yes, No.
Flag
2/16/97,
Hire Date The date on which a particular employee was hired.
3/15/99.
Peter Rose,
Manager Person responsible for a specific call center.
Alice Cooper.
Central,
Region Each country is split into regions. Northeast,
Southwest.
Salary The amount of money an employee makes per year. 24,000, 35,000.
The attributes listed in the table above are some of the most commonly used
attributes that are included in the logical definition of the Geography
hierarchy. Refer to the following image for a complete understanding of the
logical relationships of all attributes for the Geography hierarchy.
Products hierarchy
The products hierarchy contains attributes such as Category, Brand,
Catalog, and Supplier.
Ayn Rand,
Brand The manufacturer or artist for a particular product.
3Com, Sony.
Spring 2006,
Catalog The medium used to sell products.
Fall 2007.
The Great
Item The individual product sold. Gatsby, Sony
Discman.
Business,
Used to further differentiate a subset of products
Subcategory Cameras,
within a category.
Drama.
McGraw Hill,
Supplier The distributor for a set of brands.
Disney Studios.
The attributes listed in the table above are some of the most commonly used
attributes that are included in the logical definition of the Products
hierarchy. Refer to the following image for a complete understanding of the
logical relationships of all attributes for the Products hierarchy.
Customers hierarchy
The Customers hierarchy contains customer demographic and purchase
information, such as Customer Age, Income Bracket, Payment Method, and
Ship Date.
Customer The name of the individual customer. Selene Allen, Chad Laurie.
Customer City The city where the customer resides. Albany, Chicago, Memphis.
[email protected],
Customer Email The email address of the customer.
[email protected].
Customer
The gender of the customer. Male, Female.
Gender
Customer State The state where the customer resides. Maine, North Dakota.
First Order Date The date of the first order placed by 2/14/2007.
the customer.
Payment Method The way a customer pays for an order. Amex, Check.
Store Country The country that a store resides in. Canada, Germany, USA
Store State The state that a store resides in. AB, PA, TX
Store Zipcode The postal zip code for a store. 00682, 22043
The attributes listed in the table above are some of the most commonly used
attributes that are included in the logical definition of the Customers
hierarchy. Refer to the following image for a complete understanding of the
logical relationships of all attributes for the Customers hierarchy.
Time hierarchy
The Time hierarchy contains time-specific attributes such as Year, Quarter,
Month, and Day.
1 If you are not already using the MicroStrategy Tutorial, log in to the
project source containing the MicroStrategy Tutorial and expand the
MicroStrategy Tutorial project. You must log in as a user with
administrative privileges.
4 From the hierarchies drop-down list you can select a different hierarchy
such as Customers, Geography, Products, and Time. These are user
hierarchies that define browsing and drilling functionality between
attributes. For information on creating user hierarchies using Architect,
see Creating and modifying user hierarchies, page 200.
5 To save the layout display of a hierarchy, from the File menu, select
Export Image. Type a name and select an image type to save the image
as, and click Save.
The logical data model provides a picture of all the pieces of information
necessary to understand your data and how it relates to your business. It is
a graphic-intensive technique that results in a data model representing the
definition, characteristics, and relationships of data in a business, technical,
or conceptual environment.
The physical warehouse schema is based on the logical data model, such as
Day, Item, Store, or Account. Several physical warehouse schemas can be
derived from the same logical data model. While the logical data model tells
you what facts and attributes to create, the physical warehouse schema tells
you where the underlying data for those objects is stored. The physical
warehouse schema describes how your data is stored in the data
warehouse.
The following prefixes and suffixes are used to identify different types of
tables.
tables.
Many tables include a combination of attributes and facts. Some of the basic
facts from which metrics in the MicroStrategy Tutorial were created from are
listed below.
Fact Description
Begin on
The number of individual items available at the beginning of each month.
hand
Churn The trends and profiles of the acquired, retained, and lost customers.
Customer Id The unique identification number allocated to the customer by the company.
End on
The number of individual items remaining at the close of each month.
hand
Fact Description
Gross The total income received from the company's product sales before
Revenue deducting the expenses.
The month level item inventories used for End on hand and Begin on hand
Item
type inventory calculations. This fact also supports year-to-date and month-
inventory
to-date analysis.
On Order
The quantity ordered by the customer.
Quantity
Profit The excess of the selling price of goods over their cost.
The number of days elapsed since the last purchase was made by the
Recency
customer.
The total income produced by a given source accounting for all product sales
Revenue
deducting discounts.
Rush
The amount of money charged to expedite delivery service.
Charge
Target
The target set for the product units sold.
Quantity
The amount of money charged by the supplier to the company per individual
Unit Cost
item purchased.
The amount of money charged by the company to the customer per individual
Unit Price
item sold.
Units
The number of individual items acquired from a supplier.
Received
The steps below show you how to explore the MicroStrategy Tutorial schema
using Architect.
1 If you are not already using the MicroStrategy Tutorial, log in to the
project source containing the MicroStrategy Tutorial and expand the
MicroStrategy Tutorial project. You must log in as a user with
administrative privileges.
3 Select the Project Tables View. All the tables included in the
MicroStrategy Tutorial project are displayed.
Tables are displayed to show the columns within each table, including
the column name and data type.
5 To view the physical columns for each table, along with the MicroStrategy
schema object they define:
d Select all the check boxes for the Display table logical view option.
For a description of each option, see Defining project creation and
display options, page 121.
e Click OK.
Tables are displayed to show the schema objects and the columns
used to define the schema objects.
6 To view attribute relationships in the Project Tables View, from the View
menu, select Show relationships.
7 From the Properties pane, you can use the Attribute, Facts, and Tables
tabs to browse the various tables and schema objects for the Tutorial
project.
8 To organize tables for further insight into the Tutorial project, you can
create layers. For information on creating layers using Architect, see
Organizing project tables: Layers, page 151.
9 To save the layout display of the Tutorial project schema, from the File
menu, select Export Image. Type a name and select an image type to
save the image as, and click Save.
Table: CITY_CTR_SLS
Fact table that stores sales data at the City and Call Center logical level.
Table: CITY_MNTH_SLS
Fact table that stores sales data at the City and Month logical level.
Table: CITY_SUBCATEG_SLS
Fact table that stores sales data at the City and Subcategory logical level.
Table: CUSTOMER_SLS
Fact table that shows sales data at the Customer logical level.
Table: DAY_CTR_SLS
Fact table that shows sales data at the Day and Call Center logical level.
Table: INVENTORY_CURR
Fact table that shows data for the current Inventory logical level.
TARGET_QTY Double The target set for the product units sold.
Table: INVENTORY_ORDERS
Fact table that shows data for the Inventory and Order logical level.
Table: ITEM_CCTR_MNTH_SLS
Fact table that shows sales data at the Item, Call Center, and Month logical level.
Table: ITEM_EMP_SLS
Fact table that shows sales data at the Item and Employee logical level.
Table: ITEM_MNTH_SLS
Fact table that shows sales data at the Item and Month logical level.
Table: LU_AGERANGE
Table: LU_BRAND
Lookup table for Brand data, which lists the manufacturer or artist for a particular product.
Table: LU_CALL_CTR
Lookup table for the Call Center data, which lists the Call Center details where product
phone-in orders are taken.
Table: LU_CATALOG
Lookup table for the Catalog data, which lists the products available in the catalog.
Table: LU_CATEGORY
Lookup table for Category data, which lists the products categorized at the highest levels.
Table: LU_COUNTRY
Lookup table for Country data, which represents countries where the company does or
hopes to do business in the future. Also includes countries where employees work.
Table: LU_CUST_CITY
Table: LU_CUST_REGION
Table: LU_CUST_STATE
Table: LU_CUSTOMER
Lookup table for Customer data. This table targets a customer as a consumer rather than a
business.
NVarChar
CUST_FIRST_NAME First name of the customer.
(255)
NVarChar
CUST_LAST_NAME Last name of the customer.
(255)
NVarChar
ADDRESS Address of the customer.
(255)
customer.
Table: LU_CUSTOMER_TELCO
Lookup table for Customer Telephone data, which lists the telephone plan details of the
customer.
Table: LU_CUSTSTATUS
Table: LU_DAY
Lookup table for Day data, which lists the calendar dates for customer transactions.
Table: LU_DIST_CTR
Lookup table for Distribution Center data, which lists the location where product orders are
sent out to customers.
Table: LU_EDUCATION
Table: LU_EMPLOYEE
Lookup table for Employee data, which lists the details of individuals working for the
company who receive salary and benefits in return.
Table: LU_GENDER
Lookup table for Customer Gender data, which lists the gender of the customer.
Table: LU_HOUSEHOLDCOUNT
Lookup table for Household Count data, which lists the details of the number of houses
owned by the customer.
Table: LU_HOUSINGTYPE
Lookup table for Housing Type data, which lists the details of type of house owned by the
customer.
Table: LU_INCOME
Lookup table for the Customer Income data, which lists the salary range reported by the
customer.
Table: LU_ITEM
Lookup table for the Item data, which lists the details of the individual products sold.
NVarChar
ITEM_NAME Name of the product sold.
(255)
NVarChar
ITEM_LONG_DESC Detailed description of the item.
(255)
Table: LU_MANAGER
Lookup table for Manager data, which lists the details of the person responsible for a
specific call center.
Table: LU_MARITALSTATUS
Lookup table for customer Marital Status, which lists the marital details of the customer.
Table: LU_MONTH
Lookup table for Month data, which lists the month of the customer transaction.
Table: LU_MONTH_OF_YEAR
Lookup table for Month of Year data, which lists the calendar month of purchase.
Table: LU_PROMO_TYPE
Lookup table for Promotion Type data, which lists the type of discount offered on the sale
product.
Table: LU_PROMOTION
Lookup table for Promotion data, which lists the discount being offered on the sale item.
Table: LU_PYMT_TYPE
Lookup table for Payment Type data, which lists the payment mode used by a customer to
pay for an order.
Table: LU_QUARTER
Lookup table for Quarter data, which list the details of the calendar quarter of purchase.
Table: LU_REGION
Lookup table for Region data, which lists the regions into which a country is split.
Table: LU_SHIPPER
Lookup table for Shipper data, which lists the details of the vendor used to send products to
the customer.
Table: LU_STORE
Lookup table for Store data, which lists the details of a retail store including the location
information.
NVarChar
STORE_NAME Name given to a store.
(100)
NVarChar
STORE_ADDRESS Address where the store is located.
(255)
NVarChar
STORE_CITY The city that a store resides in.
(100)
NVarChar
STORE_EMAIL Email address of the store.
(100)
NVarChar
STORE_WEBSITE URL of the store website.
(100)
Table: LU_SUBCATEG
Lookup table for Subcategory data, which further differentiates a subset of products within
a category.
Table: LU_SUPPLIER
Lookup table for Supplier data, which lists the distributor for a set of brands.
Table: LU_TELCO_PLANS
Lookup table for Telephone Plan data, which lists the telephone plan details.
NVarChar
PLAN_DESC Name given to a phone plan.
(255)
PLAN_PRICE_MINPK Double Price per minute for calls during peak time.
Table: LU_YEAR
Lookup table for Year data, which lists the calendar year of purchase.
Table: MNTH_CATEGORY_SLS
Fact table that stores sales data at the Month and Category logical level.
Table: MTD_DAY
Table that defines the month-to-date time period for a given date.
Table: ORDER_DETAIL
Table: ORDER_FACT
Table: PROMOTIONS
Table: QTD_DAY
Table that defines the quarter-to-date time period for a given date.
Table: QTR_CATEGORY_SLS
Fact table that stores sales data at Quarter and Category logical level.
Table: REL_CAT_ITEM
Table: RUSH_ORDER
Table for Rush Order data that indicates whether a customer chose to expedite delivery of
an order.
Table: STATE_REGION_MNTH_SLS
Fact table that stores sales data at State, Region, and Month logical levels.
customer.
Table: STATE_SUBCATEG_MNTH_SLS
Fact table that stores sales data at State, Subcategory, and Month logical levels.
Table: STATE_SUBCAT_REGION_SLS
Fact table that stores sales data at State, Subcategory, and Region logical levels.
Table: SUBCAT_MNTH_CTR_SLS
Fact table that stores sales data at Subcategory, Month, and Call Center logical levels.
Table: YR_CATEGORY_SLS
Fact table that stores sales data at Year and Category logical levels.
Table: YTD_DAY
Table that defines the year-to-date time period for a given date.
L OGICAL TABLES
MicroStrategy uses logical tables to relate the data stored in your data
warehouse to the schema objects that constitute a MicroStrategy project.
Logical tables and logical table aliases represent physical tables in your
data warehouse. Logical views are defined using SQL queries against the
data warehouse, which can combine data from multiple physical tables into
one logical table representation in MicroStrategy.
This chapter introduces you to the different types of logical tables, with a
focus on how you can use the logical view feature to take advantage of the
enhanced schema support in MicroStrategy.
Logical tables
Logical tables are MicroStrategy objects that form the foundation of a
schema. Physical tables in a data warehouse consist of columns, and logical
tables in the MicroStrategy schema relate this column data to attributes and
facts. These attributes and facts are part of the report definition that the
MicroStrategy Engine refers to when a report is executed.
This type of logical table is the most common logical table. Based on
these tables, you can create MicroStrategy schema objects, such as
attributes and facts. For more information on how to use the Warehouse
Catalog, refer to the Help (search for "Warehouse Catalog").
• Logical table alias: A logical table that uses a different name for a
physical table. One physical table can have more than one logical table
alias. Logical table aliases are used to create attribute roles.
When an attribute plays more than one role, you need to create an
attribute in the logical model for each of the roles. To accomplish this,
you create multiple logical table aliases pointing to the same physical
table and define those logical table aliases as the lookup tables for the
attributes in different roles.
For detailed information on attribute roles, refer to Attributes that use the
same lookup table: Attribute roles, page 303. To create a logical table
alias, right-click the logical table name and select Create Table Alias.
For step-by-step instructions, refer to the Help (search for "Create a table
alias").
Logical views are different from the above-mentioned logical tables and
logical table aliases for the following reasons:
However, once logical views are created, they can be used in the same
way as logical tables and logical table aliases. This means that you can
use the logical views to build attributes and facts, and that you can also
create logical table aliases for the logical views.
The biggest benefit of using logical views is that you can model a
MicroStrategy schema that cannot be supported with only the physical
database structures in the data warehouse. Many common modeling
scenarios are easier to manage using logical views. Examples are:
▫ Slowly-changing dimensions
▫ Recursive hierarchies
For common usage examples, refer to Logical view examples, page 514.
In the MicroStrategy Tutorial, logical tables and all the other schema objects
are stored in the Schema Objects folder. Using the Logical Table Editor, you
can define your logical view using a SQL statement, as well as view the
content of all the logical tables and their associated warehouse tables.
Whenever you create or add logical tables, logical table aliases, or logical
views to the project, you need to update the schema. The Update Schema
option can be accessed from the Schema menu.
• Using the Warehouse Catalog: Adding and removing tables for a project,
page 325
The logical table size determines which logical table to use to answer a
query when multiple logical tables would provide the same data. The table
with the lowest logical table size is used, as a lower logical table size means
the table has a higher level of aggregation. The performance of accessing a
table with a higher level of aggregation is usually better than accessing a
table with a lower level of aggregation.
summary tables with higher-level attributes. This means the table with
summary information is used to return data rather than the table with
transaction-level data when the tables can be used to answer the same
query.
• Defining logical table size while comparing all project tables, page 507
Browse to the location where you store your tables, and double-click the
desired table. If a message is displayed asking if you want to use read
only mode or edit mode, select Edit and click OK to open the Table Editor
in edit mode so that you can make changes to the table. The Table Editor
opens.
• If you are only given the option of using read only mode, this means
another user is modifying the project's schema. You cannot use edit
mode until the other user is finished with their changes and the
schema is unlocked.
• For information on how you can use read only mode and edit mode
for various schema editors, see Using read only or edit mode for
schema editors, page 108.
2 On the Logical View tab, in the Logical size area, type the value for the
table's logical size.
If multiple tables can be used to answer the same query, the table with the
lowest logical table size is used.
3 To lock the logical table size of a table, select the Preserve this logical
size when updating schema information check box. When a table's
logical size is locked, the table is excluded from the logical table size
calculation when a schema update is performed.
4 Click Save and Close to save your modifications to the table and close
the Table Editor.
5 You must update the schema for the new logical table size to take effect.
Close all editors, then from the Schema menu, select Update Schema.
To define the logical table size of a table while comparing all project
tables
• If you are only given the option of using read only mode, this means
another user is modifying the project's schema. You cannot use edit
mode until the other user is finished with their changes and the
schema is unlocked.
• For information on how you can use read only mode and edit mode
for various schema editors, see Using read only or edit mode for
schema editors, page 108.
2 In the Size value column for a table, type the desired value for the
table's logical size.
• If multiple tables can be used to answer the same query, the table
with the lowest logical table size is used.
• You can sort any column in the Logical Size Editor by clicking on the
column heading.
• You can display the number of rows in each table by selecting Show
the table row count from the Edit menu.
3 To lock the size of a table, select that table's Size locked check box.
When a table's logical size is locked the table is excluded from the logical
table size calculation when a schema update is performed. This helps to
retain any table sizes that are manually defined.
To unlock the table's size, clear the Size locked check box.
To lock or unlock all table values displayed, click the Lock all or Unlock all
toolbar options.
6 From the File menu, select Close to close the Logical Size Editor.
7 You must update the schema for any new logical table sizes to take
effect. Close all editors, then from the Schema menu, select Update
Schema.
MicroStrategy determines the primary key for a table based on the attributes
mapped to the columns of the table. In the Table Editor on the Layout tab, a
key icon displayed by the attribute name indicates that the attribute is part of
the primary key for this table. The primary key is made up of the lowest level
attributes. For example, a warehouse table's primary key is defined using
the columns CUSTOMER_ID, PRODUCT_ID, and ORDER_ID. If these three
columns are mapped to attributes in MicroStrategy, then the primary key is
represented correctly. In this case, from the Table Editor's Layout tab, you
can select the The key specified is the true key for the warehouse table
check box. This is the default behavior for all tables added to a
MicroStrategy project.
If the primary key for the warehouse table is not identical to the attributes
listed as key attributes for the table in MicroStrategy, clear the The key
specified is the true key for the warehouse table check box. Using the
example described above, consider the scenario in which CUSTOMER_ID and
PRODUCT_ID are mapped to MicroStrategy attributes, but ORDER_ID is not
mapped to an attribute in MicroStrategy. In this case, only CUSTOMER_ID
and PRODUCT_ID would be recognized by MicroStrategy as part of the
table's primary key. In this scenario, this check box should be cleared so
that the warehouse table's primary key can be verified. Otherwise, selecting
this check box for such a scenario could cause incorrect or erroneous data
to be returned.
The Object Browser on the left-hand side lists all tables and columns that
have been imported into the project. Any physical table in the project
database instance can be used in the SELECT statement. The SQL
statement panel, displayed near the top and on the right-hand side, is where
you type in your SQL query. The Mapping panel, displayed just below the
SQL statement panel, is where you map the columns returned by the SQL
query.
Since SQL queries are required to create logical views, you should be
experienced with using SQL before you use the logical view feature. It is
your responsibility to ensure the accuracy and validity of your SQL
statements. In addition, you should also understand that the SQL query
entered for logical views is not modified in any way by MicroStrategy.
Therefore, make sure that your RDBMS is optimized to answer the query
that you create.
Because the MicroStrategy Engine does not parse through the SQL syntax,
the statistics log does not contain any information about the actual physical
tables accessed; the logical view is logged instead. The same holds true if
you use a view in the database, in which case table objects accessed are not
logged either.
In the SQL generated for a report, logical views are generated as either a
derived table or a common table expression (CTE) depending on the type of
database that you use. It is recommended that you use derived tables to
define logical views, although CTEs are also supported by some databases.
Derived tables are advantageous because they are nested in the SQL
generated by the Engine. CTEs, however, are not nested in the SQL
because this would result in invalid SQL syntax. Refer to your third-party
database documentation for any applicable SQL syntax requirements.
When the MicroStrategy Engine needs to use a logical table that maps
directly to a physical database table, it inserts the name of the table into the
FROM clause. For a logical view, which maps to a SQL statement, the
MicroStrategy Engine inserts the SQL syntax in the FROM clause. The
Engine generates derived table syntax to represent the logical view.
The results of logical views are not cached. Instead, the logical view
appears as additional syntax in the report SQL generated by MicroStrategy.
Prerequisite
• You must have the MultiSource Option to create logical views on data
sources other than the data source for the primary database instance. If
you do not have the MultiSource Option, then you can only create logical
views for the data source that belongs to the primary database instance.
1 From the File menu, select New and then Logical Table. The Table
Editor is displayed with the Physical View tab selected by default.
2 If you have the MultiSource Option, from the Select current database
instance drop-down list, select which data source to retrieve the data
from for the logical view. Select a database instance for the data source
to use for the logical view.
If you do not have the MultiSource Option, then you can only create
logical views for the data source that belongs to the primary database
instance. This means that there is no drop-down list to select a database
instance.
3 In the SQL Statement panel, type your SQL statement. You can drag and
drop columns from the Object Browser to insert them into the statement.
6 Type in the column name under Column Object. This creates a new
column.
Alternatively, you can also drag and drop columns from the Object
Browser to the Column Object cell. By doing this, you map an existing
column to the logical view.
The names of the columns must match exactly the column aliases defined
in the SQL statement. However, the order of the columns does not have
to match the order in which the column aliases appear in the SQL
statement.
7 Select a Data Type for the column by using the drop-down list.
If you used an existing column in the mapping in this step, the data type
of that column is inherited. If you change the data type, the change will
affect all the tables with that column.
• Scale: The number of digits to the right of the decimal point used to
define a number. The scale of a data type must be less than or equal
to the precision for the data type. For example, the number
1234.56789 has a scale of five and a precision of nine.
9 From the toolbar, click Save and Close to save the logical table and
close the Table Editor.
10 From the Schema menu, select Update Schema to ensure that the new
logical view is loaded into the project.
Based on the logical view that you just created, you can now create new
attributes and facts, as you would with any other logical table (see Creating
attributes, page 249 and Creating facts, page 206). You can also map the
columns of the logical table to existing attributes and facts. This can be done
by modifying the attributes or facts to include the logical table as a source
table.
• The model cannot support fact tables at the level of attributes that are not
keys. This restriction applies to summary tables as well as to
intermediate results that may be generated by the SQL Engine.
• Too many rows in the dimension table may slow down the SELECT
DISTINCT query, thus affecting element browsing requests that display a
list of attribute elements, for example, when populating pick lists for
prompts.
The following is an example lookup table for Store, Market, and Region.
Lookup_store
In this table, Market and Region are not the keys. Therefore, if the requested
fact table is at the Market or Region level, a direct join between the fact
table and the above lookup table may result in double-counting. To avoid
that, you can use the Logical View feature to define another logical table
Lookup_Market as follows:
Then use this table as the lookup table for Market. When it is joined with a
Market-level fact table (Market_Sales), the following report SQL is
generated:
Select a11.Market_ID,a11.Market_Desc,
SUM(a12.Sales)
From (select Market_ID, Market_Name, Region_ID
from Lookup_Store
where level=1) a11,
Market_Sales a12
Where a11.Market_ID = a12.Market_ID
Group by a11.Market_ID,
a11.Market_Name
F_Table1
F_Table2
Using the Logical View feature, you can use the following SQL query to
create a logical table to calculate the Date difference and then define the
attribute on that new column:
The new logical table (logical view) looks like the following table, and a new
attribute can be defined on the Cycle_Time column.
Logical view
SCDs are well documented in the data warehousing literature. Ralph Kimball
has been particularly influential in describing dimensional modeling
techniques for SCDs (see The Data Warehouse Toolkit, for instance).
Kimball has further coined different distinctions among ways to handle SCDs
in a dimensional model. For example, a Type I SCD presents only the
current view of a dimensional relationship, a Type II SCD preserves the
history of a dimensional relationship, and so forth.
The techniques described here provide the flexibility to perform either type
of analysis. They also provide you an easy way to specify which type of
analysis you would like to perform.
LU_SALES_REP
When using this type of dimensional lookup table, the fact table must include
a date field, such as a transaction date.
FACT_TABLE
1 9/1/2003 100
2 9/10/2003 200
3 9/15/2003 150
1 3/1/2004 200
2 3/10/2004 250
3 3/15/2004 300
2 9/5/2004 125
3 9/15/2004 275
4 9/20/2004 150
LVW_CURRENT_ORG
2 Create another logical view that performs the "as-was" join between the
lookup table and fact table, resulting in a fact view at the District level.
LVW_HIST_DISTRICT_SALES
from LU_SALES_REP L
join FACT_TABLE F
on(L.Sales_Rep_ID = F.Sales_Rep_ID)
where F.Trans_Dt between L.Eff_Dt and
L.End_Dt
group by District_ID, Trans_Dt
• Sales Rep:
• Current District:
• Historical District:
• Date:
• Month:
— @ID = MONTH_ID
• Expression: sales
• Sales: SUM(sales)
The result of this is a logical schema that looks like the following:
As-was analysis
• Resulting SQL
a12.Month_ID Month_ID,
sum(a11.SALES) WJXBFS1
From (select District_ID, Trans_dt,sum(sales) sales
from LU_SALES_REP L
join FACT_TABLE F
on (L.Sales_rep_ID = F.Sales_rep_ID)
where F.trans_dt between L.EFF_DT and
L.END_DT
group by District_ID, Trans_dt)
a11
join LU_TIME a12
on (a11.Trans_dt = a12.Date_ID)
join LU_DISTRICT a13
on (a11.District_ID = a13.District_ID)
group by a11.Distrcit_ID,
a12.Month_ID
• Report results
As-is analysis
Specify the "as-is" analysis by using the Current District attribute on reports:
• Resulting SQL
• Report result
LU_SALES_REP
1 1 Jones 37 0
2 2 Smith 37 1
3 3 Kelly 38 0
4 4 Madison 38 1
5 1 Jones 39 1
6 3 Kelly 39 1
When using this type of dimensional lookup table, the fact table must also
include the surrogate key. A transaction date field may or may not exist.
FACT_TABLE
Sale-Rep_CD Sale
1 100
2 200
3 150
5 200
2 250
3 300
2 125
6 275
4 150
LVW_CURRENT_ORG
— @ID = sales_rep_cd
• Sales Rep:
• Current District:
• Historical District:
• Date:
• Month:
— @ID = MONTH_ID
— Child: Date
• Expression: sales
• Sales: SUM(sales)
As-was analysis
• Resulting SQL
• Report results
As-is analysis
Specify the "as-is" analysis by using the Current District attribute on reports:
• Resulting SQL:
• Report result
If you do not already have such a table in the warehouse and your
circumstances do not allow you to add additional tables to the database,
then you can use the logical view approach to address this issue as long as
you already have a lookup table for the Day attribute.
The SQL below can be used to define a logical MTD_DATE table, which
contains the Day attribute. The MTD transformation can then be defined
using the MTD_DATE column.
HIRE_DATE CONTACT_PHONE_NUMBER
DEPT_ID
NULLS are displayed for employees who do not have emergency contacts.
However, if you model the attributes as described below, you would not get
the desired output:
• Employee:
• Department:
▫ @ID = DEPT_ID
▫ Child: Employee
• Hire Date:
▫ @ID = HIRE_DATE
▫ Child: Employee
• Emergency Contact:
▫ Child: Employee
Using the above model, the SQL generated would join the EMPLOYEE table
to the EMERGENCY_CONTACT table, and only those employees who have
emergency contacts would appear in the final result. In order to see all
employees, you can perform an outer join using a logical view, described as
follows.
select E.EMP_ID,
E.FIRST_NAME,
E.LAST_NAME,
E.HIRE_DATE,
E.DEPT_ID,
C.CONTACT_FIRST_NAME,
C.CONTACT_LAST_NAME,
C.CONTACT_PHONE_NUMBER
from EMPLOYEE E
left outer join EMERGENCY_CONTACT C
on (E.EMP_ID = C.EMP_ID)
LVW_EMERGENCY_CONTACT
EMP_ID
FIRST_NAME
LAST_NAME
HIRE_DATE
DEPT_ID
CONTACT_FIRST_NAME
CONTACT_LAST_NAME
CONTACT_PHONE_NUMBER
Make sure to include all columns from the original child table (for example,
EMPLOYEE). The new logical table LVW_EMERGENCY_CONTACT can
then be used to define attributes as follows:
• Employee:
• Department:
▫ @ID = DEPT_ID
▫ Child: Employee
• Hire Date:
▫ @ID = HIRE_DATE
▫ Child: Employee
• Emergency Contact:
▫ Child: Employee
Now if we run a report with Employee and Emergency Contact attributes, the
EMPLOYEE table will be outer joined to the EMERGENCY_CONTACT table,
and NULLs will be returned for any employees who do not have emergency
contacts. Also note that if we run a report that includes only the Employee
attribute, it will be executed against the EMPLOYEE table; the
EMERGENCY_CONTACT table will be joined only when necessary.
This technique is applicable any time that the lookup tables should always
be outer joined. The technique does not work when the lookup tables should
sometimes be outer joined and sometimes be inner joined.
D ATA TYPES
The MicroStrategy data type stores data values internally and in the
metadata repository and is later used during SQL generation when defining
intermediate tables, and data mart tables, and generating the correct syntax
for literals. The data type is also used whenever multi-pass SQL is used, as
with custom groups. For more information about data marts and custom
groups, see the Advanced Reporting Help.
The table below lists the supported data types for supported databases as
well as the MicroStrategy data type that is used to define the data in
BLOB LongVarBin
CHAR Char
CHARACTER Char
CLOB LongVarChar
DATE Date
DEC Numeric
DECIMAL Numeric
DOUBLE Double
FLOAT Double
GRAPHIC NChar
INT Integer
INTEGER Integer
LABEL VarChar
LONG VarChar
LONGVAR VarChar
NUM Numeric
NUMERIC Numeric
RAW VarBin
REAL Real
SMALLINT Integer
TIME Time
TIMESTAMP Timestamp
TIMESTMP Timestamp
VARCHAR VarChar
VARGRAPHIC NVarChar
BIT Binary
CHAR Char
CHARACTER Char
DATE Date
DECIMAL Decimal
FLOAT Float
INT Integer
INTEGER Integer
NUMERIC Numeric
REAL Real
SMALLINT Integer
VARBIT VarBin
VARCHAR VarChar
BYTE LongVarBin
CHAR Char
CHARACTER Char
DATE Date
DATETIME Timestamp
DEC Decimal
DECIMAL Decimal
FLOAT Double
INT Integer
INTEGER Integer
LVARCHAR LongVarChar
MONEY Numeric
NCHAR NChar
NUMERIC Decimal
NVARCHAR NVarChar
REAL Real
SERIAL Integer
SERIAL8 Integer
SMALLFLOAT Real
SMALLINT Integer
TEXT LongVarChar
VARCHAR VarChar
BIGDECIMAL Numeric
BIGINTEGER Integer
BLOB VarBin
BOOLEAN Binary
BYTE Integer
CHAR Char
CLOB VarChar
DATE Date
MetaMatrix
DOUBLE Double
FLOAT Float
INTEGER Integer
LONG Integer
SHORT Integer
STRING VarChar
TIME Time
TIMESTAMP Timestamp
BINARY Binary
BIT Unsigned
BLOB LongVarBin
CHAR Char
DATE Date
DATETIME Timestamp
DECIMAL Decimal
DOUBLE Double
ENUM Char
FLOAT Float
INT Integer
LONGBLOB LongVarBin
LONGTEXT LongVarChar
MEDIUMBLOB LongVarBin
MEDIUMINT Integer
MEDIUMTEXT LongVarChar
NCHAR NChar
NVARCHAR NVarChar
SET Char
SMALLINT Integer
TEXT LongVarChar
TIME Time
TIMESTAMP Timestamp
TINYBLOB LongVarBin
TINYINT Integer
TINYTEXT LongVarChar
VARBINARY VarBin
VARCHAR VarChar
YEAR Integer
BIT Binary
BYTEINT Integer
CHAR Char
CHARACTER Char
DATE Date
DATETIME Timestamp
DECIMAL Numeric
DOUBLE Float
FLOAT Float
FLOAT4 Float
FLOAT8 Float
INT Integer
INT1 Integer
INT2 Integer
INT4 Integer
INTEGER Integer
NCHAR NChar
NUMERIC Numeric
NVARCHAR NVarChar
REAL Real
SMALLINT Integer
TIME Time
TIMESTAMP TimeStamp
VARBIT VarBin
VARCHAR VarChar
BLOB LongVarBin
CHAR Char
CLOB LongVarChar
DATE Timestamp
DECIMAL Numeric
FLOAT Float
INTEGER Numeric
LONG LongVarChar
NCHAR NChar
NUMBER Numeric
NVARCHAR2 NVarChar
RAW VarBin
REAL Float
SMALLINT Numeric
TIMESTAMP(6) Timestamp
VARCHAR VarChar
VARCHAR2 VarChar
BIGINT Integer
BIGSERIAL Integer
BIT Binary
BOOLEAN Integer
CHAR Char
DATE Date
DECIMAL Decimal
NUMERIC Decimal
REAL Real
SERIAL Integer
SMALLINT Integer
TEXT LongVarChar
TIME Time
TIMESTAMP Timestamp
VARBIT VarBin
VARCHAR VarChar
BINARY VarBin
BIT Binary
CHAR VarChar
CHARACTER VarChar
DATE Timestamp
DATETIME Timestamp
DEC Numeric
DECIMAL Numeric
DOUBLE Float
FLOAT Float
IMAGE LongVarBin
INT Integer
INTEGER Integer
MONEY Numeric
NCHAR NChar
NTEXT LongVarChar
NUMERIC Numeric
NVARCHAR NVarChar
REAL Float
SMALLDATETIME Timestamp
SMALLINT Integer
SMALLMONEY Numeric
TEXT LongVarChar
TIME TimeStamp
TIMESTAMP VarBin
VARBINARY VarBin
VARCHAR VarChar
BINARY Binary
BIT Binary
CHAR Char
DATETIME Timestamp
DECIMAL Numeric
FLOAT Float
IMAGE LongVarBin
INT Integer
INTEGER Integer
MONEY Numeric
NTEXT LongVarChar
REAL Real
SMALLDATETIME Timestamp
SMALLINT Integer
SMALLMONEY Numeric
TEXT LongVarChar
TINYINT Unsigned
UNICHAR NChar
UNIVARCHAR NVarChar
VARBINARY VarBin
VARCHAR VarChar
BINARY Binary
BIT Binary
CHAR Char
DATE Date
DATETIME Timestamp
DECIMAL Numeric
DOUBLE Double
FLOAT Float
INT Integer
INTEGER Integer
MONEY Numeric
NUMERIC Numeric
REAL Real
SMALLDATETIME Timestamp
SMALLINT Integer
SMALLMONEY Numeric
TIME Time
TIMESTAMP Timestamp
TINYINT Unsigned
VARBINARY VarBin
VARCHAR VarChar
BYTE Binary
BYTEINT Integer
BYTEINTEGER Integer
BYTES Binary
CHAR Char
CHARACTER Char
CHARACTERS Char
CHARS Char
CLOB LongVarChar
DATE Date
DEC Decimal
DECIMAL Decimal
FLOAT Double
INT Integer
INTEGER Integer
NCHAR NChar
NVARCHAR NVarChar
NUMERIC Decimal
REAL Double
SMALLINT Integer
TIME Time
TIMESTAMP Timestamp
VARBYTE VarBin
VARCHAR VarChar
Calendar dates.
Date
Similar to ANSI DATE.
Time of day.
Time
Similar to ANSI TIME.
Format types
Attribute forms are also associated with a MicroStrategy format type, which
specifies how attribute form values should be displayed on MicroStrategy
interfaces. You specify the format type of an attribute form in the Form
Format: Type drop-down menu in the Attribute Editor.
The attribute form format types are described in the following table.
Format
Description
Type
Information is stored and displayed in the Big Decimal form, which represents
Big
high-precision fixed point numbers. For more information about Big Decimal,
Decimal
see Big Decimal, page 590.
Information is stored and displayed both as date and time in the format
Datetime specific to the data. The date follows the MM/DD/YYYY format and time
follows the HH:MM:SS format.
Picture stored and displayed the form of an image file, such as bitmap, JPG, or GIF.
For example, you edit the ID form of the Year attribute in the Attribute Editor.
In the Column Alias tab, you notice that the Year attribute is assigned an
"Integer" data type. However, you create a new column alias and assign it
the "Date" data type.
When you return to the Definition pane in the Attribute Editor, you must
select an appropriate format type from the Form Format: Type drop-down
menu. This format type must be compatible with the data type you assigned
in the Column Alias tab. If you select a format type that is incompatible with
the data type and click OK to exit the Attribute Editor, a warning message
appears notifying you of the incompatibility. Although you have the option to
continue by clicking Yes, doing so can still result in SQL generation issues.
The following chart is intended to guide you in assigning format types that
are compatible with the data type you have assigned to a column.
Different format types are compatible with different data types given the
specific data in your column. Therefore, some of the data type-format type
combinations below may not work with your specific data.
Decimal Number
Double Number
Float Number
Integer Number
Numeric Number
Real Number
Unsigned Number
Big Decimal
Big Decimal is a MicroStrategy-specific data type that allows users to
support high-precision attribute ID values that have more than 15 digits of
precision, such as BIGINT and DECIMAL (precision, scale) data types.
Examples of such attribute ID values are account numbers, credit card
numbers, and long integers.
You can define attributes that are identified by numeric columns in the
database. These numeric columns can have more than 15 digits of precision,
such as account numbers and other long integers. You must use the Big
Decimal data type to handle these values, because these data values have
higher precision and cannot be stored in normal numeric data types.
If you do not associate high-precision database fields with the Big Decimal
data type, you may see numbers truncated starting with the 16th digit. The
WHERE clause in the report SQL statement in drill reports may truncate
numbers starting from the 16th digit, and page-by may not return results.
When using the Big Decimal data type, follow the rules listed below:
• Attribute form: If you change the column data type to Big Decimal on
the Column Alias tab in the Attribute Editor, you must also select Big
Decimal as the form format type in the Form format: Type drop-down
menu in the Definition tab.
• Attribute ID: Follow the steps in the topic Defining attributes with high-
precision ID forms in the MicroStrategy Developer Help (formerly the
MicroStrategy Desktop Help).
• Metric: Although it is possible to define Big Decimal as the data type for
metric values, consider the following drawbacks:
Note that the Warehouse Catalog does not automatically map DECIMAL(p,
s) or NUMERIC(p, s) columns to the Big Decimal MicroStrategy data type
even when the precision is greater than 15. This is because Big Decimal
should only be used when the column is used as an attribute ID form.
Symbol Description
Digit placeholder.
• If the number contains fewer digits than the placeholders contained in the
format, the number is padded with zeros.
For example, the format code 00000 will display the number 12 as 00012.
• If there are more digits to the right of the decimal point than the
0 (zero) placeholders in the format, the decimal portion is rounded to the number
of places specified by the placeholders.
• If there are more digits to the left of the decimal point than the
placeholders in the format, the extra digits are retained.
• If the format contains zeros to the left of the decimal point, numbers less
than one are displayed with zeros to the left of the decimal point.
Digit placeholder.
For example, the format code ##.### will display the number 0025.630 as 25.630.
• If there are more digits to the right of the decimal point than the
placeholders in the format, the decimal portion is rounded to the number of
# places specified by the placeholders.
• If there are more digits to the left of the decimal point than the
placeholders in the format, the extra digits are retained.
• If the format contains only number signs (#) to the left of the decimal point,
numbers less than one are displayed beginning with a zero.
For example, the format #.00 will display the number 0.43 as 0.43.
Symbol Description
Decimal separator. Note that the actual decimal separator used depends on
. (period)
the session locale.
The following table lists examples of custom numeric formats. It includes the
formatting symbols, the report data, and how that data is displayed after
applying the formatting to a Big Decimal data type.
250.436 250.44
#.##
0.43 0.43
250.436 250.44
#.0#
125 125.0
To determine how and when to use binary data types in MicroStrategy, the
following MicroStrategy features are supported for binary data types:
▫ Drilling.
▫ Element browsing.
▫ Page-by.
▫ Sorting.
• MicroStrategy supports the following features for any attributes that have
non-ID attribute forms that are mapped to a binary data type: