MicroStrategy 8 - Advanced Reporting Guide
MicroStrategy 8 - Advanced Reporting Guide
Version: 8.0.1
Document Number: 09450801
Tenth Edition, July 2005, version 8.0.1
To ensure that you are using the documentation that corresponds to the software you are licensed to use, compare this version number
with the software version shown in “About MicroStrategy...” in the Help menu of your software.
If you have not executed a written or electronic agreement with MicroStrategy or any authorized MicroStrategy distributor, the following
terms apply:
This software and documentation are the proprietary and confidential information of MicroStrategy Incorporated and may not be
provided to any other person. Copyright © 2001-2005 by MicroStrategy Incorporated. All rights reserved.
THIS SOFTWARE AND DOCUMENTATION ARE PROVIDED “AS IS” AND WITHOUT EXPRESS OR LIMITED WARRANTY OF ANY
KIND BY EITHER MICROSTRATEGY INCORPORATED OR ANYONE WHO HAS BEEN INVOLVED IN THE CREATION,
PRODUCTION, OR DISTRIBUTION OF THE SOFTWARE OR DOCUMENTATION, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE AND
NONINFRINGMENT, QUALITY OR ACCURACY. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
SOFTWARE AND DOCUMENTATION IS WITH YOU. SHOULD THE SOFTWARE OR DOCUMENTATION PROVE DEFECTIVE,
YOU (AND NOT MICROSTRATEGY, INC. OR ANYONE ELSE WHO HAS BEEN INVOLVED WITH THE CREATION, PRODUCTION,
OR DISTRIBUTION OF THE SOFTWARE OR DOCUMENTATION) ASSUME THE ENTIRE COST OF ALL NECESSARY
SERVICING, REPAIR, OR CORRECTION. SOME STATES DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO
THE ABOVE EXCLUSION MAY NOT APPLY TO YOU.
In no event will MicroStrategy, Inc. or any other person involved with the creation, production, or distribution of the Software be liable
to you on account of any claim for damage, including any lost profits, lost savings, or other special, incidental, consequential, or
exemplary damages, including but not limited to any damages assessed against or paid by you to any third party, arising from the use,
inability to use, quality, or performance of such Software and Documentation, even if MicroStrategy, Inc. or any such other person or
entity has been advised of the possibility of such damages, or for the claim by any other party. In addition, MicroStrategy, Inc. or any
other person involved in the creation, production, or distribution of the Software shall not be liable for any claim by you or any other
party for damages arising from the use, inability to use, quality, or performance of such Software and Documentation, based upon
principles of contract warranty, negligence, strict liability for the negligence of indemnity or contribution, the failure of any remedy to
achieve its essential purpose, or otherwise. The entire liability of MicroStrategy, Inc. and your exclusive remedy shall not exceed, at
the option of MicroStrategy, Inc., either a full refund of the price paid, or replacement of the Software. No oral or written information
given out expands the liability of MicroStrategy, Inc. beyond that specified in the above limitation of liability. Some states do not allow
the limitation or exclusion of liability for incidental or consequential damages, so the above limitation may not apply to you.
The information contained in this manual (the Documentation) and the Software are copyrighted and all rights are reserved by
MicroStrategy, Inc. MicroStrategy, Inc. reserves the right to make periodic modifications to the Software or the Documentation without
obligation to notify any person or entity of such revision. Copying, duplicating, selling, or otherwise distributing any part of the Software
or Documentation without prior written consent of an authorized representative of MicroStrategy, Inc. are prohibited. U.S. Government
Restricted Rights. It is acknowledged that the Software and Documentation were developed at private expense, that no part is public
domain, and that the Software and Documentation are Commercial Computer Software provided with RESTRICTED RIGHTS under
Federal Acquisition Regulations and agency supplements to them. Use, duplication, or disclosure by the U.S. Government is subject
to restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in Technical Data and Computer Software clause at DFAR
252.227-7013 et. seq. or subparagraphs (c)(1) and (2) of the Commercial Computer Software—Restricted Rights at FAR 52.227-19,
as applicable. Contractor is MicroStrategy, Inc., 1861 International Drive, McLean, Virginia 22102. Rights are reserved under copyright
laws of the United States with respect to unpublished portions of the Software.
The following are either trademarks or registered trademarks of MicroStrategy Incorporated in the United States and certain other
countries:
MicroStrategy, MicroStrategy 6, MicroStrategy 7, MicroStrategy 7i, MicroStrategy 7i Evaluation Edition, MicroStrategy 7i Olap
Services, MicroStrategy 8, MicroStrategy Evaluation Edition, MicroStrategy Administrator, MicroStrategy Agent, MicroStrategy
Architect, MicroStrategy Bi Developer Kit, MicroStrategy Broadcast Server, MicroStrategy Broadcaster, MicroStrategy Broadcaster
Server, MicroStrategy Business Intelligence Platform, MicroStrategy Consulting, MicroStrategy CRM Applications, MicroStrategy
Customer Analyzer, MicroStrategy Desktop, MicroStrategy Desktop Analyst, MicroStrategy Desktop Designer, MicroStrategy eCRM
7, MicroStrategy Education, MicroStrategy eTrainer, MicroStrategy Executive, MicroStrategy Infocenter, MicroStrategy Intelligence
Server, MicroStrategy Intelligence Server Universal Edition, MicroStrategy MDX Adapter, MicroStrategy Narrowcast Server,
MicroStrategy Objects, MicroStrategy OLAP Provider, MicroStrategy SDK, MicroStrategy Support, MicroStrategy Telecaster,
MicroStrategy Transactor, MicroStrategy Web, MicroStrategy Web Business Analyzer, MicroStrategy World, Alarm, Alarm.com,
Alert.com, Angel, Angel.com, Application Development and Sophisticated Analysis, Best In Business Intelligence, Centralized
Application Management, Changing The Way Government Looks At Information, DSS Agent, DSS Architect, DSS Broadcaster, DSS
Broadcaster Server, DSS Office, DSS Server, DSS Subscriber, DSS Telecaster, DSS Web, eBroadcaster, eCaster, eStrategy,
eTelecaster, Information Like Water, Insight Is Everything, Intelligence Through Every Phone, Intelligence To Every Decision Maker,
Intelligent E-Business, IWAPU, Personal Intelligence Network, Personalized Intelligence Portal, Query Tone, Quickstrike, Rapid
Application Development, Strategy.com, Telepath, Telepath Intelligence, Telepath Intelligence (and Design), The E-Business
Intelligence Platform, The Foundation For Intelligent E-Business, The Integrated Business Intelligence Platform Built For The
Enterprise, The Intelligence Company, The Platform For Intelligent E-Business, The Power Of Intelligent eBusiness, The Power Of
Intelligent E-Business, and The Scalable Business Intelligence Platform Built For The Internet are all registered trademarks or
trademarks of MicroStrategy Incorporated.
All other products are trademarks of their respective holders. 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.
This product is patented. One or more of the following patents may apply to the product sold herein: U.S. Patent Nos. 6,154,766,
6,173,310, 6,260,050, 6,263,051, 6,269,393, 6,279,033, 6,501,832, 6,567,796, 6,587,547, 6,606,596, 6,658,093, 6,658,432,
6,662,195, 6,671,715, 6,691,100, 6,694,316, 6,697,808, 6,704,723, 6,707,889, 6,741,980, 6,765,997, 6,768,788, 6,772,137,
6,788,768, 6,792,086, 6,798,867, 6,801,910, 6,820,073, 6,829,334, 6,836,537, 6,850,603, 6,859,798, 6,873,693 and 6,885,734.
Other patent applications are pending.
Various MicroStrategy products contain the copyrighted technology of third parties. This product may contain one or more of the
following copyrighted technologies:
Graph Generation Engine Copyright © 1998-2004. Three D Graphics, Inc. All rights reserved.
Actuate® Formula One. Copyright © 1993-2004 Actuate Corporation. All rights reserved.
XML parser Copyright © 2003 Microsoft Corporation. All rights reserved.
Xalan XSLT processor. Copyright © 1999-2004. The Apache Software Foundation. All rights reserved.
Xerces XML parser. Copyright © 1999-2004. The Apache Software Foundation. All rights reserved.
FOP XSL formatting objects. Copyright © 2004. The Apache Software Foundation. All rights reserved.
Portions of Intelligence Server memory management Copyright 1991-2004 Compuware Corporation. All rights reserved.
International Components for Unicode
Copyright © 1999-2004 Compaq Computer Corporation
Copyright © 1999-2004 Hewlett-Packard Company
Copyright © 1999-2004 IBM Corporation
Copyright © 1999-2004 Hummingbird Communications Ltd.
Copyright © 1999-2004 Silicon Graphics, Inc.
Copyright © 1999-2004 Sun Microsystems, Inc.
Copyright © 1999-2004 The Open Group
All rights reserved.
Real Player and RealJukebox are included under license from Real Networks, Inc. Copyright © 1999-2004. All rights reserved.
CONTENTS
1. Introduction to Introduction.................................................................................. 1
Advanced Reporting
Basic MicroStrategy terminology ................................................... 2
Source systems ....................................................................... 2
ETL process............................................................................. 2
Data warehouse....................................................................... 3
Logical data model................................................................... 4
Physical warehouse schema ................................................... 4
Metadata database .................................................................. 5
Facts ........................................................................................ 6
Attributes.................................................................................. 7
Metrics ..................................................................................... 9
Reports .................................................................................. 10
Report Objects............................................................................. 10
Moving to advanced reporting ..................................................... 11
2. Reports Introduction................................................................................ 13
Before you begin.......................................................................... 14
Reporting Essentials review................................................... 14
The basic report........................................................................... 17
Filtering ........................................................................................ 19
What is a filter? ...................................................................... 19
What is a report limit? ............................................................ 20
The difference between report filters and report limits........... 22
What is a metric qualification? ............................................... 26
What is report as filter? .......................................................... 30
Understanding how a report is executed ..................................... 31
Data definition and view definition objects ............................. 32
Intelligent Cubes .................................................................... 33
View filters ................................................................................... 35
What is a view filter? .............................................................. 35
Derived metrics............................................................................ 38
What is a derived metric? ...................................................... 38
Dynamic aggregation................................................................... 40
What is dynamic aggregation?............................................... 40
View filter effects.......................................................................... 42
The effect of view filters on metrics........................................ 42
The effect of view filters on dynamic aggregation.................. 43
Metric qualification in the view filter ....................................... 46
View definition in the report execution cycle................................ 49
Exceptions to dynamic aggregation............................................. 50
Subtotals...................................................................................... 54
What are subtotals? ............................................................... 54
What are custom subtotals? .................................................. 60
What are user-defined subtotals? .......................................... 63
What are smart subtotals? ..................................................... 71
Shortcut metrics........................................................................... 73
What are shortcut metrics? .................................................... 73
Document description
Prerequisites
Before working with this document, you should be familiar
with
• SQL statements
Objectives
After reading this manual, you will be able to
• understand the difference between the view definition
and the data definition of a report, and know which report
execution steps belong to each
• build transformations
• create prompts
Typographical standards
Type Indicates
Courier • calculations
font • code samples
• registry keys
• path and file names
• URLs
• messages displayed in the screen
Actions
Code
Sum(revenue)/number of months.
Data entry
Keyboard keys
New terms
New terms to note are in regular italic font style. These terms
are defined when they are first encountered in the course
material. Following is an example:
The aggregation level is the level of calculation for the
metric.
Heading icons
Precedes a Case Study. Case Studies are real-life examples of
companies that are using MicroStrategy.
Precedes a Business Scenario. Business Scenarios are
examples from the MicroStrategy Tutorial. They explain how
to accomplish complex tasks using MicroStrategy.
Resources
Product documentation
MicroStrategy documentation includes a full set of product
manuals designed to help you find the information you need
to install, configure, design, and administer your Business
Intelligence and Narrowcast Server, as well as full SDK
documentation to help you extend MicroStrategy and
integrate it with your existing applications.
Installed documentation
IfAcrobat
bookmarks are not visible on the left side of an
document, click the Bookmarks and Page
from the View menu, then select the topic and section
you want to see. You can also scroll from the title page
of the guide to its table of contents, and select from
there the topic you want to read.
MicroStrategy Overview
• Introduction to MicroStrategy: Evaluation Guide
International support
MicroStrategy supports several locales. Support for a locale
typically includes native database and operating system
support, support for date formats, decimal formats, currency
symbols, etc. and availability of translated interfaces and
documentation. The level of support is defined in terms of the
components of a MicroStrategy Business Intelligence
environment. A MicroStrategy Business Intelligence
environment consists of the following components,
collectively known as a “configuration”:
• Web browser
User assistance
The following paragraphs describe the types of assistance
available to answer questions you may have regarding
MicroStrategy products.
Online help
MicroStrategy provides several modes of access to online
help:
Technical Support
If you have questions about a specific MicroStrategy product,
you should:
Aprobably
technical administrator in your organization can
help you resolve some of your issues
immediately.
The table on the following page shows where, when, and how
to contact MicroStrategy Technical Support. If you are unable
to reach MicroStrategy Technical Support by phone during
the hours of operation, you have the option to leave a
voicemail message or send electronic mail.
• e-mail address
• error message(s)
• name
• company
• street address
• phone number
• fax number
• e-mail address
• problem description:
Feedback
Please send any comments or suggestions about user
documentation for MicroStrategy products to:
Introduction
Before you start reading this guide, you should review the
concepts described in the Installation and Configuration
Guide. This introduction summarizes the steps for setting up
a project and explains the terms you should be familiar with
before moving on to advanced reporting features.
Source systems
Source system refers to any system or file that captures or
holds data of interest. This data is eventually analyzed in
report format to determine answers to business-related
questions.
ETL process
The extraction, transformation, and loading (ETL) process
represents all of the steps necessary to move data from
disparate source systems to an integrated data warehouse.
The ETL tool is provided by a third-party vendor.
Data warehouse
The Installation and Configuration Guide provides guidance
on setting up a robust data warehouse environment. Data
warehouses are generally based on some form of relational
database and can be queried with Structured Query Language
(SQL) to pull information from the warehouse into a report
format. The data stored in the data warehouse originates
from the source systems.
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.
Metadata database
Once you have a data warehouse populated with all the
information your business needs to succeed, how do you
retrieve the information from the database correctly and in
the least amount of time?
The three types of objects that are stored in the metadata are
• schema objects
• application objects
• configuration objects
Schema objects
Application objects
Configuration objects
Facts
A fact has two characteristics: it is numerical and
aggregatable. Examples of facts include revenue, inventory,
and account balances.
Attributes
Once you have determined all the facts necessary to complete
your business model, you identify the attributes for that
model. Attributes act as holders of information, allowing you
to add context to your facts in a report.
Attribute elements
Attribute relationships
• one-to-many
• many-to-many
One-to-one
Parent Person
Child SSN
One-to-many
Parent Year
Many-to-many
Parent Item
Child Color
Metrics
Metrics are analytical calculations performed against stored
data (facts) to produce results that can then either be read as
status material or analyzed for decision-making purposes. A
metric can be defined within a report to specify the data to be
Reports
Once you have created your project, set up attributes and
facts, and created a simple metric, you can run a report.
Report Objects
Report Objects are objects associated with a given report. At
any time, a user can choose to view only a particular set of
those objects. For example, you choose to show Metric1 and
Metric2 but not Metric3 on the template.
You can now create a report with more detail, using the
concepts described in this guide. You will learn how to
• create a transformation
Introduction
Designing reports
Report Details
Report description, including information on
the report filter and report limit
Report Objects
Objects retrieved from the data warehouse;
indicates the level of the report data set
View Filter
Allows you to create a view filter, a
qualification applied in memory to the report
data set
Report Filter
Allows you to create report filters, or sets of
criteria used to restrict the report data set
Object Browser
Contains all objects
in the project
Grid/View
Contains the layout of the report
Select Report Objects from the View menu and notice that
all the Report Objects are included in the grid. Recall that the
Report Objects pane lists all of the objects for which data is
retrieved from the database, as well as the derived metrics
created for this report.
Filtering
What is a filter?
A filter is used to select the data for calculating the metrics in
the report. It also restricts the attribute elements included in
the report. In our example, we use the Month filter, which
does not allow April, May, and December data to be included
in the metric calculations. For our purposes, these months
are not representative of the normal business cycle, so the
filter excludes them from calculations.
Ifsaved
you do not want to create it yourself, this report is
as Filter - Month Report Filter in the Tutorial.
Notice that the metrics have different values than in the Basic
Report. For example, Leanne Sawyer’s contribution to
revenue is $198,076. In the unfiltered report, her revenue
was $316,786. In the Basic Report, all data for all months was
retrieved from the data warehouse. The Revenue metric was
calculated using all months. In this filtered report, April,
May, and December amounts are not considered, so this
metric does not include them in its calculations.
The Report Editor allows you to set limits on any metric you
want to apply to the report. Report limits are defined using
operators such as between and less than. For more
information on operators, see Appendix E, Logical and
Mathematical Operators for Filtering.
Open the Basic Report again and note that the number of
rows is 34. Add a report limit to the Basic Report by
following the instructions that follow.
Sorting on rank
Notice that the highest rank is now 32 and there are only 32
rows on the report. The last two rows from the previous
report have disappeared because the revenue in each row was
less than the report limit. None of the metrics changed values
because a report limit does not affect how the metrics are
calculated; the limit is applied at the level of the report after
the metrics are calculated.
Both report filters and report limits can be used on the same
report because they are applied at different stages of the
execution cycle.
Notice that the report is much smaller than either the Sort by
Revenue Rank - Month Filter report or the Sort by Revenue
Rank - Limit - Revenue > 320K report. Only 15 rows are
returned, as opposed to 34 or 32. Also notice that the
Revenue, Cost, Profit, and Revenue Rank values are the same
as the filtered report. However, the Revenue Rank
(unfiltered) values are the same as the Revenue Rank - Limit.
Why is this?
If the output level is the same as the report level, the results
are usually the same as using a report limit. This is just a
coincidence, however, because report limits and metric
qualifications are calculated differently and at different times
in the report execution cycle.
If the output level differs from the report level, the metrics
are calculated at the output level. In the example that follows,
the report level is region and employee. In the previous
reports, the metrics were calculated for each employee using
all brands and all products. When a metric qualification with
an output level is applied to the report, the metrics are
calculated with only the data that meets the metric
qualification. Working through the sample report will help
you better understand metric qualifications and output
levels.
Whether or not the output level differs from the report level,
a metric qualification affects the report data set. On the other
hand, a report limit is applied after the metrics are calculated.
5 Select Brand under the Products folder and click > to add
it to the Selected objects list.
6 Click OK.
9 Click OK.
12 Click OK.
Inefficient
many cases, a report limit can generate more
SQL than a metric qualification. A metric
qualification is contained in a separate pass of SQL,
generating a temporary table at the output level. When
this table is joined to the rest of the output, it limits the
data included in the other metric calculations. Because
it is another table, a metric qualification is a separate
step in report execution. In contrast, a report limit is
contained in a HAVING or WHERE clause in one of
the final SQL passes. Therefore, using a report limit
reduces the number of SQL passes needed to execute
the report. However, since they often yield different
results, do not choose a report qualification or a limit
based solely on SQL efficiency.
Inaccess
Desktop, you select Add a Shortcut to a Report to
the report as filter functionality.
Step Description
1 The objects in Report Objects and the report filter are used to
calculate all the metrics, based on the data in the data
warehouse.
These four steps are the data definition section of the report
execution. The data definition establishes how the data is
accessed and manipulated in the data warehouse. Up to this
point, this chapter has discussed data definition and the
functionality that creates it.
Data Definition
Report Objects List of objects that make up the data definition; the
attributes define the level of detail of the report
Note: Derived metrics are listed in Report Objects but
are not part of the data definition.
View Definition
Intelligent Cubes
The Intelligent Cube takes advantage of the separation of the
data definition and the view definition. The cube is a shared
copy of the report data saved in memory and is used for
manipulation of the view definition. The division allows
multiple reports with different views to share a common data
definition. This division allows the Analytical Engine to
perform highly interactive analysis against a set of data
without accessing the data warehouse. In practical terms, you
can modify reports and navigate through the data without
leaving the executed report or waiting for an additional
execution against the data warehouse.
View filters
Advantages Disadvantages
– Bell
– Benner
– Conner
– Johnson
– Kelly
– Kieferson
6 Click OK.
Derived metrics
1 From the Insert menu, select New Metric. Notice that you
can only choose Report Objects or functions and
operators, that is, objects already on the report.
2 Double-click Revenue.
5 Click OK.
Dynamic aggregation
Open the Derived Metrics report and add the view filter
described in the View filter example.
Open the View Filter report. Drag Employee from the grid to
Report Objects. The results are:
# 1: Basic report
Now, add a metric qualification in the view filter. Set the view
filter to revenue less than $500,000. Remember to click
Apply to view the results, which are shown in the following
figure.
Step Description
1 The objects in Report Objects and the report filter are used to
calculate all the metrics, based on the data in the data
warehouse.
View Definition
The first three steps are the data definition, which are
interactions with the data warehouse. Steps 4 through 6 are
concerned with the view definition, and they take place in
memory.
ToFunction
create a count distinct metric, use the Insert
Wizard in the Metric Editor. This wizard
displays the parameters of a function, so you can easily
select Distinct. For more information, see the online
help about the Insert Function Wizard.
For those metrics that can be rolled up, you can specify which
function to use. On the Subtotals/Aggregation tab in the
Metric Editor, change the Dynamic Aggregation Function
from Default. For more information, see the Dynamic
aggregation section in Chapter 6, Metrics.
Subtotals
You can press F11 to toggle the grand total display for
reports in Desktop.
Character Description
5 All the metrics on the report are listed. You can select the
subtotal function to use for each. Total is correct for all of
our metrics.
8 Select the Total for the #P #0 check box. Notice the icon
for this custom subtotal is different from those of the
prebuilt subtotals.
14 Click OK.
• multiple functions
• nested functions
• dimensional subtotals
– Year
– Quarter
– Month
– Day
10 Click Save and Close. Name the new subtotal First (Date
Sort). You are returned to the Desktop.
Notice that the Total does not add all units received
throughout the year, but rather displays the amount of the
first shipment, regardless of what month the shipment
arrived. For example, you received 20 AM/FM Stereo
Receivers each month; the total is 20, the amount received in
January alone. No Digital Surround Sound Receivers were
received in January, but 20 were received in February, which
the subtotal reflects. Hitachi Hi8 Camcorders, in the last line
of the sample, were not received until March, so the total is
derived from the March shipment.
AsSubtotal
with the previous example, the focus is using the
Editor and user-defined subtotals, so a
detailed procedure is provided to create the subtotal.
The instructions to create the metric and report are
less comprehensive. For details, refer to the online
help.
– Click Advanced.
– Click OK.
– Click OK.
• Add all the profit values together. Add all the revenue
values together. Divide the two sums. This is a smart
metric.
Shortcut metrics
Advanced sorting
Sorting allows you to order the report data set to present your
business information in a more informative way. For
example, you can alphabetically sort country and region on a
report, allowing you to quickly find a particular region. The
Basic Reporting Guide discusses such quick sorting, which is
selecting a column or row to sort on.
Click Advanced Sorting under the Data menu. The rows are
sorted by ascending region and descending fourth quarter
2003 revenue. The columns are sorted by the quarter ID in
descending order. Return to the report and examine the
sorted data. Notice, that the columns are in reverse order,
fourth quarter 2003 to first quarter 2002. The customized
banding makes it easier to view the region separations in the
rows. Notice that the regions are in alphabetical order,
Central to Web. The rank metric helps you confirm that
within each region, employees are sorted based on fourth
quarter 2003 revenue. For example, the rank is 4, 3, 2, 1 in
the Central region for Q4 03. For Q3 03, the rank is 2, 3, 4, 1.
8 Click OK.
Formatting
You can change the general presentation formats and
formatting details of a report to suit your requirements and
preferences. The Formatting toolbar allows you to set various
formatting properties for row and column headers, as well as
for the actual report data. You also can set borders and
patterns. For more information on formatting basics, see the
Reporting Essentials chapter of the Basic Reporting Guide.
You can also set the formatting options for a report through
the grid view or design view using the Format Cells dialog
box. For details on how to access the Format Cells dialog box,
see the online help.
Font- Allows you to define the text font for the selected
section. You can select the font name, font style, size, color,
and effects.
Custom Formats
• negative numbers
• zero values
• text
Numeric Data
Symbol Description
# Digit placeholder.
• This digit placeholder displays only significant
digits and does not display insignificant zeros.
For example, the format code ##.## will display
the number 0025.630 as 25.63.
• 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 decimal
point.
The format #.00 will display the number 0.43 as
.43.
? Digit placeholder.
• This digit placeholder adds spaces for
insignificant zeros on either side of the decimal
point so that decimal points align when formatted
with a fixed-width font.
• You can also use ? for fractions that have
varying numbers of digits.
Symbol Description
Character/text data
Symbol Description
Symbol Description
@ Text placeholder.
Any text in the cell replaces the @ format symbol.
For example, if you want the headers of the
Revenue and Profit columns in a report to display as
"Revenue This Month", and "Profit This Month", type
the format code as @" This Month" and apply it
to the Revenue metric and Profit metric.
Symbol Description
m Month number.
Displays the month as digits without leading zeros,
such as 1. Can also represent minutes when used
with h or hh formats.
mm Month number.
Displays the month as digits with leading zeros, as
in 01. Can also represent minutes when used with
the h or hh formats.
d Day number.
Displays the day as digits with no leading zero, such
as 1.
dd Day number.
Displays the day as digits with leading zeros, as in
01.
Symbol Description
h Hour number.
Displays the hour as a number without leading
zeros, such as 1. If the format contains an AM or PM
format, the hour is based on a 12-hour clock;
otherwise, it is based on a 24-hour clock.
hh Hour number.
Displays the hour as a number with leading zeros,
as in 01. If the format contains an AM or PM format,
the hour is based on a 12-hour clock; otherwise, it is
based on a 24-hour clock.
m Minute number.
Displays the minute as a number without leading
zeros, such as 0. The m format must appear
immediately after the h or hh symbol; otherwise it is
interpreted as month.
mm Minute number.
Displays the minute as a number with leading zeros,
such as 00. The mm format must appear
immediately after the h or hh symbol; otherwise it is
interpreted as month.
s Second number.
Displays the second as a number without leading
zeros, such as 0.
ss Second number.
Displays the second as a number with leading
zeros, such as 00.
Symbol Description
Color
You can change the color of data in your report using custom
formatting. The following table lists the format for color
codes:
Symbol Description
Currency
ToNUMtypeLOCK
ANSI code for the currency symbol, turn on
and use the numeric keypad. As you type
the ANSI code, the Custom box appears blank. The
currency symbol is displayed only when you finish
typing the code.
0162 ¢
0163 £
0165 ¥
0128 Є
Conditional Symbols
Symbol Description
0, 10,000 10
mm dd yy 2/3/03 02 03 03
#.##% .08 8%
2.8 280%.
Formatting layers
Every report contains several different formatting layers,
allowing you to retain control of how a report looks when it is
pivoted or manipulated. You can ensure that the formatting
continues to highlight the information that needs attention.
There are two basic formatting layers—zones and grid units.
Examples of zones are the rows headers and metric values of
a report, while grid units are the values of a particular
attribute or metric. The other formatting layers, such as
thresholds and subtotals, can be thought of as extensions of
these two basic types.
Zone formatting
Row header
Column header Column values
Metric header
Subtotals
Row subtotal
header Row subtotal
value
Thresholds
Ifrather
you specify the location of the image as a directory
than a URL, you must confirm that you can
access the directory over the Web and the Desktop. If
not, the image will not be displayed because it will not
be available over the network. This problem of
network access can be avoided by referencing a URL.
If you specify the location of the threshold image as a
UNC format, you cannot view threshold images when
Order of layers
With the different types of formatting, it is important that the
interaction between them is clearly defined. How each of
them impacts the final report display and in what order is
crucial. Each succeeding layer overwrites the formatting of all
its preceding layers. This is graphically illustrated in the
following example.
Italicize the column values and change the other font settings
to default. Change the Revenue metric header to a white font.
Since the Format menu in the Report Editor is used for this
change, the new format applies to the current report only.
The formatting dialogs for each are shown below.
2 Axis formatting affects all the units of the axis. This zone
formatting is overwritten by grid unit formatting. The axis
formatting layers are located under the Rows and
Columns options on the Format menu.
Toreport
set a report border, right-click the report but not a
object. Select Formatting, then Report Borders.
Metric object - Axis headers, grid unit headers, all metrics headers,
headers report metric headers, column subtotal headers, row
subtotal headers
Metric object - Axis values, grid unit values, all metrics values,
values report metric values, banding, column subtotal
values, row subtotal values
Axis - headers Grid unit headers, all metrics headers, report metric
headers, column subtotal headers, row subtotal
headers
Axis - values Grid unit values, all metrics values, report metric
values, banding, column subtotal values, row
subtotal values
Grid unit - values All metrics values, report metric values, banding,
column subtotal values, row subtotal values
Autostyles
Autostyles provide predefined formatting styles, allowing you
to standardize formatting among reports. Each autostyle is a
collection of all the formatting layers, allowing you to format
the different report sections. However, not every layer must
be configured to create an autostyle. Default formatting
values are supplied by the guiprop.pds file. For more
information on defaults, see Appendix J, Formatting Default
Values. Each formatting layer contains all the formatting
properties:
• font
• alignment
• border
• pattern
Deployment
So far, this chapter focused on report design—that is, the
process of building reports from basic report components
using the Report Editor in MicroStrategy Desktop or Web.
You have learned how to design reports using the data
definition and view definition. The data definition establishes
how the data is accessed and manipulated in the data
warehouse. It includes the report filter, Report Objects, and
report limits. The view definition represents how the data is
presented and manipulated in the Intelligence Server.
Concepts such as the view template, formatting, thresholds,
view filters, derived metrics, subtotals, and sorting make up
the view definition.
Project progression
Before outlining the steps to set up a report creation
environment, let’s explore how a business intelligence project
can possibly develop in terms of the complexity of reports
and the experience of its users. The goal of project
development is to unburden the report designer and the
project administrator from participating in every report, by
empowering users to find answers to their business questions
independently. They are enabled to extract more meaning
from the data and to work independently, rather than just
view static report data.
The next step is the Web Analyst level, where robust report
customization is allowed. These options include pivoting,
Report Objects access, derived metric creation, and view filter
modification. The features available through these privileges
allow a user to customize a report to answer a business
question and then save the new report.
Desktop Designer
Deployed Functionality
Web Professional
Desktop Analyst
Web Analyst
Web Reporter
Time/Experience
Privileges
Predesigned reports
There are different ways to design reports for deployment to
the report creation environment. A single project can use any,
all, or none of these types of reports:
• static reports
• prompted reports
• Report Objects
A single report can use more than one of these types. For
example, a prompted report can have filter and template
shortcuts.
Static reports
Prompted reports
Report Objects
ToPreferences
view the Object Templates folder, select Desktop
from the Tools menu. Click Browsing
Options. Select Display Hidden Objects, and click
OK until you are returned to the Desktop. For more
information on object templates, see Object templates.
Filter Template
Data definition Data definition
• object reuse
• caching
• privileges
You can also use the Reports folder under Object Templates
to save reports that are frequently used to create new reports.
They are displayed when a MicroStrategy Desktop user
selects New, then Reports or a MicroStrategy Web user
clicks Create New Reports.
ToPreferences
view the Object Templates folder, select Desktop
from the Tools menu. Click Browsing
Options. Select Display Hidden Objects, and click
OK until you are returned to the Desktop. For more
information on object templates, see Object templates.
Reusing objects
Filters, of course, are not the only objects that can be reused.
Templates, metrics, custom groups, and consolidations are
among the objects that can be recycled.
When objects are used in multiple places, you can use the
Search for Dependents tool to discover which objects contain
them or other objects they contain. For example, you can
search for all templates that contain the metric Profit or all
metrics that are used by the template Store Sales.
Caching
• drill
• pivot
• page-by
• sort
• subtotals
• outline mode
• banding
• derived metrics
• view filter
• thresholds
• ranking
• The report view does not need to display all the report
objects available in the Intelligent Cube.
Shortcut to a filter
When you add a filter to a report, you can
Shortcut to a template
A template defines the layout of general categories of
information in a report. A template specifies the information
to retrieve from the data warehouse and how it is displayed in
the report grid. Information on the template includes metric
default values, banding options, join type setting, and data
sorting options. You can create a stand-alone template in the
Template Editor. Create a report-specific template using the
Report Editor.
Totemplate
choose from these options, right-click on a
in the Object Browser.
6 Click OK.
Now change the view definition of the report, which does not
change either of the shortcuts. Move Year from the grid to
Report Objects. Add a threshold of revenue greater than $1
million. Format the cell with bold font and 25% grey fill. The
report is redisplayed as the following.
The tool helps prevent the view definition from breaking the
report because the view is asking for an object that is no
longer in the data definition since it was removed from the
underlying template. By alerting you to a potential problem,
you can resolve the issue before any reports are affected. For
example, a report has a shortcut to a template, which
contains Country, Region, Metric 1, and Metric 2. The view
filter is set to “Metric 1 > 20.” This is illustrated in the
following diagram.
Report with
shortcuts to filter and template
View definition
Grid layout/formatting
View filter:
Metric 1 > 20
Data definition
Report Objects:
Country
Region
Metric 1
Metric 2
Report filter
Filter Template
Data definition Data definition
Country
Region
Metric 1
Metric 2
For the previous example, you could remove the view filter
from the view definition of the dependent report.
The changes to the template are not saved until the Template
Dependency Validator is closed. For more information on
using this tool, see the online help.
Object templates
An object template allows you to use a predefined structure
to begin creating a new object. For example, you may want to
create many filters that contain the current month as part of
the definition. Having a filter object template that contains
the current month allows you to skip the step of defining that
part of the filter each time you create a filter. In other words,
you only have to define that filtering condition once. When
you use the filter object template, you automatically have the
current month condition in every new filter you create.
• consolidations
• custom groups
• filters
• metrics
• reports
• templates
Ifpropagated
an object template is altered, the change is not
to previously defined objects.
– formatting properties
– VLDB properties
– formula join type
– export options
– filters
– formatting
– grid options
– VLDB properties
You can also set a project default for the empty object
templates. This means that if a user chooses Do not show
this window again in the New Grid or New Metric dialog
box, the default object template is used. This setting is found
in project configuration.
Evaluation order
The order in which data is calculated affects the report data
set. By using evaluation order settings, you can control the
order in which compound smart metrics, consolidations,
derived metrics, report limits, and subtotals are calculated
and resolved for a given report.
3 report limits
4 subtotals
• consolidations
• derived metrics
• metric limits
• subtotals
Asmart
compound metric that has not been identified as
cannot be part of a specified evaluation order; it
is always calculated first, as discussed in Default
evaluation order.
Subtotals View
Notice that both the Sales Rank metric and the report
limit are calculated in the data set. The view does not
differ from the data set, so nothing can be calculated in
the view.
To resolve the conflict, you can set Sales Rank back to the
default evaluation order, add the derived metric, and then set
Sales Rank to be evaluated first in the data set. The report
then looks like the following:
Notice that the values for neither Revenue nor Sales Rank
have changed from the initial report. If you display the report
after adding the derived metric but before moving the Sales
Rank calculation to the data set, Sales Rank is calculated
based only on the four rows displayed. That is, Southeast is
ranked one, Northeast two, and so on.
You want to compare the revenues for the Years 2002 and
2003 by Category and Subcategory. First, create a
consolidation called Years to calculate the difference. The
consolidation elements are defined below.
The totals for the Revenue column are also correct. However,
the totals for the Percentage Difference column are wrong:
Total
For instructions, see To change evaluation order. Set
to 1 and Years to 2.
Autostyles
Metric Formatting
Graph Font
Bulk export
The bulk export feature allows you to select a report and
export it to a delimited text file. Using this feature, you can
retrieve result sets from large datasets without having to load
the datasets in memory. As the result sets are brought back
incrementally, no limit is set on the size of the dataset to be
retrieved.
• A report that uses the bulk export feature has the same
restrictions as a data mart report.
Introduction
SQL support
With the Freeform SQL reporting feature, you can use both
single-pass and multi-pass SQL queries to generate reports.
Make sure that you use derived table or common table
expression syntax.
Multi-pass SQL
Derived table
with pa1 as
(select a11.[A1] AS A1,
a11.[B1] AS B1
from [T1] a11
where a11.[M1] > 0)
select a11.[A1] AS A1,
a11.[B1] AS B1,
a12.[B2] AS B2,
a11.[M1] AS M1
from [T1] a11,
pa1,
[T2] a12
where a11.[A1] = pa1.[A1] and
a11.[B1] = pa1.[B1] and
a11.[B1] = a12.[B1]
• formatting
• exporting
• thresholds
• graphing
• object security
• OLAP services
• prioritization
• scheduling
• subtotals
• custom group
• consolidation
• transformation
• filter
• save as template/filter
• report as filter
• data marting
R eport Services
D ocum ent
A1 A1 A1
F re e fo rm S Q L R e p o rt F re e f o rm S Q L
R e p o rt R e p o rt
O ra c le DB2 S Q L S e rv e r
D atabase W are h o u s e D atabase
IfProduct,
each of the three reports originally has a prompt on
then the prompt will only be displayed one
time; you only need to answer the prompt one time,
instead of three times.
Reporting features
This section discusses the following MicroStrategy reporting
features in relation to Freeform SQL reports:
• filters
• prompts
• drilling
Filters
A filter specifies the conditions that the data must meet to be
included in the report results. For information on Filters in
general, please refer to Chapter 5, Filters, in this guide.
where Year_ID=[Year_prompt]
Prompts
A prompt is a MicroStrategy object that allows user
interaction at report run time. For general information on
prompts, please refer to Chapter 9, Prompts, in this guide.
Once you exit the Prompt Wizard or the Open dialog box, the
prompt is inserted automatically into the SQL statement at
the current cursor position. If an area in the SQL statement is
highlighted, it is replaced by the prompt name. Prompt
objects appear in the SQL statement in pink and are enclosed
in brackets ([ ] ) if the name of the prompt contains any
space, for example, where Year_ID = Year_prompt and
where Year_ID = [Year prompt].
If you use other operators such as =, >, <, or =/, you do not
need to add any parentheses around the prompt name, as you
do when you use In. However, you can only select a single
answer to the prompt. Therefore, make sure that the
maximum number of answers allowed for the prompt is set to
“1”. See the example below.
Value prompts
You do not need to add the quotes around the prompt name if
the answer is part of the SQL command. This feature actually
allows you to select objects from multiple few text files that
you can use in the SQL statement. See the example below.
Optional prompts
If8.0,youmake
use an older version of MicroStrategy prior to
sure that you run the project update for the
metadata; otherwise, the optional prompt
functionality will not be applied to Freeform SQL
reports.
Drilling
Drilling allows you to look at specific data at levels other than
what is originally displayed on the grid or graph. For regular
reports, you can drill in different directions, such as down,
up, or across attributes, based on the system-generated drill
maps or custom drill maps. For Freeform SQL reports,
support for drilling is limited to only attributes within the
Intelligent Cube (see Chapter 2, Reports, of this guide).
IfBrowser,
you move Year off the report and into the Object
you cannot drill up from Quarter to Year on
the report.
User Children
Public/Guest View
In(attributes,
addition, whoever creates the new objects
metrics) has the Full Control permission.
Security filters
A security filter is a filter object that is used to narrow down
the result set that users or groups obtain when they execute
reports or browse elements. Usually assigned by
Administrators, security filters control, at the MicroStrategy
level, what warehouse data users can see.
If8.0,youmake
use an older version of MicroStrategy prior to
sure that you run the project update for the
metadata; otherwise, the security filter functionality
will not be applied to Freeform SQL reports.
Customer ID Table1.Cust_ID
– Ignore: Customer
– Select this option only when you are sure that your
SQL statement does not retrieve data outside the
restriction defined by the security filters. This means
that you may need to check the security filters for
individual users one by one and see how each one may
interact with the SQL statement.
You can edit the security filter after it is inserted into the SQL
statement by double- clicking it or right-clicking it and
selecting Edit.
Managed objects
A managed object is just like a normal object except that it is
managed by the system and is stored in a special system
folder. When you create a Freeform SQL report, you can use
existing attributes (including project attributes) to map the
columns in the SQL statement in the Freeform SQL Editor.
Alternatively, you can create new attributes, attribute forms,
and metrics on the fly to which to map the columns in the
SQL statement; these new objects are managed objects.
– Edit
– Rename
– Delete
– Rename
– Edit
O b je ct B ro w s e r
Once the managed objects are listed in the Search for Objects
result (see the following illustration), you can delete, rename,
or edit any one of them by right-clicking its name.
In the Search for Objects dialog box, you have the option to
edit a managed object (attribute or metric) when you
right-click its name. The Attribute Editor or Metric Editor is
displayed where you can make the modification. In addition,
you can also edit any managed attribute or metric directly
from the Report Objects window of the Report Editor by
taking the following steps:
• from a database
Ifmetadata,
there is no database instance defined in the
the Freeform SQL Editor cannot be
loaded. Instead, the following message is
displayed:
You must save the report first before you can run it.
12 Run the report.
– Make sure that all the columns with data have proper
headers: no space in the header name (for example,
Category_ID, not Category ID) and are alphanumeric,
starting with alphabets (for example, M2004Q1, not
2004Q1M).
– Make sure that all cells for the ID column have value in
them (not empty).
– Highlight the rows and columns with the data that you
want to create a report with, including the column
headers, such as Category_ID and Category_DESC.
2 Select the System DSN tab, and then click Add. The
Create New Data Source dialog box is displayed.
6 Under Database Name, select the Excel file that you saved
and named in Step 1, Prepare the Excel file.
You can then use the MicroStrategy ODBC Test Tool to test if
data can be retrieved from the table(s) you created from the
Excel file.
Make sure to select the correct DSN for the Excel file
for the test.
– Do not use the Excel file name as the table name for
the “From” clause. Use the table name instead.
Remember that the Excel file is the data source that
contains the “tables”.
You must save the report before you can run it.
Otherwise, you will see a Desktop message saying
that the report “cannot be executed unless it is
saved.”
4 Save the text file in a folder, which will be used as the data
source for MicroStrategy reports.
2 Select the System DSN tab and then click Add. The
Create New Data Source dialog box is displayed.
Ifneedyoutodoinstall
not have this driver on your machine, you
it.
9 Select the text file you want to define and click Open. The
Define Table dialog box is displayed.
16 Click OK. Your data source for the text file is now set up.
Make sure to select the correct DSN for the text file.
Create a Freeform SQL report from a text file
You must save the report before you can run it.
Otherwise, you will see a Desktop message saying
that the report “cannot be executed unless it is
saved”.
Execute sp_customer_profit
• Customer ID
• Customer DESC
• Customer City ID
• Profit
Below are the general steps you need to take when you use a
stored procedure to create a Freeform SQL report.
DB2 call stored_procedure_name with The stored procedure must have been created
DB2 ODBC drive indicating that it has a result set. The results will be
sent back to the client.
Oracle call stored_procedure_name( ) with The stored procedure must return the results into a
MicroStrategy ODBC driver table that can subsequently be selected.
SQL exec stored_procedure_name with The stored procedure returns the data to the client.
Server SQL Server ODBC drive No particular precaution is needed
You must save the report before you can run it.
Otherwise, you will see a Desktop message
indicating that the report “cannot be executed
unless it is saved”.
Introduction
• 820925—MDX Restrictions.
• five styles of BI
• transaction-level analysis
Enterprise ETL
Project 1 Project 2
Reports Reports
Project Project
Schema Schema
Tables Tables
DB 2 Oracle
DB Instance DB Instance
Report Services
Document
Project
Local Tables
Schema
DB Instance
Tables OLAP
Cube
warehouse.
SA P BW ODBO MicroStrategy
• MicroStrategy: (catalog)
• ODBO: schema
• ODBO: cube
• MicroStrategy: cube
• MicroStrategy: dimension
• MicroStrategy: hierarchy
• ODBO: level
• ODBO: member
Indirectly
SAP BW, forms are sometimes referred to
as attributes. SAP BW also supports
navigational attributes. These attributes are
presented as distinct dimensions when working in
MicroStrategy.
SAP BW variables
Variables are used in SAP BW to parameterize queries. There
are several types of variables, including characteristic values,
hierarchies, hierarchy nodes, texts and formula elements.
When the query is being executed, these variables are filled
with values. For detailed information on variables, please
refer to documentation by SAP.
In addition, using the right-mouse click you can also Edit the
prompt in the Prompt Generation Wizard, Rename the
prompt, or Map the variable to a prompt in an existing
MicroStrategy project.
Characteristic Value Element list prompt or attribute See the note below for more information.
variable qualification prompt
Hierarchy Node variable Hierarchy element list prompt Both single and multiple selection are
supported.
If you use any SAP BW key date variables in your query, you
need to manually set the variable’s property in the OLAP
Cube Catalog, so it is distinguished from a simple
characteristic variable on date:
2 On the Variable tab, select the Set Key Date check box.
And then click OK.
SAP BW structures
Structures in an SAP BW query cube define the two axes of a
query (rows and columns) and are of two types: key figure
structures and characteristic structures.
Intheaelements
MicroStrategy report, you cannot drill down into
of characteristic structures.
This section discusses how you can use the OLAP Cube
Catalog to bring the SAP data into a MicroStrategy project
and what functions you can perform once the data is brought
in. For step-by-step instructions on how to use the OLAP
Cube Catalog, please refer to the online help (search for
“Using the OLAP Cube Catalog”).
Importing cubes
SAP BW cubes can only be imported into a MicroStrategy
project by an Architect with the Import OLAP Cubes
privilege.
Select Find from the Edit menu or click the Find icon on the
toolbar to open the Find dialog box to search for a specific
cube that you want to use for your report.
You can import InfoCubes and query cubes by using the >
arrow to move the selected cubes from the Available Cubes
pane to the Selected Cubes pane. For step-by-step
instructions, please refer to the MicroStrategy online help
(search for “Using the OLAP Cube Catalog”).
If you change your mind about the selected cubes, you can
right-click any InfoCube or query cube in the Selected Cubes
pane, and select Remove [cube name]. Using the
right-mouse click, you can also select the Update Structure
option to synchronize with the updated definition of cube
structures in SAP BW, for example, when a new characteristic
or key figure has been added to the InfoCube in SAP BW.
You can click the Find button at the bottom of this dialog box
to open the Find dialog box, where you can search for a
specific cube for your report by the cube’s name. For details,
please refer to the online help topic “Finding cubes”.
Mapping cubes
When an OLAP cube is imported into MicroStrategy, the
Intelligence Server creates new objects (attributes, metrics,
and hierarchies) that reflect the levels of the imported cube
(see the following illustration). Using the Cube Mapping
feature in the OLAP Cube Catalog, you can map attribute
forms for each attribute contained in the imported cube (by
default, only the ID and DESC forms have been automatically
mapped). In addition, you can remap the attributes and
metrics to existing objects in a MicroStrategy project. This
capability allows data to be joined across sources in Report
Services documents, thus maintaining a consistent logical
model.
In the Physical View pane, you can use the plus (+) sign next
to the attribute levels to display the attribute forms. By
default, only the ID and DESC forms are displayed. Use the
Display All properties icon on the toolbar to show
additional attribute forms and then do the mapping for each
one of them. For each attribute, the ID form must be mapped
at least. You can also use the Show Technical Names icon
on the toolbar to display the SAP BW terms for each attribute
and its attribute forms.
C u b e A ttr ib u te s P r o je c t A ttr ib u te s
C u s to m e r R e g io n Ye a r
R e g io n C u b e Ye a r
Q u a r te r M onth of
C u s to m e r C u b e Q u a r te r Ye a r
C a ll C e n te r
S ta te
M onth
C ube M o nth
C u s to m e r
C ity E m p lo ye e Da y
R e gio n Ye a r
C usto m e r
R e gio n Ye a r
Q ua rte r M o nt h o f
Ye a r
C usto m e r Q ua rte r C a ll C e nte r
S ta te
M o nt h
M o nt h
C usto m e r Em plo ye e
C ity Da y
Reporting features
This section discusses the following reporting features:
• filters
• prompts
• drilling
Filters
For OLAP cube reports using the SAP BW data, most of the
filtering features remain the same as those for standard
MicroStrategy reports. For information on filters in general,
please refer to Chapter 2, Filters, in this guide and the online
help.
• tab-delimited
• return-delimited
Prompts
As discussed in the SAP BW variables section, MicroStrategy
turns the variables to prompts when SAP BW cubes are
imported into a project. In addition to these inherited
prompts, you can create standard prompts in the same way as
you do in standard MicroStrategy reports.
There are two ways you can use to create a standard prompt
in an OLAP Cube report:
Drilling
For OLAP cube reports, standard drilling is supported within
the cube. This means that you can drill up or down within the
dimension that the attribute belongs to as well as in other
directions to dimensions included in the same cube. Drill
paths are automatically generated based on the definition of
the cube.
Related features
This section discusses the following MicroStrategy features in
relation to OLAP cube reports:
• managed objects
• authentication
Managed objects
When an OLAP cube is imported into a project, managed
objects (attributes, metrics, columns, tables, and so on) are
created to describe that cube. A managed object is just like a
normal object except that it is managed by the system and is
stored in a special system folder that is invisible to users.
However, one way to access managed objects is by using the
Search for Objects function from the Tools menu on Desktop.
Authentication
Most of the features of authentication that apply to standard
MicroStrategy reports also apply to OLAP cube reports,
described as follows:
• Standard authentication, LDAP authentication, NT
Authentication: are supported independent of the data
source that is being used, for example, relational
databases, OLAP cube providers.
• Connection mapping: is supported in the same way as
for standard MicroStrategy reports. In addition, specific
connection maps may be designated for each database
instance, user/group combination.
Torecommended
enforce SAP BW security in MicroStrategy, it is
that you use connection mapping or
pass-through authentication.
Windows
– Librfc32.dll
– Sapjcorfc.dll
UNIX
Take the following steps to connect to SAP BW servers in
Unix:
2 Select the zip file for the platform you want to use and
unzip it, for example, gunzip or gzip [file name].
3 Search for the files listed in the following table, copy them
onto your machine, and create a new directory for them.
For example,
AIX SUN
librfccm.o librfccm.so
libsapjcorfc.so libsapjcorfc.so
sapjco.jar sapjco.jar
#
# set up the environment for SAP
#
XXXX_SAP_LIBRARY_PATH='/home/dsmith/SAP/
AIX/'
if [ -n "${XXXX_SAP_LIBRARY_PATH}" ];
then xxxx_append_path
LD_LIBRARY_PATH
"${XXXX_SAP_LIBRARY_PATH:?}"
export LD_LIBRARY_PATH
fi
#
# set up the environment for SAP
#
XXXX_SAP_LIBRARY_PATH='/home/dsmith/SAP/
SUN/'
if [ -n "${XXXX_SAP_LIBRARY_PATH}" ];
then xxxx_append_path LIBPATH
"${XXXX_SAP_LIBRARY_PATH:?}"
export LIBPATH
fi
ToDesktop
create an OLAP cube report, you need to be a
Designer with the “Define OLAP cube report”
privilege.
Introduction
You are interested in reviewing the sales for only those stores
that have at least one category with a margin greater than
20% and total sales of more than $100,000 for the year. This
is a more complicated question, but it can also be answered
using a filter.
Types of filters
In the reporting environment, when you design a report, it
queries the database against all the data stored in the data
warehouse. By applying a filter, you can narrow the data to
consider only the information that is relevant to answer your
business question. The previous chapter, Reports, discussed
the following three ways to restrict data to generate reports:
• A report filter that is a criterion used to select the data to
calculate the metrics in the report.
– a relationship filter
You can also create filters that prompt you for answers when
you run the report. These prompted filters allow the report to
have dynamic report definitions, which can change with each
query by altering the information in the prompt dialog box.
All of these options are available in the Filter Editor, and are
discussed in detail in this chapter.
Attribute qualification
Attribute qualifiers enable you to specify conditions that
attribute elements must satisfy to be included in the filter
definition. For example, you can create a qualification on the
attribute Month so that the result set returns only months
beginning with the letter “J.”
Ifsaved
you do not want to create it yourself, this report is
as Filter - Month Filter in the Tutorial.
Notice that the metrics have different values than in the Basic
Report. Sawyer’s contribution to revenue is now $198,976. In
the Basic Report, all data for all months was retrieved from
the data warehouse. The Revenue metric was calculated using
all months. In this filtered report, April, May, and December
amounts are not retrieved from the data warehouse, so the
metric cannot include them in its calculations.
Open the Basic Report. Now switch to Design View and add
this filter. When you re-execute the report, it looks like the
following.
Dynamic dates
When you qualify on a date attribute form with the date data
type, you can select dynamic dates, which are fixed offsets of
the current date. They can be either a fixed set of dates or
different date ranges that change through time. For example,
a dynamic date can be used in a report that examines sales in
the previous two months. This would be represented as
"today" with an offset of two months. You can express
Dynamic date qualifications in several ways, as shown in the
following examples:
• an offset of four years, three months, two weeks, and one
day from today
Imported filter
You can import filter elements into the Filter Editor from
sources other than MicroStrategy, if you choose the attribute
qualifying operator as In list or Not in list. To import
elements into a filter, the elements should be stored in an
Excel file or a text file.
1 If the data in a cell has double quotes in the first and last
position, it is imported as it is, with the quotes.
2 If the data in a cell has single quotes in the first and last
position, it is imported as is, with the quotes.
• Tab-delimited
• Return-delimited
Attribute-to-attribute qualification
Attribute-to-attribute qualifications allow you to create
reports that compare two attributes through attribute forms.
For example, using attribute-to-attribute qualifications, by
comparing order date with ship date, you can create a report
that displays the orders that were shipped within a week of
their order date.
3 Find the attribute Ship Date in the Object Browser (in the
Customer hierarchy) and drag it to Attribute in the
Attribute Qualification dialog box.
(Day@ID + 27)
7 Click OK.
Set qualification
A set qualification allows you to create a set based on either a
metric qualification or a relationship qualification.
Output level
Break by
Actual ($K)
Region Market Store
Sales
Metric-to-metric comparison
Note that only those revenues whose values are greater than
the revenues of the previous quarter are displayed on the
report.
Shortcut to a report
AReport
shortcut to a report qualification is also known as
as filter. In the Desktop, you select Add a
Shortcut to a Report to access the report as filter
functionality.
Shortcut to a filter
Creating a shortcut to a filter allows you to use an existing
filter, or add conditions to that filter, to apply to a report. In
generic terms, Filter1 contains two conditions, A and B. You
can use Filter1 in another filter and add another condition, C,
to it. The data must then satisfy all three conditions - A, B,
and C - to be included.
Ifselect
a relationship is left empty, the schema is used to
the appropriate table.
ItBrowser
is easiest to simply drag an attribute from the Object
into the list. If you manually enter the
attribute, it must be in the format
[attributename]@ID or
[attributename]@DESC.
For example, if you are creating a report that shows all stores
selling Nike shoes in the DC area, the relationship filter
syntax looks like this:
<[Fact Sales]; [Nike Shoes, Region]>
{Stores@ID}
where Fact Sales is the table name, Nike Shoes and Region
form the filter qualification, and Stores is the attribute.
• ApplySimple—Single-value function
• ApplyAgg—Group-value function
• ApplyOLAP—OLAP function
• ApplyComparison—Comparison function
• ApplyLogical—Logical function
Before creating a joint element list, you must ensure that the
Advanced Qualification option is displayed on the Filter
Editor. From the Desktop, complete the following steps:
5 Click the Add icon to the right of the Element list. The
first value in each attribute is added to the list.
6 Click the Modify icon to the right of the Element list. The
Select Element List dialog box opens.
11 Click the Add icon to add another element. Again, the first
value in each attribute is added by default.
Introduction
Metric types
Metrics are report components that enable analytical
calculations against the warehouse data. Metrics can be
categorized as one of the following types, based on their
formula:
Simple metrics
A simple metric does not restrict you to simple calculations;
the term simple only refers to its structure. In its structure, a
simple metric:
Sum(Revenue - Cost){~+}
Nested metrics
A nested metric provides a convenient way to use metric
functionality when fact tables in the warehouse do not
include attribute data at the level desired for specific analysis
purposes. By using the result of a metric calculation as a
temporary fact table from which to calculate another metric,
you can obtain and analyze data not immediately available.
For example, if you need time data aggregated at the month
level, but existing fact tables provide only day-level
information, you can use nested aggregation to obtain the
results you are looking for.
Compound metrics
Compound metrics are made by combining one or more other
metrics using one or more mathematical operators. The other
metrics may be simple, nested, or other compound metrics.
The most important distinction is that compound metrics
cannot have a level placed on the entire metric, although the
level can be set separately on each of the components. That is,
the Revenue Metric is a simple metric defined as:
Sum(Revenue){~+}
Rank([Revenue Metric])
Derived metrics
Derived metrics are discussed in detail in the section
Creating metrics in the Report Editor.
Avg(Sum(Revenue) {Month+}){Year+}
Inner Outer
aggregation aggregation
function function
Fact Intermediate Final
Table Table Result
Formula
This is the essential part of the metric definition. The
formula of a simple metric is a mathematical expression
consisting of group functions, such as sum, average,
minimum, maximum, and so on. It also includes the data to
be used in the calculations. This can include facts, attributes,
constants, and other metrics. The formula can also contain a
non-group function or arithmetic operator, in addition to the
required group function.
Base formulas
Level
The level of a metric, also referred to as dimensionality,
allows you to determine the attribute level at which the
metric is calculated. In addition, you can specify the grouping
and filtering involved in a metric.
• target
• grouping
• filtering
Target
Grouping
None
level.
is not an option if the target is set to the report
Sum(Revenue){Quarter}
Notice that the sales are calculated for each quarter, because
the metric is grouping at the quarter level, as shown in the
SQL:
max(a12.[QUARTER_DESC]) AS QUARTER_DESC,
sum(a11.[TOT_DOLLAR_SALES]) as REVENUE
[LU_QUARTER] a12
group by a11.[QUARTER_ID]
sum(a11.[TOT_DOLLAR_SALES]) as REVENUE
a11.[MONTH_DESC] AS MONTH_DESC,
pa1.[REVENUE] as REVENUE
[LU_MONTH] a11
sum(a11.[TOT_DOLLAR_SALES]) as REVENUE
[LU_QUARTER] a12
group by a12.[YEAR_ID]
A total year sales fact table exists in the project, which would
be more efficient. Instead of adding all the quarters together,
the yearly total could have been pulled directly from that
table. However, having quarter in the level of the metric
forces the report to use the quarter sales table.
select sum(a11.[TOT_DOLLAR_SALES]) as
REVENUE
pa1.[REVENUE] as REVENUE
[LU_MONTH] a11
Filtering
The same report is run, but this time with a metric that has
level filtering set to ignore. Again the metric value is the same
for the whole report, but now it is the grand total of all sales
in the project. Since month is related to quarter, the filter is
also ignored.
The best way to explain the Add attributes in the filter to the
level setting is with an example. The following reports all
contain first quarter revenue for books sold in California
stores, but depending on the Add attributes setting, that
revenue amount changes.
– Category = Books
Inchanged
the previous examples, the metric level has not
from the default of report level, so it does not
really affect the Add attributes setting. The next
example adds a metric level.
Example 1: Using level metrics
Report requirements
Solution 1
sum(a11.[ORDER_AMT])as REGIONALSALES
[LU_CALL_CTR] a13
group by a13.[REGION_ID]
Solution 2
sum(a11.[ORDER_AMT]) as REGIONALSALES
[LU_CALL_CTR] a13
and ((a13.[REGION_ID])
in (select s21.[REGION_ID]
group by a13.[REGION_ID]
Solution 3
In this case, the engine ignores the report filter and the report
displays the Regional Sales as the sum of revenues of all the
call centers in that region.
sum(a11.[ORDER_AMT])as REGIONALSALES
group by a13.[REGION_ID]
IfYear,
the report filter contains attribute elements such as
these attributes are not ignored because they are
not directly related to the target attribute Region.
Example 2: Using level metrics
Report requirements
3 How did the sales of each of the three call centers compare
to the sales of the entire company?
Solution 1
select sum(a11.[ORDER_AMT])as
REGIONALSALES
and a12.[CALL_CTR_ID]in(5,11,12)
Solution 2
[LU_CALL_CTR]a13
in (select s21.[REGION_ID]
Solution 3
select sum(a11.[TOT_DOLLAR_SALES])as
REGIONALSALES
Solution 4
sum((a11.[QTY_SOLD]*
a11.[UNIT_PRICE]-a11.[DISCOUNT]))) as
REGIONALDOLL
[LU_EMPLOYEE]a13
group by a12.[REGION_ID]
sum((a11.[QTY_SOLD]*
(a11.[UNIT_PRICE]-a11.[DISCOUNT]))) as
REGIONALDOLL
where a11.[EMP_ID]=a12.[EMP_ID]
and a11.[CALL_CTR_ID]=a12.[CALL_CTR_ID]
group by a12.[REGION_ID]
Example 3: Removing report level
Report requirement
Solution
Condition
Metric conditionality applies a filter to the metric calculation.
You can think of conditionality as attaching a filter to each
metric. For example, a report shows revenue by region and
uses the revenue metric. Revenue for all years is included on
the report. If you associate a 2003 filter to the revenue metric
and re-execute the report, the report displays data for 2003
only.
Sum(Revenue) {~}
Consider
Revenue
Revenue as a metric for calculating January
For example, the metric filter is set to New York only and the
report filter to all western regions. The metric filter
overwrites the report filter, so only New York is included in
the report. If the check box is cleared, the results are the
intersection of the filters. In this case, New York and West
exclude each other, so the combined filter is empty.
Byignore
default, this option is selected since metric filters
report conditionality by default.
Transformation
Transformations are generally used for time-series analysis,
for example, to compare values at different times such as this
year versus last year, or month-to-date. For more
information on transformations, see Chapter 17,
Transformations.
Aggregation
function A
Aggregation Final
function B Result
Fact Intermediate
Table Table B
Note that this compound metric does not contain any levels;
all of the level information is included in the separate metrics.
Smart metrics
The smart metric property of a compound metric allows you
to change the default evaluation order of the metric. For
example, the following report contains information about
sales. If you display totals without allowing smart metrics, the
totals are incorrect.
To toggle smart metrics on and off, use the check box at the
bottom of the Subtotals/Aggregation tab in the Metric Editor.
Contribution to Contribution to
Month Items Sold
Month Quarter
Contribution to
Month Items Sold
Quarter
January 30 30%
February 50 50%
March 20 20%
Evaluation order
The order in which data is calculated has a bearing on the
results to be displayed. By using evaluation order settings,
you can control the order in which consolidations, smart
metrics, report limits, and subtotals are calculated and
resolved for a given report. It is important to think about
evaluation order when creating compound metrics. For more
information on evaluation order, see Chapter 2, Reports.
Subtotals
In the context of metrics, subtotals permit computation and
display of quantified data, gathered by MicroStrategy, along
attribute groupings that you can specify dynamically for a
report. The behavior of subtotal aggregations is based on the
types of data included in the metric to which the subtotal is
applied.
Dynamic aggregation
Dynamic aggregation by the Analytical Engine occurs when
objects are moved between the grid and the Report Objects in
the Report Editor. The metric values roll up to the new level
of the grid. Dynamic aggregation happens on the fly, in
memory. For an example of dynamic aggregation, see the
Dynamic aggregation section in Chapter 2, Reports.
Join specification
Setting a join specification allows you to place conditions on
the data selected for display in a report. You can apply an
inner or outer join, which are described in more detail below.
In short, an inner join includes only the data common to all
the elements in the join, whether tables or metrics. An outer
join includes all of the data in all of the elements. You can set
joins at the metric and report levels:
Setting the metric join type at the report level (that is, using
the Report Data Options menu option in the Report Editor)
affects only the results for the report being modified. To set
the join type globally, specify it at the metric level, using the
Metric Join Type option on the Tools menu of the Metric
Editor. A metric join type that is set globally affects the
results for all reports using that metric.
For compound metrics, you can also set the join type at the
formula level. This controls how the expressions or metrics
within the compound metric are joined.
North Yes No
West No Yes
North 100
South 200 500
West 300
Finally, you can specify different joins for each of the metrics
on a report. If the Sales metric is defined with an outer join
and the Budget metric with an inner join, only those rows
with information in sales are displayed. The following report
is created.
North 100
Template
Metric Project
Database Instance
• Null Check
• Zero Check
This property sets the type of join used in the metric. The
options are
Null Check
Zero Check
1 1 100 600
1 2 200 600
1 3 100 600
1 4 200 600
Formatting metrics
You can format metrics to control how they are displayed on
reports, that is, to specify the format for a particular metric,
regardless of the report the metric is on. This formatting,
which can be applied to headers and data values, is
performed in the Metric Editor or through a find and replace
operation. Metric level formatting is overwritten by axis and
all metrics formatting, which occurs on the report level.
Those formatting layers must be set to default to allow the
metric level formatting to display. For more information on
formatting layers, see Formatting in Chapter 2, Reports.
• symbols
• colors
Number
Format Code Positive Negative Decimal
Category
General General 3 -3 .3
Number 0 3 -3 0
#,##0 3 -3 0
#,##0;(#,##0) 3 (3) 0
#??/?? 3 -3 3/10
Symbol Function
Symbol Function
Symbol Function
ggg If you are using a Japanese locale, displays the full era
name.
Symbol Function
Colors
Available colors for metric formatting include
• black
• blue
• cyan
• green
• magenta
• red
• white
• yellow
Derived metrics
A derived metric is developed in the context of a report,
allowing you to create calculations based on the data already
available in the report. For example, a report contains
Revenue and Cost metrics. To calculate profit on the fly,
create a derived metric in the Report Editor with the
following definition:
([Revenue Metric] - [Cost Metric])
Derived metrics are always evaluated by the Analytical
Engine. That is, a derived metric performs math between
metrics (column math) in report data after it has been
returned from the data warehouse. The definition of a
derived metric is visible in the formula bar of the Report
Editor. Formulas of non-derived metrics are not visible.
When you create a derived metric, you cannot access all of the
advanced metric functionality, such as transformations and
conditions. However, you can employ levels, or
dimensionality.
Shortcut metrics
Shortcut metrics are based on metrics already included in a
report and provide a quick way to add new metrics to the
report. They are available when you right-click on a metric
column or metric header and are based on the selected
metric.
• percent-to-total metrics
• transformation metrics
• rank metrics
Percent-to-total metrics
Transformation metrics
• last month
• month to date
• last year
• previous
• last quarter
Rank metrics
Useful functions
Some useful functions to use in metrics include
• rank
• count
Rank
In rank functions, you specify the metric to be ranked and
whether to rank in ascending or descending order. You can
also specify whether to break by an attribute.
The level of the rank depends on the level in the report. For
example, the following metric combined with customer on a
report shows the highest revenue customer as number one.
Rank (Revenue) <Ascending+False>
Count
The count function is usually used with an attribute, although
a fact can also be counted. You can specify whether to count
from a fact or a lookup table and whether to count distinct
occurrences of the target.
• moving average
• moving sum
• running average
• running sum
All these functions are similar and are called OLAP functions
in the Metric Editor. The running sum function uses a metric
as input and calculates a cumulative total of values based on a
sort order specified in the metric definition. The sort order is
not based on the report level. For example, a report with
dates, revenue, and month-to-date revenue is needed. The
month-to-date revenue is defined as
RunningSum(Revenue) <Sort Ascending by Date>.
For input, the moving sum and average require a metric and a
window size, that is, a date range.
N-tile
The N-tile function, which is also referred to as segmentation,
sets up numbers of groups, or tiles, for a metric. Examples of
required parameters are the number of groups and whether
they should be sorted in ascending or descending order.
• object type ([ ])
• level (dimensionality) ( { } )
• transformations ( ||)
Level
The level of a metric determines how the MicroStrategy
Engine selects and assembles information for calculation.
The following applies to the contents of the level statement in
a metric definition:
level attribute
Level filtering
When determining the calculations to be performed for a
given metric, you can change how the WHERE clause in the
SQL statement affects certain attributes in a report. Use level
filtering to modify metric definitions in this way. The
following table shows the options available when applying a
filter to a level metric.
Filter Symbol
Standard +
Absolute *
Ignore %
Undefined Empty
Standard filtering
Absolute filtering
Ignore filtering
Undefined filtering
Undefined
Editor.
filtering is referred to as None in the Metric
Level grouping
Within the level statement, grouping information determines
the level at which the metric function aggregates data.
Specifically, this level component allows you to select
The table shows how these options are displayed in the level
statement.
Grouping Symbol
Standard Empty
Grouping Symbol
Beginning >
lookup
Standard grouping
Ignore grouping
Pass-through functions
Pass-through expressions, also called Apply Functions,
provide access to functionality that is not standard in
MicroStrategy products but can be obtained through the
relational database. When you include a pass-through
expression in an attribute, fact, or transformation expression,
the SQL Engine recognizes it as custom SQL and treats it as a
pass-through expression. The pass-through expression is
then sent to the relational database as written. For more
information, see Appendix C, Pass-through Expressions.
Introduction
First, you gather data about the customers targeted for past
campaigns, including information such as their age, gender,
income, education, household size, and whether they
responded positively or negatively to the campaigns. Next,
you develop a MicroStrategy report to generate a dataset,
which is then analyzed to determine if positive responders
shared any factors. Once these predictive factors are
identified and a predictive model is developed, a
MicroStrategy metric is created that embodies this predictive
model. This metric forecasts who is likely to respond
positively to similar, future campaigns.
Pros:
Cons:
Pros:
• Scores can be done "on the fly" even if new records are
added.
Cons:
They have to make sure the right model is used against the
right data and that the results are available in the time and
format needed by the consumer, not when and how it is
convenient for IT. The overhead of cross-department
coordination and the pressure to get results from more
models, more frequently can make the entire data mining
process break down in some companies.
Pros:
• MicroStrategy stores the predictive model in its metadata
as a "predictive" metric that can be used just like any
other metric.
• Scores can be done "on the fly" even if new records are
added.
Cons:
PMML
7 Save the metric, using the alias from step 5 as the metric
name.
The attribute used on the rows of the dataset report sets the
dimensionality of the data by restricting the data to a
particular dimension, or level, of the data model. For
example, if the Customer attribute is placed on the rows and
the Revenue metric on the columns, the data in the Revenue
column is at the customer level. If the Revenue metric is used
in the predictive model without any dimensionality, then the
data it produces changes based on the template of the report
using the predictive metric. If Year is placed on the rows of
that report, the predictive metric calculates yearly revenue
rather than revenue for customers. Passing yearly revenue to
a predictive model based on customer revenue yields the
wrong results.
In any case, models that were developed from other data can
still be used with MicroStrategy, so long as a couple of
requirements are met:
1 The data that forms the inputs to the data mining model
must be present in MicroStrategy as predictive input
metrics.
You can use one of the following two options to provide the
MicroStrategy dataset to third-party applications:
• Save the dataset as a data mart using MicroStrategy’s data
mart feature. For more information on data marts, see
Data Marting.
Using MicroStrategy
While there are many sophisticated data mining algorithms,
some data mining techniques are fairly simple and do not
require specialized tools. The MicroStrategy TrainRegression
function can be used to create predictive models using the
regression data mining technique. This technique should be
familiar to you if you have ever tried to extrapolate or
interpolate data, or tried to find the line that best fits a series
of data points, or used Microsoft Excel’s LINEST or LOGEST
functions.
So, how can you tell which line has the better fit? There are
many statistics used in the Regression technique. One basic
statistic is an indicator of the “goodness-of-fit,” meaning how
well the line fits the relationship among the variables. It is
also called the Coefficient of Determination, whose symbol is
R2. The higher the R, the better the fit. We can see that the
linear predictor has R2 = 0.7177 and the exponential
predictor has R2 = 0.7459; therefore, the exponential
predictor statistically is a better fit.
Itmetrics
is recommended that reports containing training
have report caching disabled. The reason for
this is to insure that the PMML model is always
generated. If the report is in the report cache, there is
no need for MicroStrategy to execute the training
metric, since the results have already been cached.
Therefore, the PMML model file is not generated. To
disable report caching for a training report, open the
report with the Report Editor and select Report
Caching Options from the Data menu. This opens the
Report Caching Options dialog box, which allows you
to disable report caching for the report.
• Filters
• Custom Groups
• Consolidations
• Derived Metrics
• Shortcut Metrics
Example
Recall the campaign management scenario described at the
beginning of this chapter. Your company wants to improve
the effectiveness of its marketing campaigns, with the goals of
reducing costs and increasing the percent of positive
responses. The results of a previous campaign will be
analyzed to determine what factors, if any, can be used to
predict the performance of a similar future campaign.
The previous campaign was run during the fall of 2002, when
78 customers out of 359 responded favorably. Accurate data
on the targeted customers and their responses have been
entered into a MicroStrategy project.
• Age
• Education
• Gender
• Household count
• Income range
• Marital status
As you can see from the data, the Response Predictor metric
correctly predicted 344 out of 359 responses, which
corresponds to about 95 percent accuracy. This accuracy is
definitely acceptable for marketing purposes. Note that one
of the incorrectly predicted customers, Marion Kelner,
actually did respond but the Response Predictor says she
would not.
On the other hand, the solid red line shows the benefit of
using the Response Predictor metric. Using this predictor,
the most likely responders can be targeted first, providing a
"lift" to the campaign's results. In other words, using the
Response Predictor to identify the customers most likely to
respond favorably, contacting 20% of the customers can yield
over 80% of the responders, a gain of over four times the
random approach! Marketing teams use lift charts like this to
define programs that optimize the costs and the returns of
their campaigns. Finally, you can use the metric to predict the
responses of the customers who were not used in developing
the model, that is, the customers acquired on or after
10/1/2002.
Introduction
Custom groups
A custom group is an object that can be placed on a template
and is made up of a collection of elements called custom
group elements. Each element contains its own set of filtering
or banding qualifications.
• attribute qualification
• set qualification
• report object
• filter object
For example, using the Custom Group Editor, you can create
the custom group Store Inventory as follows:
Store Inventory
Sales
store "a" 22
Custom group
element headers store "t" 16
Large stores with
low inventory 258
store "x" 98
• set qualification
• report
• filter
• banding
• advanced qualification
Banding qualification
Banding qualifiers enable you to create banding custom
group elements. Banding is a method of slicing a list, defined
by the output level, of attribute elements using the values of a
metric. For example, you can slice the list of stores (“Store”
attribute elements) using the values of the metric “Total
Sales.” Suppose you have created a report that ranks stores
according to the revenue generated by each store. You might
decide to group the stores by creating one group for the top
10 stores, a second group for stores 11-20, and a third group
for stores 21-30.
Step Size =
10
10 20 30 40 50
Start At Stop At
Band Count = 4
Result:
1 10 100
Example: banding points
Report requirements
Solution
Store Inventory
Report All custom groups Report Data Options • Display custom groups in hierarchical or
on a report in Report Editor flat view
Example: custom groups
Report requirements
Solution
You are really asking for two different reports: the top ten
customers and the five lowest selling inventory items. You
can create a custom group with the following custom group
elements:
Create a report with this custom group and run it. Your top
ten customers and bottom 5 items, in terms of revenue, are
displayed.
Consolidations
Consolidations enable you to group together and to pick
specific attribute elements. Further, consolidations allow you
to place this grouping of attribute elements on a template just
like an attribute. The elements of the consolidation appear as
rows on your report, and they can have arithmetic
calculations.
Of course, you can get the same effect if you change your data
model, and actually add a Seasons attribute to your Time
hierarchy. However, adding an attribute is generally a very
complex task because you have to ensure that the proper
lookup and relationship tables exist in the warehouse.
Consolidations allow you to avoid changing the data model,
although in a limited way.
Consolidation elements
Consolidation elements are attribute elements that define the
consolidation. Consolidation elements can also be an
expression of attribute elements that make up a
consolidation. They can be defined from any of the following:
• Element 1 (March)
Month of Year=March
• Element 2 (April)
Month of Year=April
• Element 3 (March-April)
{March}-{April}
With the use of consolidation elements, the report can now
display the following.
Existing elements
Using existing elements allows you to perform row level
math, as described previously. For an example, see Perform
row level math.
Importing elements
You can import consolidation elements from an existing
consolidation. When a consolidation element is imported, a
new consolidation element is created and embedded into the
consolidation.
Evaluation order
If you want to place two or more consolidations on a report,
the order the engine evaluates them is significant and can
change your result set. If one of the consolidations involves
multiplication or division and the other involves addition or
subtraction, which consolidation is calculated first matters.
When performing a mathematical calculation, the product of
a sum is not always equal to the sum of the product.
Example: consolidations
Report requirement
Solution
Subtotals Yes No
Arithmetic operations
Arithmetic operations such as addition and division are not
allowed in custom group definitions. However, complicated
mathematical expressions can be created in consolidations
using the following operators:
• +
• -
• *
• /
• ()
SQL efficiency
For each custom group element, there is at least one SQL
pass. When the custom group element is expanded in the
Custom Group Editor, up to three SQL passes must be made
for each custom group element.
Recursive definition
You cannot use existing custom group elements to build a
new custom group element. You must always build a custom
group from attributes. In contrast, you can build new
consolidation elements based on existing consolidation
elements.
Display mode
Each custom group element can be viewed as a set of smaller
grouping elements, which can be repeatedly broken down
until the actual items are reached. This functionality, along
with the four different display modes, provides flexibility and
deeper analysis. For more information, see the Custom group
options section in this chapter.
Subtotals
Custom groups act like attributes when subtotals are
included.
Introduction
Prompts are useful for asking questions about the set of data
you would like to see in the report. Prompts allow the report
to have dynamic report definitions, which can change with
each query by altering the information in the prompt dialog
box. Prompts can be a part of the report definition, filter,
template, custom group, or metric.
You will be able to find the report that you would like to see
quicker because there will be fewer options. However,
prompting questions asked of the user raise the complexity of
just running a report, and you run the risk of confusion. This
confusion can be allayed by providing good descriptions for
the prompts so that the user is clear on what question they
are answering.
What is a prompt?
By using a prompt in a filter or template, you can
• search ability
• properties
Prompt properties
Although each of the prompt types available has distinct
capabilities to provide a specific set of conditions, there are
certain properties that all prompts share:
• Title identifies and differentiates the prompt.
Types of prompts
Using the following prompt types, you can create a prompt
for nearly every part of a report. It is important to remember
that prompts can be used in many objects including reports,
filters, metrics, and custom groups. All of these prompts will
reveal themselves at report execution time, but the origin of
the prompt can be within any of the objects.
• Filter definition prompt encompasses four different
prompt types, all of which allow the user to define the
filtering criteria: attributes in a hierarchy, attribute forms,
attribute element lists, and metrics.
Qualify on an attribute
The list of elements from which the user may choose can be
implemented by
Qualify on a metric
Report requirement
Solution
Object prompts
Object prompts are used to allow you to choose what objects
will be included in the report filter or on the report template.
Report requirement
Solution
Report requirement
Solution
In this case you can give her three functions to choose from:
• minimum
• maximum
• average
She will select which function to use with the Dollar Sales
metric. Your final report can then have the following objects:
• employee
Value prompts
Value prompts are used when the information desired at run
time is a single value of a specific data type. The value chosen
by the user is compared with either an attribute form or a
metric. This comparison can be done in a filtering criteria or
in a custom group. The different types of Value prompts are:
Report requirement
Solution
Prompt the user for the date since they want to see sales data.
The value they choose is applied to a filter criteria for the
attribute “date.” The prompt here is included in the filter on a
report.
Level prompts
Level prompts are used to define the dimensionality of a
metric. When two or more metrics differ only in level, it is
useful to create a prompt on the dimensionality to avoid
having to create two or more metrics.
Report requirement
Solution
Report requirement
Solution
You can create a filter prompt on Year. When the user runs
the report with this prompt, they are asked to specify which
year he would like to see. The user can run the report the first
time using 1998, and run it a second time using 2003, and so
on.
System prompts
System prompts are built-in prompts that are created when
the project is created. System Prompts are created in the
System prompts sub folder in the Prompts folder of
MicroStrategy Desktop.
Introduction
What is a fact?
Facts are objects created by and shared between
MicroStrategy users. They relate numeric data values from
the data warehouse to the MicroStrategy reporting
environment. The facts you create allow users to access data
stored in a data warehouse. Facts form the basis for metrics
that are used in the majority of analyses and reports that
users can create with MicroStrategy.
Fact structure
Every fact has the following:
Fact definition
A fact definition contains properties that define a fact and its
components. The fact definition is composed of at least one
fact expression and basic information about the fact,
including the fact name, expression, and the source table it
uses.
Name
Expressions Expression2
Name
Expression3
Fact Column Alias
Data Type
Extension1
Extensions
Extension2
Fact expressions
A fact expression can be as simple as a fact column name
from the warehouse or as sophisticated as a formula
containing fact columns and numeric constants. A fact
definition can have one or more fact expressions.
Order_Detail
Order_Id
Item_Id
Call_Center_Id Order Date = Order_Date
Order_Date
Qty_Sold
Unit_Price
Sales Fact Fact expression
• addition (+)
• subtraction (-)
• multiplication (*)
• division (/)
Fact Table 1
Item
Quarter
Quantity_Sold
Price
You can create a new fact, Sales, by creating this derived fact:
Sales = Quantity_Sold * Price
The advantage of creating a derived fact is that you do not
have to create multiple facts. It hides the structure of the
warehouse from your users and one consistent fact exists in
the project in lieu of many facts being retrieved from multiple
tables. For example, if you use the same formula in many
places, it uses one pass of SQL instead of three.
Table 1 Table 2
Year Month
Dollar_Sales Dollar_Sls
Column alias
A column alias specifies both the name of the column to be
used in temporary tables and the datatype to be used for the
fact. By default, the datatype for a fact is inherited from the
datatype of the column on which the fact is defined. However,
there are cases where you may need to change this.
ApplySimple("DateDiff(day,#0, #1)",
[Start_Date_Id], [End_Date_Id])
Name
Expressions Expression2
Name
Expression3
Fact Column Alias
Data Type
Extension1
Extensions
Extension2
Level extensions
Facts are stored at a particular level in the warehouse. The
fact level is defined by the attribute IDs present in the table.
Level extensions are necessary when facts are stored in the
data warehouse at one level and reported at a different level.
Every fact is tied to a set of attributes that may or may not
satisfy all user-level reporting requirements. An explicit fact
extension is needed when a fact does not relate to all needed
report attributes.
Ifattributes
a fact has an attribute in the entry level, all parent
are available for use as well, without
extensions.
Name
Expressions Expression2
Name
Expression3
Fact Column Alias
Data Type
Extension1
Extensions
Extension2
• table relation
• fact relation
• degradation
• cross-product join
Table relation
Table 1 Table 2
Distribution Center
Distribution Center
Order
Order
Customer
Freight Customer
Fact relation
Table 1 Table 2
Distribution Center
Distribution Center
Order
Order
Customer
Table 3 Table 4
Distribution Center
Distribution Center
Customer
Freight Customer
Degradation
For example, if your fact is stored at the yearly level and you
want to report the data at the monthly level, create a
degradation. You also add an allocation expression to change
the definition of the fact in a level extension. In this particular
example, you select Month to be the attribute to which to
degrade, and then specify that the allocation expression is
fact/12. By creating allocation expressions, you are defining
how higher-level facts are degraded to lower-level attributes.
Allocation expressions are defined by operations you set on
attributes and facts in the Level Extension Wizard.
You can use a cross product join when a join does not exist,
and you need to force a fact to relate to an attribute by
extending the fact. The cross product join allows a single fact
value to relate to all elements of an unrelated attribute. This
method can produce incorrect data because data can be
repeated and counted twice in some cases. Cross products
should only be used when no other way to extend the fact
exists.
Table 1 Table 2
Order
Distribution Center
Customer
Dollar Sales
Cross product
Defining facts
The tools to create facts are the Fact Creation Wizard and the
Fact Editor. Both of these tools are found in MicroStrategy
Architect, which can be accessed through MicroStrategy
Desktop. The Fact Creation Wizard is a step-by-step interface
that is typically used when you first create a project. It allows
you to create facts in bulk; that is, many facts in one creation
process. The Fact Editor is used to add advanced features to
facts that already exist or to add new facts during the project
evolution.
Fact
Fact name Expression Fact level
description
Introduction
What is an attribute?
Attributes represent entities in the business model and are
normally identified by a unique ID column in the data
warehouse. The attribute acts like a column header and the
data that appears in the following table are elements.
Elements define and make up the attribute. For example, the
elements New York, Baltimore, and Boston are grouped
under the attribute City.
You can use attributes to define the level of detail for a report.
The lowest level attribute you include in a report 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, although it is just not aggregated.
FormCategory
ID
Attribute
Customer
Table
LU_Invoice
Attribute elements
Attribute elements are the unique values or contents of an
attribute. For example, if City is the attribute, then Chicago
and Miami are elements of City.
Hierarchy
Product
Division
Men's Clothing
Shoes
Sporting Goods
Department
Elements Attributes
Class
Item
White Button-Down
Blue Straight Collar
Black Cuffed
Navy Pattern Tie
Another example displays the elements and data for the Store
attribute. Each attribute element is a row in an attribute
lookup table as shown in the following diagram:
Store attribute
Form Form Form
S to r e _ ID S to r e _ N a m e S to re _ L o n g _ N a m e
1 A tla n t a A tla n ta , G e o rg ia
2 M ia m i M ia m i, F lo rid a
3 B o s to n B o s to n , M a s s a c h u s e tts
Elements
4 N e w Y o rk N e w Y o r k , N e w Y o rk
5 A lb a n y A lb a n y , N e w Y o r k
Attribute forms
Attribute forms are identifiers or descriptors of an attribute.
Every attribute must have at least one form, and most have
two:
• the ID form
One of the forms for the element City is Name. Chicago is the
Name for the element of City with the ID of 1. Other forms for
Chicago are a URL, such as www.chicago.com, or an
Abbreviation such as CH.
Elements Forms
Store_ID=1
New York Store_URL=www.NYstore.com
Store_Desc=New York
Store_ID=2
Baltimore Store_URL=www.Baltimorestore.com
Store Store_Desc=Baltimore
attribute Store_ID=3
Boston Store_URL=www.Bostonstore.com
Store_Desc=Boston
• simple
• implicit
• derived
• heterogeneous mappings
Simple expressions
Implicit expressions
Derived expressions
Heterogeneous mappings
You have specified that you are looking for sales information
by store and date. The attributes and metrics you have
defined tell the 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, you do not have
to know SQL to extract information from your data
warehouse.
Column alias
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. However, there are cases where you may
need to change the data type. Following are some examples of
such cases:
ApplySimple("Year(#0)",[Date_Id])
Form groups
A form group is a grouping of attribute forms that have
something in common. You can create form groups to
combine forms that you want related. By grouping forms, you
can design a uniquely defined form that groups two or more
forms under an attribute. When you create a form group, the
included forms are joined together and act as one. The forms
in the form group can never be viewed separately once they
become part of a group. See the following example of the
Customer form group.
Customer Attribute
Form Group
DESC
(Name)
Attribute Attribute
Form Form
Attribute relationships
You link directly related attributes to each other by defining
parent-child relationships. Attribute elements, or the actual
data values for an attribute, dictate the relationships that you
define between attributes. The parent-child relationships you
create here determine the system hierarchy. In other words,
they define how the engine generates SQL, how tables and
columns are joined and used, and which tables are related to
other tables.
Attribute display
Once attributes are built, they are used in two primary
ways—browsing and reporting. Each attribute can be
displayed in a a variety of forms so you must specify the
default display of each of the attributes in the project. You
can do this on a report-by-report basis, but you still must
specify the global, or project-wide, default for each attribute.
You can also select which attribute forms are retrieved with
the report results but not displayed on the grid, that is, they
are found in Report Objects. In Grid view, you can add the
attribute forms in Report Objects to the report without
reexecuting the report.
Compound attributes
A compound attribute is defined as an attribute with more
than one column specified as the ID column. This implies, of
course, that more than one ID column is needed to uniquely
identify the elements of that attribute. Generally, you build a
compound attribute when your logical model reflects that a
compound key relationship is present.
Example: creating a compound attribute
Report requirement
Solution
Introduction
HTML documents use XML and XSL to allow the user to view
the content of the reports included in the HTML document.
These technologies allow you to separate style from content
when creating Web pages. XML defines the structure of
information while XSL defines the formatting of information.
The XML of the report is provided by the Intelligence Server,
and the formatting is supplied by the XSL specified in the
HTML Document Editor.
XML
XML is an acronym for eXtensible Markup Language. XML
provides a standard set of rules for representing data in a
textual representation. Like a database table, XML contains
both data and information about that data. For a database
table, this information takes the form of column names and
data types. For XML, it is stored as tags and attributes. A tag
in XML is similar to a tag in HTML: it is not in itself data to
be displayed or used, but rather provides information about
how to display the data. An attribute in XML is similar to an
attribute in HTML: it provides characteristics about a tag,
and also about the underlying data. In XML, each piece of
underlying data is called an element.
XSL
XSL is an acronym for eXtensible Stylesheet Language. XSL
is what dictates the style (such as color and font) for a grid.
Each report in an HTML document must have an XSL
associated with it so that the report can be formatted.
XSL stylesheets
Report characteristics
When you select an object in the HTML Document Layout
pane, you see the following report characteristics in the lower
part of the document content section:
• Name is the name of the report.
Image URLs
Since HTML documents can be viewed interactively using
MicroStrategy Web or delivered to external sources using
MicroStrategy Narrowcast Server, URLs and file paths must
be constructed correctly. When HTML documents are viewed
using MicroStrategy Web, the Web server that is transmitting
the document can process relative URLs. This is not the case
when HTML documents are delivered to users and viewed
from external sources such as a mail server. These external
sources can resolve only fully-qualified URLs, not relative
URLs. A fully-qualified URL specifies the resource name plus
all the subdirectories, the domain name, and HTTP or
HTTPS, as in
http://www.microstrategy.com/images/
image.gif.
The HTML tag called base sets the base URL for relative
URLs in an HTML page. An example of this tag follows.
<HTML>
<HEAD>
<BASE href="http://www.microstrategy.
com/">
</HEAD>
Layout
You should keep the following in mind while preparing the
layout of the HTML document:
Toinstalled
indicate thresholds you can use the images that are
with MicroStrategy in the folder
Drive:/Program
Files/MicroStrategy/Analytics
Modules/DocumentObjects/Images, assuming
you installed it in the default directory. You must have
the Analytics Modules installed to be able to use these
images.
Target audience
You should first identify the target audience or end users who
will consume the information in the dashboard. This could be
employees at different levels within the organization, such as
executives, managers, or certain groups within the company
such as Marketing or Sales. In some cases, your organization
may choose to provide this information to its partners or
customers. The target audience dictates the type of data and
the style of presentation.
Business purpose
Data set
You should then identify the set of analyses and build the
required reports if the reports are not already available. You
should also note any further analysis to be done using
drilling, or links to additional details.
For each of the reports or data points, you should identify the
best mechanism for display. You can choose the appropriate
graphs and images to highlight specific data, trends, and
deviation from certain trends. Use grids in reports that
require numeric details. Use thresholds within grids for
highlighting deviations.
Delivery mechanism
Example: implementing a gauge-based
dashboard
Report requirement
Solution
<B><xsl:value-of
select="/mi/rit/rd/mi/in/oi/@n" /></B>
</FONT>
You can suitably modify the FACE, SIZE, and COLOR to get
the desired format for the report link.
You can add the following statement to the XSL being used in
order to display report description.
<xsl:template match="/">
</xsl:template>
Example: building an HTML document
Report requirement
Solution
Introduction
Types of hierarchies
There are two types of hierarchies:
System hierarchy
The system hierarchy is the default hierarchy that
MicroStrategy sets up for you each time you create a project.
It contains all of the attributes in the project and is actually
part of the definition of the schema. When you first create a
project, it contains only the system hierarchy.
User hierarchies
When you create user hierarchies, you can define the browse
and drill relationships between attributes. Browsing occurs
through the data explorer, whereas in drilling you are actually
choosing to move to higher or lower levels on a report. You
can create these hierarchies in the Hierarchy Editor using
one or more attributes from the system hierarchy. All the
attributes are listed for you to choose from.
Hierarchy tools
The following tools help you work with hierarchies:
• Data Explorer
• Hierarchy Viewer
Data Explorer
Hierarchy Viewer
Hierarchy Editor
• Lock a hierarchy.
• Limit a hierarchy.
• Filter a hierarchy.
Hierarchy organization
The best design for a hierarchy is to organize or group
attributes into logical business areas. For example, you can
place related attributes into hierarchies by their level.
Location Customer
State Company
City Contact
Store Customer
Hierarchy structure
The system hierarchy is a structure based on relationships
you define between attributes. A user hierarchy allows you to
logically define and order groups of attributes. Both the
system and user hierarchies allow you to navigate and
organize attributes in your project.
Region Region
State Store
Store
Hierarchy display
You can perform the following actions in the Hierarchy
Editor to control hierarchy display:
• Lock a hierarchy.
• Limit a hierarchy.
• Filter a hierarchy.
Locked hierarchy
A hierarchy is referred to as locked when at least one attribute
within that hierarchy has the Element display option set to
Locked. Locking a hierarchy prevents viewing elements of the
specific attribute and any lower level attributes in the
hierarchy. Anything higher in the hierarchy is still visible.
Limited hierarchy
Another way to restrict the viewing of attribute elements in
the Data Explorer is to limit the number of elements that
display at one time. This method is useful when there are
extensive attribute elements in a hierarchy. Instead of
loading all attribute elements at once, you can set the limit to
five or ten at time. You can then click the arrows to see the
next set of attribute elements.
Filtered hierarchy
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 display. For example, you can filter
a hierarchy so that data for only one quarter displays, or data
for only a few individual days of one quarter. Filters make
data retrieval faster by only allowing specific data to display.
However, you cannot use a prompt-based filter to filter a
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.
Entry point
An entry point is a shortcut to an attribute in the Data
Explorer. Creating an entry point grants you faster access to
the attribute without having to browse through multiple
attributes to reach different levels of the hierarchy.
Hierarchy browsing
You can design the user hierarchy browsing for the Data
Explorer by assigning browse attributes. A browse attribute
is the attribute child defined for the hierarchy attribute.
When you apply browse attributes to attributes in a
hierarchy, you are specifying what levels of detail are visible
when browsing the Data Explorer.
Catalog
Category
Subcategory
Item
Arelationships
user hierarchy does not need to have these
defined. It can simply be a collection of
attributes.
Item
Catalog
Category
Subcategory
Item
Catalog Items
Catalog
Spring 02
Category
Subcategory
Summer 02
Fall 02
Category
Subcategory
Item
Introduction
What is drilling?
After executing a report in a MicroStrategy reporting
environment, you may need to execute another report based
on the original report to get more detailed or supplemental
information. For example, after looking at annual sales of a
certain city, you may want to look at the monthly sales for the
same city. Alternatively, after noticing that a certain item had
a very high profit margin, you may want to see if that is also
true for the entire category of that item. Such actions where
you create a related report based on an existing report are
referred to as drilling.
The end user can drill from any object on a report, other than
a simple metric. For example, drilling down from an attribute
or hierarchy allows you to access other child attributes in the
same hierarchy. Drilling from a consolidation allows access to
the attributes that make up the consolidation. Note that by
default in these types, drilling changes a report by navigating
through the drill hierarchies and selecting another attribute
to view. The original object is replaced with the one drilled to.
Drilling on a compound metric allows you to view the metrics
that compose it.
© 2005 MicroStrategy, Inc. Creating custom drill maps and paths 469
14 Drill Maps Advanced Reporting Guide
Destination
For each drill path type, you can have multiple destinations.
You can create multiple drill paths in each drill map.
470 Creating custom drill maps and paths © 2005 MicroStrategy, Inc.
Advanced Reporting Guide Drill Maps 14
© 2005 MicroStrategy, Inc. Creating custom drill maps and paths 471
14 Drill Maps Advanced Reporting Guide
472 Creating custom drill maps and paths © 2005 MicroStrategy, Inc.
Advanced Reporting Guide Drill Maps 14
Return to the original report, edit the drill map, and change
the Consider other filter qualifications property to No.
Again drill down on the Central region to Customer City. The
following report is displayed:
Store Revenue
Alexandria $123,456
Arlington $435,345
Centreville $94,987
Fairfax $105,873
Centreville $94,987
Fairfax $105,873
You can also access the Drill Map Editor from the:
• Attribute Editor
• Consolidation Editor
• Report Editor
• Template Editor
When you edit a drill map from another editor, the drill map
is associated with the object selected in the other editor. You
cannot change the drill map association (that is, what other
objects are associated with this drill map), but you can
change which drill maps are associated with the selected
object. For example, if you are editing the Store State
attribute and you access the Drill Map Editor, only Store
State is associated with the drill map you create.
Removing associations
The Remove Current Association option disassociates the
object from the current drill map and replaces it with its
default map. Depending on the levels described above, this
default map could be the template drill map, the grid unit
drill map, or the project drill map.
The Clear All option deletes all the drill path information for
the whole drill map. The object effectively has no drilling
options. Reset reverses any changes and resets the drill map
to the condition of the last save. Drill map associations are
reset as well.
Introduction
Logical tables
Logical tables are MicroStrategy objects that form the
foundation of a schema. While physical tables in a data
warehouse consist of columns, logical tables in the
MicroStrategy schema consist of attributes and facts. These
attributes and facts are part of the report definition that the
MicroStrategy Engine refers to when a report is executed.
Using the Table Editor, you can view the content of all the
logical tables as well as their associated warehouse tables. In
the MicroStrategy Tutorial, logical tables and all the other
schema objects are stored in the Schema Objects folder.
• slowly-changing dimensions
• recursive hierarchies
• 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.
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
LU_SALES_REP
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
LVW_HIST_DISTRICT_SALES
– Sales Rep
– Current District
– Historical District
– Date
–@ID = MONTH_ID
– Expression: sales
– Tables: FACT_TABLE,
LVW_HIST_DISTRICT_SALES
– Sales: SUM(sales)
Sales LU_TIME
Date
LVW_HISTORICAL_ Month
DISTRICT_SALES
Historical District
Date
Sales
As-was analysis
• Report results
Metrics Sales
Month 200309 200403 200409
Historical District
Northeast 300 250 125
Southeast 150 300 150
Mid-Atlantic 200 275
As-is analysis
• Resulting SQL
• Report result
Metrics Sales
Month 200309 200403 200409
Current District
Northeast 200 250 125
Southeast 150
Mid-Atlantic 250 500 275
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
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
–@ID = date_id, trans_dt
–Tables: LU_TIME (lookup), FACT_TABLE
– Month
–@ID = MONTH_ID
–Child: Date
– Expression: sales
– Tables: FACT_TABLE,
LVW_HIST_DISTRICT_SALES
– Sales: SUM(sales)
Historical Sales
District
LVW_HISTORICAL_
DISTRICT_SALES
Historical District
As-was analysis
• Resulting SQL
on (a11.Trans_dt = a13.Date_ID)
join LU_DISTRICT a14
on (a12.District_ID =
a14.District_ID)
group by a12.District_ID,
a13.Month_ID
• Report results
Metrics Sales
Month 200309 200403 200409
Historical District
Northeast 300 250 125
Southeast 150 300 150
Mid-Atlantic 200 275
As-is analysis
• Resulting SQL:
• Report result
Metrics Sales
Month 200309 200403 200409
Current District
Northeast 200 250 125
Southeast 150
Mid-Atlantic 250 500 275
HIRE_DATE CONTACT_PHONE_NUMBER
DEPT_ID
• Employee
• Department
– @ID = DEPT_ID
– Child: Employee
• Hire Date
– @ID = HIRE_DATE
– Child: Employee
• Emergency Contact
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
Introduction
Associated terminology
The following are terms associated with data marting:
!O Report name
In this example,
Introduction
What is a transformation?
A transformation is a schema object that encapsulates a
business rule used to compare results of different time
periods. Usually defined by a project designer,
transformations are used in the definition of a metric to alter
the behavior of that metric.
Transformation metrics
Transformations are used to compare values at different
times. For example, you want to compare sales for this month
against sales for the previous month, the same month in the
previous year, and so on. Another example is the comparison
of year-to-date data against daily sales data. The simple
metric tallies daily sales. The transformation metric
calculates a rolling total of sales on a daily basis.
Transformation components
All transformations have the following components:
Example: transformations
Report requirement
Solution
Introduction
Aggregation terminology
Now that you know why you should use aggregate tables, the
following terms and definitions will familiarize you with basic
terminology and therefore the basic concepts.
1 10 3/9/99 160
1 10 3/10/99 280
1 10 3/11/99 240
1 10 3/12/99 200
1 10 199903 1305584
Pre-aggregate
into aggregate
table
1 10 3/9/99 160
1 10 3/10/99 280
1 10 3/11/99 240
1 10 3/12/99 200
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. It
can also be defined as a summary table, storing data at a
higher level than how the data was initially captured and
saved.
Degree of aggregation
While MOLAP can provide fast performance when it can
answer a question, it requires a completely aggregated
schema to answer the 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.
Department
Active Flag
Item
Dynamic relationships
Static relationships
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. The 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.
Introduction
Server-level partitioning
In RDBMS server-level partitioning, the database server
rather than MicroStrategy manages the partitioned tables.
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:
Data slices
When you set up metadata partitions, you create the PBTs
before defining 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 engine knows which table
to pick when generating the SQL.
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 results for France,
you can create a qualification on the attribute Country and
use France as the element that appears on the report.
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 must
also create and maintain a partition mapping table (PMT),
which is used to identify the partitioned base tables as part of
a logical whole.
Introduction
• geography
• products
• customers
• time
• promotions
entry point An entry point is a shortcut to an attribute element in the Data Explorer.
Creating an entry point grants you faster access to the attribute without
having to browse through multiple attributes to reach different levels of
the hierarchy.
attribute A data level defined by the system architect and associated with one or
more columns in the data warehouse lookup table. Attributes include
data classifications like Region, Order, Customer, Age, Item, City, and
Year. They provide a handle for aggregating and filtering at a given
level.
Geography hierarchy
The MicroStrategy Tutorial Geography hierarchy contains
attributes such as Country and Region, as well as Distribution
Center, Call Center, and employee-specific attributes. It
might be easy to understand why Country and Region are in
the Geography hierarchy, but what about Distribution
Center, Call Center, and the employee-related attributes?
Country Countries where the company does or hopes to do business in USA, Spain, France
the future. Also, Countries where employees work.
Call Center Where product phone-in orders are taken. Each Call Center is Atlanta, Boston,
located in a different city. Charleston
Distribution The location where product orders are sent out to customers. Miami, New Orleans,
Center Currently, each is located in the same city as the Call Center it Fargo
services.
Manager Person responsible for a specific Call Center Peter Rose, Alice
Cooper
Hire Date The date on which a particular employee was hired 2/16/2002, 3/15/2003
Salary The amount of money an employee makes per year 24,000, 35,000
Employee The lowest level in the Geography hierarchy, representing the Jennifer Lee, Laura
individual responsible for each order placed Kelly
Products hierarchy
The products hierarchy contains attributes such as category,
brand, catalog, and supplier. It should be noted that the
attributes Transaction, Warranty, and Discontinued Code are
not part of the main data model—these are extra attributes
that were introduced to support the MicroStrategy
Narrowcast Server demos.
Category Products are organized into Categories at the highest level. Electronics, Music
Brand The manufacturer or artist for a particular product Ayn Rand, 3Com, Sony
Catalog The medium used to sell products Spring 2002, Fall 2003
Customers hierarchy
The Customers hierarchy contains customer demographic
and purchase information, such as Customer Age, Income
Bracket, Payment Method, and Ship Date.
Customer The highest level of differentiation for where Northeast, South, France
Region Customers live
Customer State Each Customer Region is divided into multiple Main, North Dakota
States.
Customer City Each Customer State is broken down into Cities Albany, Chicago, Memphis
Customer Age The Age of a particular customer at a current point in 26, 38, 59
time
Customer Birth The Date on which the Customer was born 8/4/50, 4/30/72
Date
Income Bracket The salary range reported by the Customer $31,000 - 40,000, $61,000 -
70,000
Zip Code The lowest level of differentiation for where 07026, 36303
Customers live
Customer The name of the individual Customer Selene Allen, Chad Laurie
Shipper The vendor used to send Products to the Customer Pronto Packages, MailFast
Ship Date The Date on which an Order is shipped from the 9/15/02, 3/26/03
Distribution Center
Refer to the graphic below to see how all these attributes are
organized into the MicroStrategy Tutorial Customers
hierarchy.
Time hierarchy
The Time hierarchy contains time-specific attributes—Year,
Quarter, Month, and Day.
Refer to the graphic below to see how all these attributes are
organized into the MicroStrategy Tutorial Time hierarchy.
Promotions hierarchy
The Promotions hierarchy contains Promotion and
Promotion Type. This hierarchy is useful for recording
whether a sale was a promotional purchase.
Promotion Type (Currently not implemented in the project.) Type of Mother’s Day, Labor Day
discount period offered (Sale type).
Promotion (Currently not implemented in the project.) Date range 9/1/02 - 9/4/02, 2/16/03 -
for a particular discount period under which an Item is 2/19/03
purchased (Sales Date).
Refer to the graphic below to see how all these attributes are
organized into the MicroStrategy Tutorial Promotions
hierarchy.
Once the data model is created, the next step is the schema.
• geography
• products
• customers
• time
• promotions
• fact tables
Schema notations
LU_ a lookup table A database table used to uniquely identify attribute elements. They
typically consist of descriptions of dimensions. Lookup tables are
usually joined to fact tables in order to group the numeric facts in the
fact table by dimensional attributes in the lookup tables.
REL_ a relationship While lookup tables store information about one or more attributes,
table relate tables store information about the relationship between two
attributes. Relate tables contain the ID columns of two or more
attributes, thus defining associations between them.
PMT_ a partition A warehouse table that contains information used to identify the
mapping table partitioned base tables as part of a logical whole. Also referred to as a
PMT.
Fact Description
End on hand The number of individual items remaining at the close of each month
Revenue The total income produced by a given source accounting for all product sales deducting
discounts
Unit Cost The amount of money charged by the supplier to the company per individual item
purchased
Fact Description
Unit Price The amount of money charged by the company to the customer per individual item sold
Geography schema
Products schema
Customers schema
Time schema
Promotions schema
Description
560 Mapping data sources to MicroStrategy data types © 2005 MicroStrategy, Inc.
Advanced Reporting Guide Data types B
Format types
Attribute forms are also associated with a format type, which
specifies how attribute form values should be displayed on
the MicroStrategy interface. The format types are:
• Date - Stores dates in a sequential form to perform
calculations on the dates. It represents dates in the
MM/DD/YYYY format.
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.
IfwithyouthedoBignotDecimal
associate high-precision database fields
data type, you may see numbers
truncated starting from 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, make sure to follow
the rules listed below:
Description
Function syntax
The syntax for these functions contains argument markers
flagged by # characters. The argument markers contained
within the # flags are replaced in the engine by the actual
expressions.
Tofouruse# characters
# as a character rather than a placeholder, use
in a row. For example, the formula
for an Apply function is written as the following:
ApplyComparison(UPPER(#0) like
‘Z####%’, Country@DESC)
The SQL for the function is:
Select a.11[COUNTRY_ID] AS COUNTRY_ID
from [LU_COUNTRY] a11
where upper(a11.[COUNTRY_NAME])
like ‘Z#%’
Argument types
The number of allowable arguments is variable. The engine
does not verify arguments until the parameter markers are
replaced at parsing. Parsing occurs when either OK or
Validate is clicked in an expression editor. At parsing time,
the engine searches for acceptable argument types.
Acceptable argument types are names of MicroStrategy
object types or an argument that contains a name of
MicroStrategy object types.
Warehouse
Expression SQL
Type
Syntax examples
The examples in the following sections are specific for
different databases. Please check with your database
documentation to see what SQL syntax is correct for you.
ApplySimple
You can use any database-specific functions or simple
operator in ApplySimple functions to apply them directly in
the SQL.
• attribute form
• consolidation
• custom group
• fact
• metric
• subtotal
• transformation
Examples: Good
• ApplySimple("Datediff(YY,#0,getdate())",
[BIRTH_DATE])
• ApplySimple("Months_between(sysdate,#0)",
[CURRENT_DT])
Examples: Bad
• ApplySimple("Sum(#0)",[Column 1])
• ApplySimple("Count(#0)",[Column 2])
The above two examples are bad and should be not used in
your application because of the following two reasons:
ApplyAgg
ApplyAgg is used to define metrics or subtotals by using any
database-specific group-value functions (usually the ones
that are not recognized as a MicroStrategy object). It accepts
facts, attributes, and metrics as input. Although this function
allows you to send commands straight to your database, it is
important to be aware that the function itself requires proper
syntax in order to be a valid expression.
Example:
ApplyAgg("Regrsxx(#0, #1)",
[Fact 1],[Fact 2])
ApplyOLAP
ApplyOLAP was previously called ApplyRelative. If you are
working with a project that has not been upgraded to 7i you
may still see the ApplyRelative name. Like ApplySimple, it is
used to define metrics. However, the main difference
between ApplySimple/ApplyAgg and ApplyOLAP is that
ApplyOLAP only accepts metrics as input since it is used with
OLAP functions such as Rank. It is usually used with any
database-specific OLAP functions that are not in
MicroStrategy function object, such as RunningSlope.
Example:
ApplyRelative("RunningSlope(#0, #1)",
[Metric 1], [Metric 2])
ApplyComparison
ApplyComparison is used to define a filter. It can take facts,
metrics, and attributes as input.
Examples
ApplyLogic
ApplyLogic is used to define a filter. The difference between
ApplyLogic and ApplyComparison is that it takes logic
(Boolean value), instead of value, as input.
Example
ApplyLogic("#0 AND #1", Year@ID > 2002,
Month@ID > 200201)
Introduction
Attribute relationship
Building an effective project in MicroStrategy requires 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.
Many-to-many relationships
The presence of many-to-many relationships introduces
complexity and additional considerations that you must
make to ensure an effective warehouse design.
Color
Rel_Color_Item
Color_ID
Item_ID
Color
Rel_Color_Item
Color_ID
Item_ID
Fact
Color_ID
Item_ID
Date
Sale Amt
Multiple counting
When dealing with many-to-many relationships, loss of
analytical capability is only one challenge. Another equally
significant issue is multiple counting. Multiple counting
occurs when you attempt to aggregate data to the level one or
higher attribute in the many-to-many relationship, and the
relationship exists in a distinct relationship table but both
attributes are not in the fact table. Recall the example from
above, but make the following change: remove color from the
fact table.
Color
Rel_Color_Item
Color_ID
Item_ID
Fact
Item_ID
Date
Sale Amt
*Note the lack of a color
column in this 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.
Method 1
Method 2
Lookup Color
Color_ID
Color_DESC
Fact
Item_ID
Color_ID
Date
Lookup Item Sale Amt
Item_ID
Color_ID
Item_DESC
Method 3
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.
Promotion
Implied Implied
Quarter Item
Promotion
Rel_Quarter_Promo Rel_Item_Promo
Quarter_ID Item_ID
Implied Implied
Promotion_ID Promotion_Id
Quarter Item
One-to-many joint
child relationship
Promotion
Quarter Item
many-to-many joint
Promotion
child relationship
Quarter Item
Attribute roles
Attribute role is a term used to define the use of a lookup
table that is used for more than one attribute. For each
attribute, the meaning is slightly different. In the following
diagram, state is an example of a role since it relates to both
the vendor and store attributes. In one case, it refers to the
location of a vendor. In the other case, it refers to the location
of a store. The state attribute is therefore said to be playing
two roles.
Vendor
State
Vendor_ID
State_CD
Vendor Name
State Name
State
To see both roles on the same report, you must treat them as
different attributes. That is, they must have different
attribute names. To create unique attributes, you have two
options:
Ifautomatic
you are creating new metadata in MicroStrategy 7.2,
recognition is turned on by default. If you
are upgrading from previous versions, automatic
recognition is turned off. Automatic recognition is a
VLDB property on the project level.
Division
Location Product
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 our stores is located are
two different things, the logical model must reflect that.
Automatic recognition allows these two attributes to access
the same lookup table, using different attribute names for the
same expression.
Vendor_State_ID=15 (Arkansas)
Metrics Dollar
Sales
Vendor State Vendor Store Store State
Physical Table
LU_State
Logical Tables
LU_State_Store LU_State_Vendor
Attribute: Attribute:
Store_State Vendor_State
3 Type the table alias, or the name for the new table.
Introduction
What is an operator?
Operators are used to manipulate individual data items and
data sets. These data items are called operands or arguments.
Operators are represented by special characters or by
keywords. For example, multiplication is represented by an
asterisk (*) and division is represented by a slash (/).
Filtering conditions are expressions built from attribute
forms, metrics, constants, expressions, and operators. For
example, consider the following filtering definition:
Store_ID = 1
The definition above contains an attribute (Store), an
attribute form (Store_ID), a comparison operator (=), and a
numeric constant (1).
• logical
• comparison
• pattern
Logical operators
Logical operators allow the application of certain conditions
to two sets of filter expressions simultaneously. There are
three basic logical operators:
A B Result Displayed
A B Result Displayed
A B Result Displayed
Comparison operators
Comparison operators compare values. The values can be
numbers, text strings, or expressions. The comparison
operators are as follows:
• Between: Identifies values in a range that includes both a
lower and an upper limit. For example, “between 10 and
20” returns all values that are greater than or equal to 10
and less than or equal to 20.
• Less than or equal to: Identifies values that are less than
or equal to the limit indicated. For example, “less than or
equal to 10” returns all values that are 10 or less.
Pattern operators
Pattern operators allow text strings to be compared. Pattern
operators are case-sensitive. The following pattern operators
are available in MicroStrategy:
• Does not begin with: Returns a result set that does not
start with a specified value. For example, “does not begin
with J” returns only those values that do not begin with J,
such as May, February, October, and so on.
• Does not end with: Returns a result set that does not end
with a specified value. For example, “does not end with r”
returns only those strings that do not end with r, such as
March, April, and all the other months meeting the
criterion.
• Does not contain: Returns a result set that does not
contain a specified value. For example, “does not contain
ua” returns only those values that do not contain ua, such
as March, May, and so on.
Introduction
The two retrieval options use different Catalog SQL, but both
can be customized in the Warehouse Catalog Options dialog.
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. To customize a Catalog SQL,
you must understand several important concepts: the table
name space, SQL template strings, and incomplete Catalog
SQL.
FROM ALL_TAB_COLUMNS
ORDER BY 1, 2
Informix 7.x, 8.x, 9.x SELECT DISTINCT owner SELECT T.owner NAME_SPACE,
NAME_SPACE, tabname TAB_NAME T.tabname TAB_NAME,
FROM SYSTABLES C.colname COL_NAME,
C.coltype DATA_TYPE,
WHERE tabid >= 100 AND
C.collength DATA_LEN
tabtype IN ('T', 'V')
FROM SYSTABLES T, SYSCOLUMNS
C
WHERE T.tabid = C.tabid
AND T.tabtype IN ('T', 'V',
'S')
ORDER BY 1, 2
Red Brick 5.x, 6.x SELECT DISTINCT CREATOR SELECT T.CREATOR NAME_SPACE,
NAME_SPACE, NAME TAB_NAME T.NAME TAB_NAME, C.NAME
FROM RBW_TABLES COL_NAME, C.TYPE DATA_TYPE,
C.LENGTH DATA_LEN,
WHERE ID > 0 AND
C.PRECISION DATA_PREC,
CREATOR='#LOGIN_NAME#'
C.SCALE DATA_SCALE
FROM RBW_TABLES T,
RBW_COLUMNS C
WHERE T.ID = C.TID
AND T.ID > 0
ORDER BY 1, 2
ASSISTANT
Introduction
Project creation
Now that you have planned your project and completed the
prerequisites, you can use the Project Creation Assistant to
guide you through building the project and populating the
metadata based on the data structures present in the data
warehouse.
3 Create facts.
4 Create attributes.
Ifselected
you are not authorized to create projects in the
data source, the project will not be created.
When you choose the Select tables step from the Project
Creation Assistant menu, the Warehouse Database Instance
dialog box opens. The database instance selected in this
dialog box determines which data warehouse is accessed. If
you did not previously set up a database instance, click New
to create one in the Database Instance Wizard. You can also
edit an existing database instance with the Database
Instances dialog box. To access it, click Edit.
Catalog
View
Schema
After you select the tables to be added to the project, the table
definitions are written to the metadata.This process can take
some time to complete.
Create facts
This step accesses the Fact Creation Wizard to help you create
the facts for your project. Facts relate numeric data values
from the data warehouse to the MicroStrategy reporting
environment. They allow you to access the data stored in the
data warehouse and they form the basis for metrics.
The Fact Creation Wizard uses rules to help automate the fact
creation process. These rules are accessed from the Define
Rules button on the Introduction page of the wizard. The first
rule determines, by datatype, which columns are displayed
when you are selecting columns to use in facts. The second
rule concerns how to create default fact names—whether to
replace underscores in the fact name with spaces and
whether the first letter is capitalized. You need to change
these rules if the naming conventions in your warehouse do
not conform to these defaults.
Create attributes
This step accesses the Attribute Creation Wizard to help you
create the attributes for your project. Attributes are used to
group or aggregate fact data. An attribute acts like a column
header, and the data that appears in the lookup table are
elements. Elements define and make up the attribute.
ID column selection
Relationship definition
For each attribute, you specify the children and the type of
relationship: one-to-one, one-to-many, or many-to-many.
Project completion
You have now completed making a project with the Project
Creation Assistant. You can continue to develop the project,
using the editors as described in the next section, to add
complexity and flexibility to the project.
Description
Introduction
• Commands
Background
Desktop Commands are a collection of methods that
MicroStrategy Desktop, as an application, supports. These
commands expose functionality such as executing a report,
loading an editor, and so on. You can make full usage of this
feature in the Desktop homepage.
4 Browse for and locate the HTML file in the HTML file
path box or use the default homepage location displayed
in this box.
5 Click OK.
If you cannot see the HTML homepage even after you have
enabled the homepage option from the My Preferences dialog
box, it is because the project homepage option is not enabled
in the Desktop Preferences dialog box. To do this, complete
the following procedure.
3 Click OK.
Toproject
work with the homepage functionality, the Enable
home page functionality option should
always be enabled in both My Preferences and
Desktop Preferences dialog boxes.
Commands
Desktop supports the following commands:
ChangeView
The ChangeView command shows or hides the shortcut and
folder list panes in the object browser.
dss://ChangeView View
Parameters Description
Remarks
Example
<A hRef="dss://changeview showshortcutview">
ShowShortcuts
</A>
Editor
The Editor command loads a new instance of a Desktop
editor.
dss://Editor EditorName
Parameters Description
Remarks
Example
<A hRef="dss://editor search">Open Search
Editor</A>
Execute
The Execute command loads a viewer for a certain object in
metadata. The command takes a list of object IDs and Types.
The command supports report and document object types.
dss://Execute ObjID1.ObjType1\ObjID2.ObjType2
\…\ObjIDn
.ObTypen
Parameters Description
Remarks
Example
<A hRef="dss://execute B5C67DFC11D60B5610008C
B3D1CEE6A
4.3\48CAD4644AB189F763E0EAA22BC0E6DC.55">
Execute: {Profit Forecast 2003, Document
(Customer
Hierarchy)}
</A>
ExecuteDocument
The ExecuteDocument command loads the document editor.
The command can execute one or more documents.
Parameters Description
Remarks
Example
<A hRef="dss://executedocument 3D4DA91C4D20DA
7532D4AB8
48C428031">
Execute Document: {Document (My Electronics
Dashboard)}
</A>
ExecuteReport
The ExecuteReport command runs a report and displays it in
grid view. The command can execute one or more reports.
dss://ExecuteReport
ReportID1\ReportID2\…\ReportIDn
Parameters Description
Remarks
Example
<A hRef="dss://executereport BF294AA247895DD9
354CA9B29
6D91D33">
Execute Report: {Electronics Revenue vs.
Forecast 2003}
</A>
Open
The Open command connects to a project source node in the
object browser. It can also take a project ID to open the
project node.
dss://Open ProjectSourceName\ProjectID\UserLo
gin\UserP
assword
Parameters Description
Parameters Description
Remarks
Example
<A hRef="dss://open MicroStrategy Tutorial">
Open Microstrategy Tutorial
</A>
Reset
The Reset command closes a session to a project or a
connection to a project source.
dss://Reset ProjectSourceName\ProjectID
Parameters Description
Remarks
Example
<A hRef="dss://reset MicroStrategy Tutorial">
Close connection to MicroStrategy Tutorial
</A>
Shortcut
The Shortcut command finds a folder node in the object
browser. If the folder is found then it is selected and the
contents of the folder are displayed.
dss://Shortcut FolderID
Parameters Description
Remarks
Example
<A hRef="dss://shortcut A20C898211D60AE310008
BB3D1CEE6
A4">
Financial Reports
</A>
VALUES
Introduction
Number
The default values for the Number tab are:
• Category—general
• Decimal places—zero
Alignment
The default values for the alignment properties are:
• horizontal alignment—right
• vertical alignment—top
• text wrapping—no
Font
The default font values are:
• Script—western
• Bold—no
• Italic—no
• Size—10
• Strikeout—no
• Underline—no
• Color—black
Border
The values for borders are:
• Top border—yes
• Bottom border—no
• Left border—yes
• Right border—no
Patterns
The pattern defaults are:
• Fill color—white
• Pattern color—blue
• Pattern style—blank
Banding
While this is not a tab on the Format dialog box, banding is
enabled by default for the following autostyles:
• Accounting
• Finance
• Colorful
• Greybands
Country Region
USA Northwest
Northeast
South
Germany Saxony
Bavaria
If merge header cells is set to false, then the report looks like
the following:
Country Region
USA Northwest
USA Northeast
USA South
Germany Saxony
Germany Bavaria
aggregate table A fact table that stores data that has been aggregated along
one or more dimensions.
See pre-aggregation.
Compare degradation.
See also:
• attribute element
• attribute form
• child attribute
• constant attribute
• derived attribute
• parent attribute
attribute form One of several columns associated with an attribute that are
different aspects of the same thing. ID, Name, Last Name,
Long Description, and Abbreviation could be forms of the
attribute Customer. Every attribute supports its own
collection of forms.
attribute role A database column that is used to define more than one
attribute. For example, Billing City and Shipping City are two
attributes that have the same table and columns defined as a
lookup table.
Compare consolidation.
base table A fact table that stores data at the lowest level of
dimensionality.
See also:
• parent attribute
• relationship
compound attribute An attribute that has more than one key (ID) form.
compound metric A metric that cannot have a level placed on the entire metric,
although it can be set separately on each of the components.
conditional predictive A predictive input metric used in data mining that allows a
input metric metric to be filtered, regardless of the context in which it is
used.
data definition Report execution steps that establish how the data is accessed
and manipulated in the data warehouse.
data mart report A special kind of report that saves its report data in a
database rather than returning those results to the user. Data
mart reports either create a new table in the database to store
the report data or append the report data into an existing
table.
data mart table A relational table that is used to store the report data from a
data mart report.
Compare allocation.
See also:
• attribute
• implicit attribute
See also:
• page-by
• pivot
• sort
• subtotal
• surf
dynamic relationship When the relationship between elements of parent and child
attributes changes. These changes often occur because of
organizational restructuring; geographical realignment; or
the addition, reclassification, or discontinuation of items or
services. For example, a store may decide to reclassify the
department to which items belong.
entry level The lowest level set of attributes at which a fact is available
for analysis.
Compare:
• aggregate table
• base table
formatting layer The part of a report that allows you to control how a report
looks. The basic formatting layers are zones, which are the
rows and headers of a report, and grid units, which are the
attribute values. Other formatting layers, such as thresholds
and subtotals, can be thought of as extensions of these two
basic types.
Freeform SQL A MicroStrategy reporting feature that allows you to use your
own customized SQL statements to retrieve data from any
relational databases that are included in a MicroStrategy
project.
implicit attribute An attribute that does not physically exist in the database
because it is created at the application level. Such an attribute
has its expression defined as a constant value, though
nothing is saved in a column. For example, you may wish to
create columns in the database with a value of 1 for every row
to get around COUNT limitations. You don not have to
actually create the column, though, because in the Attribute
Editor, you can just enter a “1” in the expression to create a
count. Implicit attributes are useful in analyzing and
Intelligent Cube A copy of the report data saved in memory and used for
manipulation of the view definition. This division allows
multiple reports with different views to share a common data
definition.
logical table Logical tables are MicroStrategy objects that form the
foundation of a schema. Logical tables in the MicroStrategy
schema consist of attributes and facts. There are three types
of logical tables:
See also:
• logical view
• table alias
logical view One of the three types of logical tables in the MicroStrategy
environment. The other two types are logical tables and table
aliases. A logical view does not point directly to a physical
table and is defined using a SQL query against the data
warehouse. Using MicroStrategy, you can create logical
views, which can be used in the same way as the logical
tables. This means that you define attributes, facts, and other
schema objects based on the logical views.
locked hierarchy A hierarchy that has at least one attribute that may not be
browsed by end users. Application Designers typically lock
hierarchies if there are so many attribute elements that
element browsing is not usable.
See also:
• one-to-one
• one-to-many
• many-to-one
• relationship
See also:
• one-to-one
• one-to-many
• many-to-many
• relationship
metric-based predictive A predictive input metric used in data mining that ensures
input metric that the dimensionality of a metric is fixed.
multidimensional Copy of the report data saved in memory. This cache is used
cache for manipulation of the view definition. Also called an
Intelligent Cube.
See also:
• one-to-one
• many-to-many
• many-to-one
• relationship
See also:
• one-to-many
• many-to-one
• many-to-many
• relationship
See also:
• drill
• pivot
• sort
• subtotal
• surf
See also:
• child attribute
• relationship
See also:
• relationship
• one-to-many
• many-to-one
• many-to-many
See also:
• application-level partition
• database-level partition
partition base table 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. Also referred to as a PBT.
partition mapping The division of large logical tables into smaller physical tables
based on a definable data level, such as month or department.
Partitions minimize the number of tables and records within
a table that must be read to satisfy queries issued against the
warehouse. By distributing usage across multiple tables,
partitions improve the speed and efficiency of database
queries.
partition mapping table A warehouse table that contains information used to identify
the partitioned base tables as part of a logical whole. Also
referred to as a PMT.
See also:
• partition mapping
See also:
• drill
• page-by
• sort
• subtotal
• surf
predictive input metric A metric used in data mining that encapsulates the definition
of another attribute or metric. There are three types of
predictive input metrics: attribute-based input metrics,
metric-based input metrics, and conditional input metrics.
See also:
• aggregate table
• aggregation
quality relationship The relationship between a parent attribute and two or more
“joint child” attributes. The parent attribute is referred to as a
“quality” because its definition is complete only with the
intersection of its joint children.
See also:
• parent attribute
• child attribute
• partial relationship
• quality relationship
• one-to-one
• one-to-many
• many-to-one
• many-to-many
See also:
• filter
• template
simple metric A type of metric that can stand alone or be used as a building
block for compound metrics. Simple metrics always contain
at least one aggregate function, such as sum or average,
applied to a fact, attribute, or another metric. The entire
metric can only contain one level.
See also:
• drill
• page-by
• pivot
• subtotal
• surf
source system Any system or file that captures or holds data of interest.
See also:
• drill
• page-by
• pivot
• sort
• surf
See also:
• drill
• page-by
• pivot
• sort
• subtotal
table alias One type of logical table. A table alias is created outside of the
Warehouse Catalog and points directly to a physical table. A
table alias can have a different name from the physical table.
One physical table can have more than one table alias.
transformation metric An otherwise simple metric that takes the properties of the
transformation applied to it. For example, a metric calculates
total sales. Add a transformation for last year and the metric
now calculates last year’s total sales.
view definition Report execution steps which represent how the data is
viewed and manipulated in the Intelligence Server. The view
definition determines how the final report data set generated
in the data definition steps is manipulated.
A degree of 524
dense 524
across a level subtotals 54
dynamic 41, 281, 521
add-in function. See custom function.
metric 279
add-in. See custom function.
sparse 524
advanced qualification
Alerter. See threshold.
custom expression 229
alias
joint element list 231
attribute column 431
relationship filter 229
fact column 406, 410
advanced subtotal
metric column 290
across a level 54
report 17
by position 55
table 587, 589
group by 55
alignment formatting defaults 636
Aerial perspective 458
all metric format 95
aggregate function defined on 527
allocation expression 417
aggregate table defined on 523
analytical processing 3
advantages 520
application object defined on 5
base table 523
application, data mart 504
compression ratio 527
application-level partition defined on 530
effectiveness 527
apply function 230
integrate into project 527
ApplyAgg 570
logical table size 528
ApplyComparison 571
parent-child relationship 526
ApplyLogic 572
query frequency 525
ApplyOLAP 571
aggregate-aware 528
ApplyRelative 571
aggregation defined on 521
element
attribute element 423 F
consolidation 380 fact defined on 405
embedded allocation expression 417
filter 104 column alias 410
metric 299 creating in Project Creation
template 104 Assistant 613
embedding options 273 cross product join 417
empty object template 115 degradation defined on 416
entity. See hierarchy. derived 409
entry level defined on 406 disallowing 418
entry point 463 expression 408
ETL Information option 620 extension 411
ETL process. See extraction, transforma- Fact Creation Wizard 420
tion, and loading process. fact definition 406, 407
evaluation order Fact Editor 420
consolidation 384 fact entry level 406
consolidation example 124 fact relation 414
data set 120 fact table 406
data set example 121, 124 heterogeneous fact column 410
default 119 implicit 409
example 118 level extension 407, 411
incompatibility error example 121, overview 6
124 table relation 413
of compound metric 279 Fact Creation Wizard 420, 613
of derived metric 120 Fact Editor 420
report 118 fact expression 408
specified 120 fact table defined on 406
view 120 filter defined on 143, defined on 211
view example 121, 124 attribute form qualification 215
ExecuteReport 630 attribute qualification 213
explicit table alias 587, 589 attribute qualification prompt 220
export 17 attribute-to-attribute
expression map 408 qualification 218
extensible markup language. See XML. break by 222
extensible stylesheet language. See XSL. comparison operator 595
extraction, transformation, and loading custom expression 229
T
table
U
alias 587 URL 443
data mart 505 usage, data mart 504
fact table 406 user defined object. See fact expression.
relation 413 user hierarchy defined on 457
size defined on 528 browse 464
warehouse tables in Project Creation browse attribute 464
Assistant 610 display 460
table alias 589 drill 466
technical support xxix entry point 463
template 109, 115 filtered 462
limited 461 W
locked 460
warehouse partition mapping
structure 459
overview 533
user login system prompt
partition base table 534
system prompt 403
partition mapping table 533
user-defined function. See custom func-
versus metadata partition
tion.
mapping 534
user-defined subtotal 63
warehouse table in Project Creation
example 65 Assistant 610
Using attribute forms versus characteristic Web
attributes 435
Analyst 99, 101
Professional 99, 101
V Reporter 99, 101
value prompt 399
variable. See compound metric. X
variance percentage 302
XML 439
variance, transformation metric 302
XSL 440
view definition defined on 32
evaluation order 120
Intelligent Cube 33 Z
report view 34 zero check 288
view filter 16, 35, 42, 45, 46, 47 zone
View options in Project Creation format 87, 88
Assistant 612 zone formatting
virtual attribute (consolidation) 378 subtotal 90
VLDB property
data mart 506
hierarchy 285
integer constant in metric 287
metric join type 287
null check 288
null checking for Analytical
Engine 288
overview 285
subtotal dimensionality aware 289
zero check 288