Professional Documents
Culture Documents
Microstrategy Advanced Reporting Guide 921m
Microstrategy Advanced Reporting Guide 921m
Microstrategy Advanced Reporting Guide 921m
You can also report on data returned from MDX cube sources such as
SAP BW, Microsoft Analysis Services, and Hyperion Essbase. For
information on integrating MicroStrategy with these MDX cube
sources, see the MicroStrategy MDX Cube Reporting Guide.
The appendixes contain the following additional reference information:
Appendix A, Logical and Mathematical Operators for Filtering,
discusses operators and how to use them in filters and report limits.
Appendix B, Formatting Default Values, provides the default values for
all the formatting properties, to assist you in formatting reports and
creating autostyles.
Appendix C, Desktop Commands, specifies the Desktop commands used
in MicroStrategy products, focusing on Desktop homepage usage and
describing the commands from an HTML perspective.
Appendix D, Learning to design a document, shows you how to create
reports to use within Report Services documents and scorecards to
analyze data from different business perspectives. Each scenario guides
you through the creation of a Report Services document or scorecard.
Appendix E, Sorting and Browsing Standards, describes the sorting and
browsing standards for characters and projects in MicroStrategy Desktop
and Web.
About this book
This book is divided into chapters and reference appendices. Each chapter
begins with a brief overview of the chapters content.
The following sections provide the location of examples, list prerequisites for
using this book, and describe the user roles the information in this book was
designed for.
A warning icon alerts you to important information such as potential security risks; these
should be read before continuing.
Type Indicates
Preface Advanced Reporting Guide
xxxiv Resources 2011 MicroStrategy, Inc.
Consulting
MicroStrategy Consulting Services provides proven methods for delivering
leading-edge technology solutions. Offerings include complex security
architecture designs, performance and tuning, project and testing strategies
and recommendations, strategic planning, and more. For a detailed
description of consulting offerings, visit
http://www.microstrategy.com/Services.
International support
MicroStrategy supports several locales. Support for a locale typically includes
native database and operating system support, support for date formats,
numeric formats, currency symbols, and availability of translated interfaces
and certain documentation.
MicroStrategy is certified in homogeneous configurations (where all the
components lie in the same locale) in the following languagesEnglish (US),
French, German, Italian, Japanese, Korean, Portuguese (Brazilian), Spanish,
Chinese (Simplified), Chinese (Traditional), Danish, and Swedish. A
translated user interface is available in each of the above languages. For
information on specific languages supported by individual MicroStrategy
system components, see the MicroStrategy readme.
MicroStrategy also provides limited support for heterogeneous
configurations (where some of the components may lie in different locales).
Please contact MicroStrategy Technical Support for more details.
Technical Support
If you have questions about a specific MicroStrategy product, you should:
1 Consult the product guides, Help, and readme files. Locations to access
each are described above.
2 Consult the MicroStrategy Knowledge Base online at
https://resource.microstrategy.com/support.
What steps have you taken to isolate and resolve the issue? What were
the results?
System configuration (the information needed depends on the nature of
the problem; not all items listed below may be necessary):
You can change the file used to select the imported data, or return
to the preview of the imported data, by clicking Edit next to Source
File or Preview. If you choose to edit either the data being
imported or return to the preview, any changes to the attributes or
metrics that you have defined are discarded.
To publish the data
9 Click Publish. The Save Cube dialog box opens.
10 Browse to the location in which to save the Intelligent Cube, then type a
name and description for the Intelligent Cube in the Name and
Description fields.
11 Click OK. The data is saved as an Intelligent Cube.
Importing Data Advanced Reporting Guide 2
20 Importing data 2011 MicroStrategy, Inc.
12 Once you have saved your data, you can use it to create a report,
document, or Visual Exploration analysis. To do so, select one of the
following:
To create a report, select Create Report. For steps to create a report
that runs against your new Intelligent Cube data, see the
MicroStrategy Web Help.
To create a document, select Create Document. For steps to create a
document using your new Intelligent Cube as a dataset, see the
MicroStrategy Web Help.
To create a Visual Exploration analysis, select Create Analysis. For
steps to create an analysis, see the MicroStrategy Web Help.
Importing data from a database
You can import data using the results of a Freeform SQL query on a
database.
Prerequisites
You must own the MicroStrategy OLAP Services product.
You must have Adobe Flash Player. For specific version requirements,
refer to the Readme file for MicroStrategy Web.
You must have the Web Import Data and Web Import Database
privileges.
Read the Best practices for importing data from a file or database,
page 11.
To import and publish data from a database
1 In MicroStrategy Web, log in to the project to import data to.
2 Click Import Data.
3 From the left, click Database. The Database Upload options are
displayed.
Advanced Reporting Guide Importing Data 2
2011 MicroStrategy, Inc. Importing data 21
To select the data source
4 From the Select a database connection list on the left, select a database
connection to use to import data by doing one of the following:
To select a connection from a list of database connections that you
have created, click My Connections, then click the connection name.
To select a connection from a list of database connections shared by
other users, click Shared Connections, then click the connection
name.
To define a new connection, click the New Connection icon,
then specify the appropriate options for the connection. For details to
create a database connection, see the MicroStrategy Web
Administrator Help.
A list of the database tables in the selected database is displayed. You can
expand the name of a table and view a list of columns in the table by
clicking the arrow icon to the left of the table name. Each column in the
table is displayed, along with its data type.
You can filter the list of database tables by typing the name of a table in
the Search tables field. The list of tables is updated automatically as you
type. You can click Refresh to update the list of available tables.
5 Type a Freeform SQL statement to select data from the database in the
SQL pane. The statement must be a single-pass statement.
All examples in this chapter are created with data from the
MicroStrategy Tutorial project unless otherwise indicated.
In this chapter, the Metric Editor in Desktop is used to work with metrics.
You can also use MicroStrategy Command Manager to work with metrics.
Command Manager manipulates MicroStrategy objects by means of
user-created scripts rather than a graphical user interface. This can be
helpful if you have a large number of metrics to create or edit. For
background information about Command Manager and how to use it, see the
Automating Administrative Tasks chapter in the MicroStrategy System
Administration Guide. For specific Command Manager syntax for working
with metrics, see the online help for Command Manager.
Level metrics: Modifying the context of data
calculations
By default, metrics are evaluated at the level of the attributes on the report;
this is called the report level. For example, a revenue metric is set to the
report level. When the metric is placed on a report containing Region, the
metric calculates regional revenue. When it is placed on a report containing
Customer, the revenue is calculated for each customer.
You can set the level within the metric, allowing you to specify the
attribute(s) to use in the metric calculation, regardless of what is contained
Advanced Reporting Guide Advanced Metrics 3
2011 MicroStrategy, Inc. Level metrics: Modifying the context of data calculations 37
on any report the metric is placed upon. A metric level is sometimes also
referred to as dimensionality, but the term level is used throughout this
manual.
Level metrics are useful for determining the contribution of one object to the
whole. For example, you need to determine the contribution to revenue and
profit of products bought by your top customers. Level metrics allow you to
create contribution metrics, as shown in the following report, which can be
helpful for marketing and customer service.
All the level metrics described in this section have a target of Category.
Category revenue examples
The following report shows the base report with the addition of two new
metrics, both measuring category revenue in different ways.
Notice that the Category Revenue for Displayed Subcategories metric returns
the same number as the category subtotal. That is, the Art & Architecture and
Literature columns are the same as the Books Total. Why?
Standard filtering allows the report filter to interact as usual in the
metric calculation. Therefore, only the subcategories in the report filter
To Calculate Set Filtering To Set Grouping To
Revenue at the category level, including only the subcategories
displayed on the report
Standard Standard
Revenue at the category level, for all subcategories in the
categories displayed on the report
Absolute Standard
Total revenue for the subcategories displayed on the report Standard None
Total revenue for all subcategories in the categories displayed
on the report
Absolute None
Total revenue for all subcategories in the project Ignore None
Advanced Reporting Guide Advanced Metrics 3
2011 MicroStrategy, Inc. Level metrics: Modifying the context of data calculations 43
are included in the metric calculation. This is affirmed by the grand total
of this metricit matches the total for the Revenue metric. This indicates
that only the attributes displayed on the report are included in this
Category Revenue metric.
The numbers returned by the Category Revenue for All Subcategories in
Displayed Categories metric are higher than the numbers for the other
metrics on the report. Why?
Absolute filtering changes the filter on children of the target, by raising
it to the level of the target, if possible. In this example, the report filter is
Subcategory, which is a child of Category, the level target. Since the
report filter is on a lower level than the target, the filter is raised to the
level of the target. All subcategories in the categories on the report are
included in the metric calculation.
Why do the Category Revenue metrics calculate the same number for each
row in a particular category?
Both metrics have standard grouping, which means that the metric
groups by the attribute level of the target. In this case, the target is
category. The metric calculation is rolled up to Category, so the same
number is repeated for each row in a particular category.
Total revenue examples
The following report shows the base report with the addition of three new
metrics, all measuring total revenue.
Advanced Metrics Advanced Reporting Guide 3
44 Level metrics: Modifying the context of data calculations 2011 MicroStrategy, Inc.
The most obvious difference between this report and the Category Revenue
example above is that each column contains only one number; each metric is
returning only one result, regardless of row. Why?
All the metrics on this report, except for Revenue, have grouping set to
none. No grouping means that the metric does not group on the target of
category or the targets child attributes, such as subcategory. Therefore,
separate results are not calculated for the different attributes on the
report; only one result is calculated.
The Total Revenue for Displayed Subcategories metric returns the same
number as the total for the Revenue metric. Why?
Standard filtering allows the report filter to affect the metric. Therefore,
only the subcategories in the report filter are included in the metric
calculation. This is confirmed by the number matching the total for the
Revenue metric. This indicates that only the attributes displayed on the
report are included in this Total Revenue metric.
Refer to the report in Category revenue examples, page 42. Notice that the
total for the Category Revenue for All Subcategories in Displayed Categories
metric is the same amount calculated for the Total Revenue for All
Subcategories in Displayed Categories metric on the total revenue report.
Why?
Both metrics have filtering set to absolute. Absolute filtering raises the
report filter to the level of the target, so all subcategories in the categories
included on the report are added together.
The result for the Total Revenue for All Subcategories metric is huge. Why?
It includes the total revenue for all subcategories in the entire project.
Ignore filtering disregards filtering criteria based on the attribute in the
target and its related attributes (both parents and children). In this case,
subcategory in the report filter is ignored, so the report filter does not
apply to this metric.
Target: The context of a calculation
The target is the attribute level at which the metric calculation groups. It
determines the table to use to calculate the metric. Any set of attributes or a
hierarchy can be the target. A special case is the default target, which is at the
report level. For a more detailed description of the report level, including an
example, see Report level: Interaction with the context of reports, page 56.
Advanced Reporting Guide Advanced Metrics 3
2011 MicroStrategy, Inc. Level metrics: Modifying the context of data calculations 45
For specifics on using a hierarchy as a target, see Using a hierarchy as the
target of a metric level, page 69.
If you open this metric and do not see the exclamation mark, display
the level properties. To do this, select Show level (dimensionality)
properties on the View menu, or click the Show level
(dimensionality) properties icon on the toolbar.
Advanced Reporting Guide Advanced Metrics 3
2011 MicroStrategy, Inc. Level metrics: Modifying the context of data calculations 47
Level grouping examples
A revenue metric is defined as:
Sum(Revenue){~, Subcategory}
The level target is set to Subcategory, with standard grouping. When this
metric is placed on a report with the Subcategory attribute, the report results
are shown below.
This is only a sample of different sections of the report, not the entire
report.
When the same metric is used on a report with quarter, the value for each
quarter is the value for the last month in the quarter. The monthly values for
each quarter are not added together. For example, the on-hand inventory for
Advanced Metrics Advanced Reporting Guide 3
52 Level metrics: Modifying the context of data calculations 2011 MicroStrategy, Inc.
March 2002 is 33,740. Since that is the last month in Q1, that value is
reported on the quarterly report.
Filtering: Interaction with report filters
If you open this metric and do not see the plus sign, the level
properties are not displayed. To show them, select Show level
(dimensionality) properties on the View menu, or click the Show
level (dimensionality) properties icon on the toolbar.
Advanced Reporting Guide Advanced Metrics 3
2011 MicroStrategy, Inc. Level metrics: Modifying the context of data calculations 53
Level filtering examples
All of the metrics in these examples, except the first report, have
grouping set to none.
Consider the following report as a baseline to show the revenue for each
Category and Subcategory.
None of the reports in these examples are presented in full; they are
only subsets of the complete report.
A revenue metric is defined with Category as the target, no grouping, and
standard filtering. A report is created with Category, Subcategory, this new
revenue metric, and a filter for the Literature subcategory. When the report
is executed, the revenue is the same for every row, as shown below. All
categories are included on the report, even though the report filter is
Literature. This is an effect of setting the grouping to none. Since Category in
the target is a parent of Subcategory in the filter, all subcategories are
Advanced Metrics Advanced Reporting Guide 3
54 Level metrics: Modifying the context of data calculations 2011 MicroStrategy, Inc.
included on the report. The metric value is the grand total of the filter, in this
case, only Literature.
The same report is created with a metric set to absolute filtering and no
grouping. When the report is executed, the revenue is the same for every row,
as shown below. Because of the absolute setting, the report filter rolls up to
the level of the metricthat is, Subcategory is elevated to Category. Because
Advanced Reporting Guide Advanced Metrics 3
2011 MicroStrategy, Inc. Level metrics: Modifying the context of data calculations 55
the report is filtered for the Literature subcategory, the value is revenue for
the Books category.
The Revenue subtotals match up with the values of the total Regional
Sales.
Report 2: Call center sales compared to total sales of all call
centers in a given region
Level metric: Grouping = Standard, Filtering = Absolute
In this case, the Regional Sales is equal to the sum of revenues of all call
centers included in a given region. Grouping continues to occur at the target
attribute level of region. The metric definition is shown below:
Sum(Revenue) {~+, Region*}
With absolute filtering, the report filter is present in the subquery of the
WHERE clause in the SQL pass for this metric as shown in the following
example:
select a13.[REGION_ID]) as REGION_ID,
sum(a11.[ORDER_AMT]) as REGIONALSALES
from [ORDER_FACT] a11,[LU_EMPLOYEE]a12,
[LU_CALL_CTR] a13
where a11.[EMP_ID] = a12.[EMP_ID]
and a12.[CALL_CTR_ID] = a13.[CALL_CTR_ID]
and ((a13.[REGION_ID])
Advanced Reporting Guide Advanced Metrics 3
2011 MicroStrategy, Inc. Level metrics: Modifying the context of data calculations 61
in (select s21.[REGION_ID]
from [LU_CALL_CTR] s21
where s21.[CALL_CTR_ID] in (5,11,12)))
group by a13.[REGION_ID]
The report is shown in the following figure:
Security filters are included in the WHERE clause of the level metrics
SQL statement even with absolute or ignore filtering. The engine
includes the security filter to ensure that there is no breach in security
for any level metric. With filtering ignored, the security filter is
unioned with the report filter and is applied to the metric also. With
absolute filtering, the security filter is applied in the subquery with the
report filter.
Advanced Metrics Advanced Reporting Guide 3
64 Level metrics: Modifying the context of data calculations 2011 MicroStrategy, Inc.
Level metrics review: No grouping
This section describes how level metrics can help you answer your report
requirements. In particular, it discusses the interaction between grouping set
to none and different filtering options. Report samples, SQL code, and metric
definitions are used to explain the results.
Report requirements
Your company has recently kicked off a new ad campaign targeted at certain
areas that present high growth opportunities. In your regions, this consists of
the Boston, New York, and the Washington, DC call centers. You need to
perform an analysis from different perspectives and are looking for answers
to the following:
1 How did the sales of these three call centers compare to the total of all
three?
2 How did the sales of these three call centers compare to the total sales of
all call centers within the targeted regions?
3 How did the sales of each of the three call centers compare to the sales of
the entire company?
4 What were the sales in each region, based on the items sold in each call
center in that region?
The answers to these questions give you an insight into how the new
campaign is being received in the targeted areas of your region.
Report 1: Call center sales compared to total sales of
targeted call centers
Level metric: Grouping = None, Filtering = Standard
In this business scenario, the Regional Sales metric calculates the total sales
for all call centers present in the report filter. By changing grouping to none,
the metric does not group by anything directly related to the target attribute
specified within the metric. The metric definition is shown below:
Sum(Revenue) {~+, !Region+}
Advanced Reporting Guide Advanced Metrics 3
2011 MicroStrategy, Inc. Level metrics: Modifying the context of data calculations 65
Therefore, in this example, there is no GROUP BY statement in the SQL as
the attributes call center and region are directly related to the metric target
region. With standard filtering, the report filter elements are included in the
WHERE clause of the SQL as shown in the following example.
select sum(a11.[ORDER_AMT])as REGIONALSALES
from [ORDER_FACT] a11,[LU_EMPLOYEE]a12
where a11.[EMP_ID] = a12.[EMP_ID]
and a12.[CALL_CTR_ID]in(5,11,12)
The report is displayed in the following figure:
Report 2: Call center sales compared to total sales of call
centers in targeted regions
Level metric: Grouping = None, Filtering = Absolute
In this scenario, the Regional Sales metric calculation includes the total for
all the call centers present within all the regions listed in the report, and not
just the call centers included in the report filter. The metric definition is
shown below:
Sum(Revenue) {~+, !Region*}
With no grouping, the metric does not group by anything directly related to
the target attribute specified within the metric. Since the attributes region
and call center in this example are related to the target, there is no GROUP
BY clause in the SQL as shown in the following example.
Advanced Metrics Advanced Reporting Guide 3
66 Level metrics: Modifying the context of data calculations 2011 MicroStrategy, Inc.
select sum(a11.[ORDER_AMT])as REGIONALDOLL
from [ORDER_FACT] a11,[LU_EMPLOYEE]a12,
[LU_CALL_CTR]a13
where a11.[EMP_ID] = a12.[EMP_ID]
and a12.[CALL_CTR_ID] = a13.[CALL_CTR_ID]
and ((a13.[REGION_ID])
in (select s21.[REGION_ID]
from [LU_CALL_CTR] s21
where s21.[CALL_CTR_ID] in (5,11,12)))
Also, with absolute filtering, the report filter is placed in the subquery only if
it is of a lower level than the target. The report is shown in the following
figure:
Report 3: Call center sales compared to total sales of entire
company
Level metric: Grouping = None, Filtering = Ignore
The Regional Sales metric calculates the total company sales for all call
centers, ignoring the three call centers that are filtered out in the report filter.
The metric definition is shown below:
Sum(Revenue) {~+, !Region%}
Advanced Reporting Guide Advanced Metrics 3
2011 MicroStrategy, Inc. Level metrics: Modifying the context of data calculations 67
With no grouping, the metric does not group by anything directly related to
the target attribute specified within the metric. Since the attributes region
and call center are related to the target, there is no GROUP BY clause in the
SQL as shown in the following example:
select sum(a11.[TOT_DOLLAR_SALES])as REGIONALSALES
from [YR_CATEGORY_SLS] a11
The report is shown in the following image:
Report 4: Regional sales based on items sold in each call
center in the region
Level metric: Grouping = None, Filtering = None
The Regional Sales metric calculates the total sales based on the number of
items sold in each call center. The metric definition is shown below:
Sum(Revenue) {~+, !Region}
With no grouping, there is no GROUP BY clause for this metric calculation.
With no filtering, you can define a fact of your choice in the calculation of a
metric. This is accomplished by adding as many additional target attributes
as necessary to the metric to force it to use the fact table that you want. Any
target attribute that has no filtering borrows its filtering criteria from the
other target attributes specified in the dimensionality of the metric. This
Advanced Metrics Advanced Reporting Guide 3
68 Level metrics: Modifying the context of data calculations 2011 MicroStrategy, Inc.
allows you to choose the fact table but not alter the original intent of the
report. The SQL statements for this example are as follows:
Regional Sales (Target=Region, Filtering=Standard,
Grouping=Standard)
select a12.[REGION_ID] as REGION_ID,
sum((a11.[QTY_SOLD]*
a11.[UNIT_PRICE]-a11.[DISCOUNT]))) as REGIONALDOLL
from [ORDER_FACT] a11, [LU_CALL_CTR]a12,
[LU_EMPLOYEE]a13
where a11.[EMP_ID] = a12.[EMP_ID]
and a12.[CALL_CTR_ID] = a13.[CALL_CTR_ID]
and a11.[CALL_CTR_ID] in (5,11,12)
group by a12.[REGION_ID]
Regional Sales1 (Target1=Region, Filtering=Standard,
Grouping=Standard, Target2=Item, Filtering=None,
Grouping=Standard)
select a12.[REGION_ID] as REGION_ID,
sum((a11.[QTY_SOLD]*
(a11.[UNIT_PRICE]-a11.[DISCOUNT]))) as REGIONALDOLL
from [ORDER_DETAIL] a11,[LU_CALL_CTR] a12
where a11.[EMP_ID]=a12.[EMP_ID]
and a11.[CALL_CTR_ID]=a12.[CALL_CTR_ID]
and a11.[CALL_CTR_ID]in (5,11,12)
group by a12.[REGION_ID]
In this business scenario, if you want to use the Order_Detail fact table
instead of the Order_Fact table, you include the Item attribute as the target.
Since the Item attribute is found in the Order_Detail table and not in the
Advanced Reporting Guide Advanced Metrics 3
2011 MicroStrategy, Inc. Level metrics: Modifying the context of data calculations 69
Order_Fact table, it forces the engine to use the Order_Detail fact table. The
report is displayed in the following figure:
Attributes can be used as the target of a level metric to define the exact
level of calculation for the metric. For information on using an
attribute as the target of a level metric, see Level metrics: Modifying
the context of data calculations, page 36.
Advanced Metrics Advanced Reporting Guide 3
70 Level metrics: Modifying the context of data calculations 2011 MicroStrategy, Inc.
Resolving a hierarchy in a level metric
When a hierarchy is used as the target in a level metric, the hierarchy is
automatically replaced with an attribute when the report is executed. The
rules for replacing the hierarchy are listed below:
Category = Books
Advanced Metrics Advanced Reporting Guide 3
76 Level metrics: Modifying the context of data calculations 2011 MicroStrategy, Inc.
In the previous examples, the metric level has not changed from the
default of report level, so the level does not affect the Filter setting.
The next example in this procedure adds a metric level.
9 Save the report as CA Revenue (Attributes Off).
10 Copy the Revenue (Attributes Off) metric, renaming it Order Revenue
(Attributes Off). Edit the metric to add Order to the metric level.
11 Copy the CA Revenue (Attributes Off) report, renaming it Order CA
Revenue (Attributes Off).
Advanced Metrics Advanced Reporting Guide 3
78 Level metrics: Modifying the context of data calculations 2011 MicroStrategy, Inc.
12 Edit the new report. Delete the Revenue (Attributes Off) metric and
replace it with the Order Revenue (Attributes Off) metric. Execute the
report. The results are displayed below:
13 The revenue amount has changed again. Check the WHERE clause in the
SQL view to discover why:
where a11.[EMP_ID] = a12.[EMP_ID] and
a.11[CUSTOMER_ID] = a13.[CUSTOMER_ID] and
a.11[EMP_ID] = a13.[EMP_ID] and
a.11[ORDER_DATE] =a13.[ORDER_DATE] and
a.11[ORDER_ID] = a13.[ORDER_ID] and
a12.[CALL_CTR_ID] = a14.[CALL_CTR_ID] and
a14.[REGION_ID] = a15.[REGION_ID]
and a12.[CALL_CTR_ID] in (2, 4)
and a13.[SHIPPER_ID] in (1)
Now the metric calculation includes Call Center because it is defined on
the template. It also includes Shipper because it is in the same hierarchy
as Order, which is the metric level. Category is not included, since it is
neither on the report nor in the metric level. The metric calculates
revenue in all categories for orders shipped by Pronto Packages for the
California stores.
Re-use metrics with the Filter setting
The Filter setting can help you re-use the same metric in multiple reports.
Clear the Filter setting so that the attributes on the report affect which parts
of the metric filter conditions are applied. This eliminates the need to create
and maintain multiple metrics, particularly if the metric and filter
qualifications are complex.
For example, a revenue metric has a condition that filters for the Northeast
region and the Electronics category. With the Filter setting cleared,
attributes from the metric condition that are not on the report or in the level
of the metric are not included in the metric calculation. Since the default of
Advanced Reporting Guide Advanced Metrics 3
2011 MicroStrategy, Inc. Level metrics: Modifying the context of data calculations 79
report level has not been changed, only the attributes on the report will affect
the metric calculation, as shown in the table below.
Place the metric on a report that contains Category. Revenue is calculated for
the Electronics category across all regions. The metric condition for Region is
not included in the metric calculation because the Filter setting ignores any
attributes in the metric condition that are not on the report.
Place the same metric on a report that contains Call Center and Category.
Revenue is calculated for the Electronics category for all Call Centers in the
Northeast Region. The metric condition for Region is now included in the
metric calculation because the Filter setting only ignores any attributes in the
metric condition that are not on the report or related to attributes on the
report. Call Center and Region are in the same hierarchy and therefore
related.
The same metric returns different results on different reports, because the
report attributes determine which qualifications are used in the metric
calculation. You could achieve the same results with two different metrics,
each with its own filter. Re-using the metric and filter decreases the time
spent creating and maintaining them, especially if the metric and filter are
more complex than this simplified example.
The following procedure re-creates the example above, in particular showing
how the report SQL is affected by the Filter setting.
Region = Northeast
Category = Electronics
2 Create a revenue metric and use the Northeast Electronics filter as the
condition. Keep the metric level set at report level. By default, the Filter
setting is selected. Save the metric as Northeast Electronics Revenue --
selected.
3 Copy the Northeast Electronics Revenue -- selected metric and
rename it Northeast Electronics Revenue -- cleared. Edit the metric to
clear the Filter setting, as described below:
Both the inner and outer functions for the nested metric must be
aggregation functions, such as Sum, Average, Maximum, and so on.
Advanced Metrics Advanced Reporting Guide 3
84 Conditional metrics 2011 MicroStrategy, Inc.
To type the definition for a nested metric
1 Under the File menu, select New, and select Metric.
2 Choose Empty Metric and click OK.
3 In the Definition pane on the right, enter the formula for the metric. For
example, Avg(Sum(Revenue) {~, Category}) {~, Region},
where Revenue is a fact.
4 Click Validate. You should receive a Valid Expression message in the
status area. If not, check the formula for errors.
5 Click Save and Close.
To use an existing level metric
1 Under the File menu, select New, and select Metric.
2 Choose Empty Metric and click OK.
3 In the Object Browser pane, browse to the level metric that you want to
use.
4 Drag the metric into the Definition pane.
5 Enter the outer aggregation function, using the level metric as the
argument. For example, Avg([Category Revenue]) {~, Region},
where Category Revenue is a level metric, defined as Sum(Revenue)
{~, Category}.
6 Click Validate. You should receive a Valid Expression message in the
status area. If not, check the formula for errors.
7 Click Save and Close.
Conditional metrics
You can think of conditionality as a metric filter that is independent of the
filters on any reports the metric is used in. A conditional metric allows you to
Advanced Reporting Guide Advanced Metrics 3
2011 MicroStrategy, Inc. Conditional metrics 85
apply a filter to only one metric on a report while not affecting the other
metrics. The metric condition can be either a filter or a prompt that returns a
list of filters. Only one filter or prompt can be associated with each metric,
but that filter can contain multiple qualifications. See Conditional metrics
with multiple qualifications, page 87, for an example of the latter.
The terms metric filter and metric condition are used interchangeably
to refer to the filter in a conditional metric.
The following report includes a simple example of a conditional metric, to
quickly show you what a conditional metric is in its most basic form. In this
example, you need to review regional revenue for different categories. You
can create a report containing Category, the Revenue metric, and conditional
metrics for the regions. In the following report sample, the Northeast
Revenue and Mid-Atlantic Revenue metrics are conditional metrics.
Northeast Revenue uses the same formula as the Revenue metric, with a
filter for the Northeast region. The Mid-Atlantic Revenue metric was created
in the same way.
Conditional metrics can help you create more sophisticated analyses than the
simple report above, as discussed in the following examples.
Advanced Metrics Advanced Reporting Guide 3
86 Conditional metrics 2011 MicroStrategy, Inc.
Conditional metric example
The following report compares the paid salaries and bonuses of different
departments. It uses a prompted report filter on year; the report sample
below contains 2003 data.
You can set conditionality for simple metrics but not for
compound metrics. The formula of a simple metric is based on
group functions (such as sum or average). For a quick review of
simple metrics and formulas, see Before you begin, page 34. For a
more detailed description of simple metrics, including examples,
see the MicroStrategy Basic Reporting Guide.
3 Click Condition on the Metric component pane (located under the
heading Metric (metric name) is defined as). The Condition definition
pane displays below the Metric component pane.
4 Select the filter or prompt to place on the metric using one of the
following methods:
Use the Object Browser to locate the object, then drag it into the
Condition definition pane.
Click Browse. The Select a Filter dialog box opens, allowing you to
select a filter from the displayed list, or navigate to locate the correct
filter.
The following diagrams represent the logic of the calculations, not the
actual data values calculated by the conditional metric. The
cross-hatched area represents the results of the conditional metric,
indicating that results are calculated in each scenario. The
cross-hatching is not meant to represent that those results will
necessarily be identical sets of data.
Merge report filter into metric applies the report filter criteria to the
data first. Then the metric filter is applied to the results of the first
evaluation. This is the default setting. In the following diagram, the
Advanced Reporting Guide Advanced Metrics 3
2011 MicroStrategy, Inc. Conditional metrics 93
results for the conditional metric are represented by the cross-hatched
circle.
Merge metric condition into report evaluates the metric filter first, then
applies the report filter to those results. While the following diagram may
look similar to the previous one at first glance, notice that the outer circle
is for the conditional metric filter.
Selecting the Merge report filter into metric option includes the
symbol @2; in the metric formula.
Merge into new intersects the metric filter and the report filter. Only
those results that meet both the metric filter and the report filter are
returned. The intersection of the two filters, as shown by the
Advanced Metrics Advanced Reporting Guide 3
94 Conditional metrics 2011 MicroStrategy, Inc.
cross-hatched area in the following diagram, is the data returned by the
conditional metric on the report.
Depending on the embedding method you select, symbols are added to the
metric formula as described in the table below:
A symbol is also added to determine if related report filter elements are
removed, as described in Remove related report filter elements, page 97.
The embedding method is relevant only if at least one filter contains a metric
qualification, relationship qualification, or a shortcut-to-a-report
qualification. The results from these types of qualifications can vary. For
example, filtering on country=US always yields the same results. This is an
example of an attribute qualification. However, filtering on country where
revenue is greater than $1000 can return different results if the data is for
2002 only, 2003 only, or both years combined. This is a metric qualification.
If you create these reports, be aware that the years and data have been
updated in MicroStrategy Tutorial; the reports will not display the
same values as the samples.
The report samples build on the scenario described in Embedding method,
page 92. You need to calculate revenue from high-volume customers, where
a high-volume customer is defined as having purchased more than 20 items.
To calculate that revenue, use a conditional metric with a formula of
Sum(Revenue), setting the condition as the set of customers where Units
Sold > 20. The report contains Year, the High-Volume Customer Revenue
Advanced Metrics Advanced Reporting Guide 3
100 Conditional metrics 2011 MicroStrategy, Inc.
metric, and a filter for the 75 most profitable items in the following Customer
Regions: Central, Northwest, South, and Southwest.
You can see samples of the SQL in SQL samples of Merge report
filter into metric reports, page 107 to see that the reports are
different, even though the results are the same.
Merge metric condition into report with Remove related report filter
elements selected.
The metric filter criteria is applied to the data first. Then the report filter
is applied to the results of the metric filter evaluation. Report filter
elements that are related to the metric filter are ignored.
In the sample report, the customers who bought more than 20 units of
any items are selected; these are the results from the evaluation of the
metric filter. The report filter is applied to those results, so the 75 most
profitable items among the selected customers are chosen. Notice that
Customer Region does not figure in any of these evaluations. This is
because the report filter condition on Customer Region is ignored since
Advanced Metrics Advanced Reporting Guide 3
102 Conditional metrics 2011 MicroStrategy, Inc.
Customer Region is related to Customer in the metric filter. The report
results are displayed below.
This is not the exact SQL from the reports; the samples have been
edited for better readability.
Advanced Metrics Advanced Reporting Guide 3
108 Conditional metrics 2011 MicroStrategy, Inc.
Remove related report filter elements selected
select ORDER_DETAIL.CUSTOMER_ID AS CUSTOMER_ID
from ORDER_DETAIL, TempTable
where ORDER_DETAIL.ITEM_ID = TempTable.ITEM_ID
group by ORDER_DETAIL.CUSTOMER_ID
having sum(ORDER_DETAIL.QTY_SOLD) > 20.0
select LU_DAY.YEAR_ID AS YEAR_ID,
sum(REVENUE) from ORDER_DETAIL, TempTable, LU_DAY
where ORDER_DETAIL.CUSTOMER_ID = TempTable.CUSTOMER_ID
and
ORDER_DETAIL.ITEM_ID = TempTable.ITEM_ID and
ORDER_DETAIL.ORDER_DATE = LU_DAY.DAY_DATE
group by LU_DAY.YEAR_ID
Remove related report filter elements cleared
select ORDER_DETAIL.CUSTOMER_ID AS CUSTOMER_ID
from ORDER_DETAIL, TempTable, LU_CUSTOMER, LU_CUST_CITY,
LU_CUST_STATE
where ORDER_DETAIL.ITEM_ID = TempTable.ITEM_ID and
ORDER_DETAIL.CUSTOMER_ID =
LU_CUSTOMER.CUSTOMER_ID and
LU_CUSTOMER.CUST_CITY_ID =
LU_CUST_CITY.CUST_CITY_ID and
LU_CUST_CITY.CUST_STATE_ID =
LU_CUST_STATE.CUST_STATE_ID
and LU_CUST_STATE.CUST_REGION_ID in (7, 6, 4, 5)
group by ORDER_DETAIL.CUSTOMER_ID
having sum(ORDER_DETAIL.QTY_SOLD) > 20.0
select LU_CUST_CITY.YEAR_ID AS YEAR_ID,
sum(REVENUE)from ORDER_DETAIL, TempTable, LU_DAY,
LU_CUSTOMER, LU_CUST_CITY, LU_CUST_STATE
where ORDER_DETAIL.ITEM_ID = TempTable.ITEM_ID and
ORDER_DETAIL.CUSTOMER_ID = TempTable.CUSTOMER_ID and
ORDER_DETAIL.ORDER_DATE = LU_DAY.DAY_DATE and
ORDER_DETAIL.CUSTOMER_ID = LU_CUSTOMER.CUSTOMER_ID and
LU_CUSTOMER.CUST_CITY_ID = LU_CUST_CITY.CUST_CITY_ID and
LU_CUST_CITY.CUST_STATE_ID = LU_CUST_STATE.CUST_STATE_ID
and
LU_CUST_STATE.CUST_REGION_ID in (7, 6, 4, 5)
group by LU_DAY.YEAR_ID
Advanced Reporting Guide Advanced Metrics 3
2011 MicroStrategy, Inc. Conditional metrics 109
Changing the condition advanced option defaults
In most circumstances, you want the report filter to apply to the conditional
metric, except for qualifications that contain attributes related to attributes
in the metric filter. The conditional metric should be calculated based on the
specified metric condition, regardless of whether any attributes from the
same hierarchy appear in the report filter. Therefore, by default, the
embedding method is set to Merge report filter into metric and the Remove
related report filter elements check box is selected.
You can change these defaults, however. Choose the embedding method and
whether to remove related elements, then select the Remember option
setting check box. When you create another conditional metric, the new
defaults are used.
Additional examples of the embedding method options
The following examples offer another scenario to explain how conditional
metrics and report filters affect each other.
You want to identify the bottom 10 items in terms of revenue but you want to
place an additional qualification to include only those items where sales are
greater than $100. You place the Bottom 10 qualification in the report filter
and the Revenue greater than $100 qualification in the metric condition. The
results are shown below:
Only 3 rows are returned, instead of the 10 you expected based on your
Bottom 10 qualification. Why?
By default, the report filter is applied first and then the metric filter is applied
to that result set. This means that the bottom 10 sales are determined first,
and then, of those bottom 10 sales, only those items with sales greater than
$100 are returned on the report. The number of rows on the report is only 3,
since most of the 10 items returned by the report filter have sales less than
$100.
Advanced Metrics Advanced Reporting Guide 3
110 Conditional metrics 2011 MicroStrategy, Inc.
If you place the bottom 10 qualification in the metric and the revenue greater
than $100 qualification in the report filter, the report results change, as
shown below:
The report contains 10 rows, as expected, and all items have a revenue higher
than $100. Since the report filter is applied first, all items with sales greater
than $100 are found first. Then the metric condition is applied to those
results. The bottom 10 revenue items are then selected, so the report returns
10 rows.
To get the results you want, you can switch the qualifications, as shown in
these examples above, or you can change the embedding method. The
previous two examples used the default embedding option, which is Merge
report filter into metric.
Change the embedding option to Merge metric condition into report. Now
the metric filter is evaluated first, and then the report filter is applied to those
results. That is, the bottom 10 sales are determined and then, of those
bottom 10, only those items with sales greater than $100 are returned on the
report. The report, shown below, is identical to the first report example. Only
3 rows are returned, since 7 of the 10 items returned by the metric filter have
sales less than $100.
Change the embedding option to Merge into new, and the metric filter and
the report filter are intersected. Only those items that are in the bottom 10 in
Advanced Reporting Guide Advanced Metrics 3
2011 MicroStrategy, Inc. Conditional metrics 111
terms of sales and have sales greater than $100 should be included. The
results should be the same as the above report sample, with 3 rows of data.
However, the report contains 10 rows of data. The bottom 10 items are listed,
but some of them have revenue of less than $100. It does not seem that the
report filter is being applied. Why? The embedding method is not the only
option for conditional metrics that affects the interaction between filters. The
Remove related report filter elements setting also influences the
relationships between filters. By default, related report filter elements are
removed. In this example, the filters use the same element (Item), so the
report filter is ignored. Only the metric filter, for the bottom 10 sales, is
applied. For a detailed description of how this setting works, see Remove
related report filter elements, page 97. For a description of how the two
settings interact, including a list of all the possible combinations, see
Combining the embedding method and remove related elements settings,
page 99.
Advanced options for metric filter and report filter interaction
Both conditional metrics and level metrics have advanced options that affect
filters. The difference is that the advanced option for level metrics applies the
metric filter to the metric calculation, while the advanced option for
Advanced Metrics Advanced Reporting Guide 3
112 Transformation metrics: Time-based and other comparisons 2011 MicroStrategy, Inc.
conditional metrics sets the interaction between the metric filter and the
report filter.
Transformation metrics: Time-based and other
comparisons
You need to compare business unit costs on a quarterly basis. In the
Financial Reporting Analysis Module, one of the MicroStrategy Analytics
Modules, the business unit costs are represented by the Account Amount
fact, which is the actual amount of each recorded transaction. To calculate
the Account Amount, create the following metric, called Actual Amount, to
calculate the dollar value of the accounts:
Sum([Account Amount]) {~+}
Now, how do you count last quarters costs? You apply a transformation to
your Account Amount metric. A transformation maps a specified time
period to another time period. In other words, it applies an offset value, such
as current quarter minus one quarter.
If you re-create these reports, be aware that the years and data have
been updated in MicroStrategy Tutorial; the reports will not display
the same values as the samples.
Transformation metrics in the Metric Editor
A metric transformation is set in the Metric Editor, using the metric
definition window, which displays the complete metric definition, including
its formula, level, condition, and transformation. When you select
Transformation in the upper portion of this window, the Transformation
Advanced Reporting Guide Advanced Metrics 3
2011 MicroStrategy, Inc. Compound metrics 117
component window appears below the metric definition area, as shown
below.
Use the Object Browser on the left side of the Metric Editor to select the
transformation for the metric. To remove a transformation, select it in the
Transformations window and click Remove.
You can add multiple transformations to the same metric. The arrows allow
you to reposition the transformations and thereby change the order they are
evaluated. To delete all the transformations, click Reset.
Rather than using the Metric Editor to apply a transformation to a single
metric, you can use the Advanced Metric Assistant to combine multiple,
simple metrics with multiple transformations. This can help reduce the time
required to create the transformation metrics for a project, as described in
Creating metrics by combining metrics, filters, and transformations,
page 121.
Compound metrics
The formula of a compound metric is based on arithmetic operators and
non-group functions. Arithmetic operators are +, -, *, and /; non-group
functions are OLAP and scalar functions such as running sum or rank. The
operators and functions can be applied to facts, attributes, or metrics.
You can select the value that is displayed in place of a null value in a
subtotal. For instructions, see the Report Formatting chapter in the
MicroStrategy Basic Reporting Guide.
Defining subtotal defaults
For each metric, you can change the default grand total function and add
functions to the list of available subtotals. This allows you to use different
grand total functions for different metrics on the same report, for instance.
These options are found on the Subtotals/Aggregation tab of the Metric
Editor. The default grand total is called the Total subtotal function. You can
add functions to the list of available subtotals or remove functions. The
functions listed here are available as subtotals in reports.
Year
Quarter
Month
Day
7 Click OK, then OK again to return to the Subtotal Editor.
This sample presents only a subset of the entire report, showing the
first three months of the year and the total.
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
Advanced Metrics Advanced Reporting Guide 3
130 Metric subtotals 2011 MicroStrategy, Inc.
the last line of the sample, were not received until March, so the total is
derived from the March shipment.
In the Report Editor, place Region and Call Center on the rows, and
then the Units Sold and Profit metrics on the columns.
Next, create the subtotals for the report. Select Subtotals from the
Data menu.
Click Advanced.
Click OK.
Select Across level and then Call Center, so the subtotals are
calculated for each region.
Click OK.
Select By position. For Rows, select Grand Total from the pull-down
list. For both Columns and Pages, select None.
Execute the report. The results are displayed in the following image:
Disabling subtotals
You can also choose to disable totaling on a metric such as an inventory
metric or another non-aggregatable metric. To do this, set the total subtotal
function to None and clear all the available subtotals for the metric. If you set
the total subtotal function to None but do not clear the available subtotals,
grand totals are unavailable in reports; in this scenario, the only way you can
show grand totals is by defining subtotals. If you clear the Available subtotals
for metrics list and set a total subtotal function, only that function is
available for subtotal calculation.
Advanced Metrics Advanced Reporting Guide 3
134 Metric functions 2011 MicroStrategy, Inc.
Metric functions
Some useful functions to use in metrics include:
Rank, page 134
Count, page 136
Running and moving sums and averages, page 137 (also called OLAP
functions)
N-tile, page 139
First and Last, page 141
All of the above except count and first/last are non-group functions.
Non-group functions are used in compound metrics.
Creating your own plug-in functions, page 141
Apply functions: Using database-specific functions in metrics, page 142
The following sections contain a brief overview of the functions in each group
listed above; for complete details about these and other functions see the
Functions Reference.
For more information about subtotals and grand totals, see Metric
subtotals, page 124.
Defining custom plug-in functions involves the following steps:
In the design stage, you determine how to implement the analytical
procedures into a computer system.
Creation builds the Microsoft Visual C++ project, which is used to
produce a library containing your algorithms.
Implementation involves creating the code for the algorithms and
compiling this code into a library that will be used by MicroStrategy.
Importing adds the library to a MicroStrategy project so its algorithms
are available for use in the project.
Deployment distributes your library to Intelligence Server, which will
execute it.
Advanced Metrics Advanced Reporting Guide 3
142 Join specifications 2011 MicroStrategy, Inc.
The final step is execution, which is creating new metrics that use the
algorithms and using those metric in a MicroStrategy report.
The Function Plug-In Wizard guides you through the creation and
implementation steps. It helps you create a Microsoft Visual C++ project
with placeholders where you can add custom analytic code. After adding your
function-specific C++ code and building your project, you can launch
MicroStrategy Desktop to import your new function plug-in to be used for all
the reports. Deployment occurs on each Intelligence Server system that will
use it. The execution step is also performed in MicroStrategy Desktop, when
you create metrics and reports using the new function. For detailed
information on each step, see the Function Plug-In Wizard online help. The
Desktop online help also provides instructions on importing the functions.
The Function Plug-In Wizard must be installed before you can create
and implement custom plug-in functions. This installation is
incorporated into the standard MicroStrategy installation. The option
to install this component is enabled only if Microsoft Visual C++ 6.0 is
present on the system where the installation is being performed.
During installation, the Function Plug-In Wizard option is located in
MicroStrategy Architect under MicroStrategy Desktop Products. For
installation procedures, see the Functions Reference.
Apply functions: Using database-specific functions in metrics
Apply functions, also called Pass-through functions, provide access to
functionality that is not standard in MicroStrategy products but can be
obtained through the relational database. When you include an Apply
function in an attribute, fact, or transformation expression, the SQL Engine
recognizes it as custom SQL and treats it as such. The expression is then sent
to the relational database as written. For more information, see Apply
functions in metrics: Using database-specific functions, page 186.
Join specifications
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 that data is tables or metrics.
Advanced Reporting Guide Advanced Metrics 3
2011 MicroStrategy, Inc. Join specifications 143
An outer join includes all of the data in all of the elements. You can set joins
at the metric and report levels:
Join at the metric level: how the metric is joined to other metrics
Join at the report level: how metrics are joined together in the report;
overrides any metric join settings for that report only
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. For instructions, see the Analyzing Data chapter of
the MicroStrategy Basic Reporting Guide.
Setting the metric join type at the metric level affects the results for all
reports using that metric. To set the metric join type at the metric level, use
the Metric Join Type option on the Tools menu of the Metric Editor.
By default, a report uses the metrics join type setting. The default metric join
type at the metric level uses the default inherited value, which is an inner
join.
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. For more information about join types at the formula level, see
Formula join type for compound metrics, page 121. For more information
about compound metrics in general, see Compound metrics, page 117.
Inner joins versus outer joins
In short, an inner join includes only data that is common to all components
of the join. An outer join includes data that applies to all components. The
following descriptions use an example of a report containing the Region
attribute, the Sales metric, and the Budget metric:
By default, inner joins are generated for all metrics in a report. The
resulting report contains only those rows that have data returned for all
the metrics. If a particular region does not have both sales and budget
data, the region is not included on the report.
If you switch to outer joins for all the metrics on the report, all rows with
data for any of the metrics are displayed. All regions are included in the
report, even if they have no data for one of the metrics.
You can specify different joins for each of the metrics on a report. For
example, use an outer join for the Sales metric and an inner join for the
Advanced Metrics Advanced Reporting Guide 3
144 Metric-specific VLDB properties: SQL and analytical customization 2011 MicroStrategy, Inc.
Budget metric. The resulting report displays all regions with sales data. If a
particular region has budget data but not sales data, the region is not
included in the report.
For a more detailed explanation of this example, with report samples, see the
Analyzing Data chapter of the MicroStrategy Basic Reporting Guide.
Joins between metrics
Setting the metric join type allows you to define the default action for joining
the metric to other metrics. This setting is used for the metric on any report
the metric is placed on. However, you can override this metric join setting for
a particular report. For information on setting metric join types at a
report-specific level, see the Analyzing Data chapter of the MicroStrategy
Basic Reporting Guide.
The Metric Join Type option is accessed from the Tools menu of the Metric
Editor. The metric join types are as follows:
Default uses the default value.
Inner includes only information contained by all the elements.
Outer keeps all the information in all the elements.
The Metric Join Type option is a shortcut to the Metric Join Type
VLDB property located under Advanced Options in the same menu.
Metric-specific VLDB properties: SQL and
analytical customization
VLDB (Very Large DataBase) properties allow you to customize the SQL that
MicroStrategy generates. The metric join type, described in the previous
section, is not the only VLDB property that affects metrics. The following list
summarizes the metric-specific VLDB properties that can be set at the metric
level. For details on each of these properties, see Chapter 15, VLDB
Properties. For details on all VLDB properties available in MicroStrategy, see
the MicroStrategy Supplemental Reference for System Administration.
Integer Constant in Metric determines whether to add a .0 after an
integer.
Advanced Reporting Guide Advanced Metrics 3
2011 MicroStrategy, Inc. Metric column aliases: SQL identifiers and data types 145
Null Check indicates how to handle arithmetic operations with null
values.
Zero Check indicates how to handle division by zero or when to check for
zeros in the denominator during division calculations.
Null Checking for Analytical Engine determines whether a null value is
interpreted as zero when the Analytical Engine performs calculations.
Subtotal Dimensionality Aware enables subtotaling based on the
dimensionality of a metric.
You can set additional metric VLDB properties at other levels, such as
the report and project levels. For more information on how the levels
work together, see Levels of VLDB properties, page 826.
Metric column aliases: SQL identifiers and data
types
A column alias changes the name of a metric in temporary tables, which are
used in data marts and SQL generation. This renaming does not affect the
actual name of the metric in the metadata but allows you to identify the
metric easily, such as in a long SQL report. The column alias is set in the
Metric Column Alias dialog box in the Metric Editor. To access it, select
Tools, then Advanced Settings, and then Metric Column Options.
There are several drawbacks to using the Big Decimal data type for
metric values.
For more information on all data types, see the Data Types appendix in the
MicroStrategy Project Design Guide.
Advanced Metrics Advanced Reporting Guide 3
146 Metric column aliases: SQL identifiers and data types 2011 MicroStrategy, Inc.
2011 MicroStrategy, Inc. 147
4
4.ADVANCED FILTERS
Filtering Data on Reports
Introduction
This chapter builds on knowledge provided in the Building Query Objects
and Queries, for Designers chapter of the MicroStrategy Basic Reporting
Guide. You should already know how to create a simple filter and place it in a
report. You should also know the difference between different types of
qualifications, although Types of qualifications, page 149, provides a brief
description of each type. This chapter discusses the concepts necessary to
create and use the following advanced filters and qualifications:
Attribute-to-attribute qualification, page 152
Dynamic dates: Filtering by offsetting the current date, page 157
Importing and exporting elements for attribute qualifications, page 165
The attribute level of set qualifications: Output level, page 168
Resetting rank and percent metric qualifications: The break by
property, page 171
Metric-to-metric comparisons, page 172
Merging attribute qualifications, page 173
Applying qualifications independently of relationship filters, page 175
Custom expressions and database-specific functions, page 176
Advanced Filters Advanced Reporting Guide 4
148 Before you begin 2011 MicroStrategy, Inc.
Joint element lists: Grouping elements from multiple attributes,
page 194
Prompted filters: Asking for user input for filter conditions, page 196
A metric qualification allows a report to display the sales data for only
those products with inventory level below a specified value. It is also
referred to as a metric set qualification.
Advanced Filters Advanced Reporting Guide 4
150 Before you begin 2011 MicroStrategy, Inc.
Joint element lists, which join attribute elements and then filter the
result sets.
Dynamic dates: Filtering by offsetting the current date, page 157, are
fixed offsets of the current date.
This procedure assumes that you are familiar with creating a prompt.
For information, see the MicroStrategy Basic Reporting Guide or the
Desktop Help.
Advanced Reporting Guide Advanced Filters 4
2011 MicroStrategy, Inc. Dynamic dates: Filtering by offsetting the current date 163
To create a dynamic date based on a prompt answer
Create the date prompt
This prompt, which will be used on the filter, asks the user for one date.
1 On the File menu, point to New, and choose Prompt. The Prompt
Generation Wizard opens.
2 On the Welcome page, select Value prompt, then click Next. The Value
Prompt page opens.
3 Select Date and Time, then click Next. The General Information page
opens.
4 Type a Title, such as Target Date.
5 Type text in the Instructions field, which is displayed when the prompt is
run during report execution.
6 Select Prompt answer required.
7 Click Finish. The Save As dialog box opens.
8 Select the folder in which to save the new prompt, type Target Date as the
Object Name, and click Save to return to Desktop.
Create the filter
This filter, which will be used on the report, returns the dates between the
date selected in the prompt and one month before the prompt answer.
9 On the File menu, point to New, and choose Filter. The Filter Editor
opens.
If the New Filter dialog box opens, double-click Empty Filter to open the
Filter Editor.
10 Drag the Day attribute from the Object Browser to the Filter definition
pane. The Attribute Qualification pane opens.
11 Select ID from the Qualify On drop-down list.
12 Select Between from the Operator drop-down list.
Advanced Filters Advanced Reporting Guide 4
164 Dynamic dates: Filtering by offsetting the current date 2011 MicroStrategy, Inc.
13 Drag the Target Date prompt from the Object Browser to the text box for
the first value, as shown below. The cursor will change to a + when it is in
the correct position.
When you drop the prompt, the text box changes to Shortcut to: Target
Date, and the drop-down list changes to Simple Prompt.
14 Select Custom from the second drop-down list.
15 Type the following in the second text box:
AddMonths(
16 Drag the Target Date prompt from the Object Browser to the second text
box.
17 Type the following at the end of the second text box:
, -1)
The interface should now look like the following:
18 Click OK to return to the Filter Definition pane.
19 Save and close the filter, naming it 1 Month Ago from Prompted Date.
Advanced Reporting Guide Advanced Filters 4
2011 MicroStrategy, Inc. Importing and exporting elements for attribute qualifications 165
Create the report
20 Open a new report.
21 Add the Day attribute and the Revenue metric.
22 Drag the 1 Month Ago from Prompted Date filter from the Object
Browser to the Report Filter pane.
23 Save the report, then execute it.
Importing and exporting elements for attribute
qualifications
You can import filter elements into the Filter Editor from sources other than
MicroStrategy. The following requirements must be met:
The filter is an attribute qualification.
The filter is qualified on an attribute form, not elements.
The operator must be In list or Not in list.
The elements to be imported are stored in an Excel file or a text file.
The import filter elements option adds more flexibility to the Filter Editor by
allowing lists of data from pre-existing files to be imported into the filter
definition. Existing filter definitions can also be exported to a file.
You can use a prompt to allow you to select the file to import when
you run the report.
Importing elements from a text file or a Microsoft Excel file can be quicker
and more efficient than selecting each individual element to be included in
the filter. For example, you have an Excel spreadsheet that lists the products
on sale this month. You need to review last week's revenue for just these
items. Rather than selecting them in the Filter Editor, you can simply import
the file. Likewise, you can export existing filter definitions to a file.
Advanced Filters Advanced Reporting Guide 4
166 Importing and exporting elements for attribute qualifications 2011 MicroStrategy, Inc.
Requirements for formatting the import file
The following rules apply to the formatting of files:
ExcelData can be stored in rows, columns, or both, as follows:
If the data in a cell has double quotes in the first and last position, it is
imported as it is, with the quotes.
If the data in a cell has single quotes in the first and last position, it is
imported as is, with the quotes.
If the data in a cell does not satisfy any of the above conditions, it is
considered as text data and is imported by adding double quotes at
the beginning and end to comply with the text format.
TextData in a text file must be one of the following:
Tab-delimited
Return-delimited
To import filter elements
1 In Desktop, select File, point to New, and then choose Filter. The Filter
Editor opens.
If the New Filter dialog box is displayed, click the Empty Filter icon. If
you do not want this dialog box to be shown in the future, select Don't
show this dialog in the future. Click OK. For more information, see
Object templates, page 377.
2 Double-click in the Filter definition pane. The Filtering Options dialog
box opens.
3 Select Add an Attribute qualification and click OK. The Attribute
Qualification pane opens.
Advanced Reporting Guide Advanced Filters 4
2011 MicroStrategy, Inc. Importing and exporting elements for attribute qualifications 167
4 Select an attribute by dragging the attribute from the Object Browser into
the Attribute box.
5 Select any form except Elements from the Qualify On drop-down list.
6 Select In list or Not in list from the Operator drop-down list.
7 Click Import to import the filter elements. The Import Elements from File
dialog box opens.
8 Select the Excel file or text file that contains the attribute elements.
9 Click OK to close the Attribute qualification pane.
10 Save and close the filter.
To export filter elements
1 In Desktop, select File, point to New, and then choose Filter. The Filter
Editor opens.
If the New Filter dialog box is displayed, click the Empty Filter icon. If
you do not want this dialog box to be shown in the future, select Don't
show this dialog in the future. Click OK. For more information, see
Object templates, page 377.
2 Double-click in the Filter definition pane. The Filtering Options dialog
box opens.
3 Select Add an Attribute qualification and click OK. The Attribute
Qualification pane opens.
4 Select an attribute by dragging the attribute from the Object Browser into
the Attribute box.
5 Select any form except Elements from the Qualify On drop-down list.
6 Select In list or Not in list from the Operator drop-down list.
7 In the List field, type the element IDs, descriptions, or other items,
separated by a comma, as shown in the example below:
Advanced Filters Advanced Reporting Guide 4
168 The attribute level of set qualifications: Output level 2011 MicroStrategy, Inc.
Central,Mid-Atlantic,Northeast
You can drag and drop elements from the Object Browser, but you
must type a comma between each item. If you drag and drop
elements, they are enclosed in double quotes. If you export to an
Excel spreadsheet, the quotes are not exported, but if you export to
a text file instead, the quotes are exported.
8 Click Export to export the filter elements. The Export Elements to File
dialog box opens.
9 Navigate to the directory in which to save the file.
10 Type a File Name.
11 By default, the file is saved as an Excel spreadsheet. To change it to a text
file, select Text Files from the Save as type drop-down list.
12 Click Save to save the export file and return to the Filter Editor.
13 Click OK to close the Attribute qualification pane.
14 Save and close the filter.
The attribute level of set qualifications: Output
level
The output level of a set qualification specifies the attribute level at which the
metric or set is calculated for the qualification. For example, if a metric set
qualification is Sales > 1000, Sales could mean sales per day, month,
category, or region.
You can select the attributes to use as the output level for either a metric
qualification or a relationship qualification. For a metric qualification, you
can set the output level to the level of the report or the metric instead. For
details and examples, see the following sections:
The output level of relationship qualifications, page 169
The output level of metric qualifications, page 170
Advanced Reporting Guide Advanced Filters 4
2011 MicroStrategy, Inc. The attribute level of set qualifications: Output level 169
The output level of relationship qualifications
The output level of a relationship qualification specifies the attribute level at
which the set is calculated for the qualification. It controls the contents of the
relationship qualification output. You select the attribute or attributes to use
as the output level.
For example, you need a report that lists customers from the same region as
a specific customer. This example uses Hugh Abarca as the specific
customer. Create a relationship qualification to link the Customer Region
and Customer attributes, and then filter that relationship on Hugh Abarca.
Since the report needs to filter on Customer Region, the relationship
qualification must return that attribute. This is the purpose of the output
level, which specifies the attribute level of calculation for the set.
To build this sample report, first create a filter with an attribute qualification
for Customer = Hugh Abarca. Then create a second filter with the following
qualification:
Type: Relationship
Output Level: Customer Region
Filter Qualification: the filter for Customer = Hugh Abarca
Relate Output level and Filter qualification: Use System Default
Advanced Options: Clear the Also apply this qualification
independently of the relationship filter check box
You can also enter the custom expression by doing either of the
following:
Drag objects from the Object Browser into the Custom
expression box. Select the operators you want to use from the
toolbar above the Custom expression box, or simply type them.
Use the Insert Function Wizard to guide you through the process
of creating an expression that uses a function, by clicking f(x) on
the toolbar above the Custom expression box. (For details, click
the Help menu.)
6 Click Validate to validate the expression. This helps ensure you spelled
and punctuated the expression correctly.
7 Click OK to close the Advanced Qualification pane.
8 Click Save and Close to save the filter and close the Filter Editor.
Example: Test the length of last names
In this example, your marketing manager needs a list of people with last
names greater than 15 characters long. She needs this type of list because
customers with such names are not receiving your advertising brochures due
to misprinting on the envelopes that you have been using.
To produce the list of names, within MicroStrategy Tutorial, create a custom
expression qualification filter using the instructions in Custom expression
qualification filters, page 178. In the Custom expression box, type the
following custom expression:
Length(Customer@[Last Name]) > 15
The string-manipulation function Length measures the Last Name form of
the Customer attribute elements in your data warehouse. If the length of a
particular Customer attribute element is greater than 15 characters long, the
Advanced Filters Advanced Reporting Guide 4
180 Custom expressions and database-specific functions 2011 MicroStrategy, Inc.
custom expression statement evaluates as true, and the Customer attribute
element is included in your data set. If the length of the attribute element is
15 characters or less, however, the statement evaluates as false, and that
element is filtered out of the data set on your report.
A report that uses a filter based on the custom expression above appears
below.
The Last Name form is displayed on the report above. Note that in each
entry, the Last Name is greater than 15 characters long.
Be sure to specify the attribute form that you are testing. Moreover, if
the attribute form is composed of two or more wordsas in the above
example, where Last Name was usedenclose the attribute form in
brackets or your custom expression will not be validated.
Example: Test the shipping hour of orders
In this scenario, the shipping company you use is trying to reduce costs by
shipping more uniformly throughout the day, and it offers your company a
new plan that includes discounts for any packages picked up from your
facility between 4 A.M. and 6:59 A.M. To predict whether or not your
company would benefit from switching to this plan, your shipping manager
requires a list of orders shipped in the three-hour time period specified.
To produce this report, create a custom expression qualification filter using
the instructions in Custom expression qualification filters, page 178 to test
Advanced Reporting Guide Advanced Filters 4
2011 MicroStrategy, Inc. Custom expressions and database-specific functions 181
the hour of the Ship Date/Time attribute in your data warehouse. Notice the
syntax required for the custom expression.
The expression is actually composed of two parts joined by a logical operator,
AND. The first part tests whether the Hour component of the Ship
Date/Time attribute element being tested is greater than 3. In other words,
the first part checks to see whether the item is shipped at 4 A.M. or later.
Similarly, the second part of the custom expression tests whether the Hour
component of the Ship Date/Time attribute element tested is less than
7that is, that the time is no later than 6:59:59 A.M. Since the two parts are
joined by a logical AND, the custom expression tests whether the Ship
Date/Time attribute element is between 4:00 A.M. and 6:59:59 A.M.
Executing a report using a filter based on the custom expression above yields
results similar to those below.
Notice that every Order element listed shipped between 4 A.M. and 6:59
A.M.
Generally, you must know the structure of your data warehouse to use
relationship qualifications.
Relationship qualification filters are created using either the Set
Qualification or the Advanced Qualification option in the Filter Editor.
Choosing the Set Qualification option provides a wizard to guide you through
this process, while the Advanced Qualification option allows you to enter
custom expressions. For more information on using the wizard, see the
Building Query Objects and Queries, for Designers chapter of the
MicroStrategy Basic Reporting Guide.
Syntax of custom expressions in relationship qualification filters
The following syntax is used to create a relationship qualification filter using
a custom expression:
<relation; filter qualification>
{list of output attributes}
where:
The relation can be a fact, a table, or an empty filter. The fact or table
chosen provides a means for MicroStrategy to relate either two attributes
which are not in the same hierarchy, or an attribute and a metric. You
must know the structure of your data warehouse to choose an appropriate
fact or table through which MicroStrategys engine can provide the
necessary database joins to relate either the two attributes or the attribute
and metric that you choose.
The right side of the expression is actually #1, but that argument is
replaced with STRATEGY in this example.
Company@DESC sets the first argument as the description form of the
Company attributeinstead of the ID form or any other attribute form
that exists.
STRATEGY is the second argument, a string that does not vary.
Using the filter on a report containing Company and Department generates
the report below. Note that no matter how the Company attribute element
Advanced Filters Advanced Reporting Guide 4
190 Custom expressions and database-specific functions 2011 MicroStrategy, Inc.
has been spelled or capitalized, the report includes the element as long as it
contains the string strategy.
Remember to save any objects that you create under a different name,
so that you do not overwrite the samples in the MicroStrategy
Tutorial.
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:
1 Select My Preferences from the Tools menu.
2 Choose the Editors tab.
3 Click Filter Options.
4 Select Show advanced qualification, if it is not already selected.
5 Click OK to return to Desktop.
Open the Basic Report. Note that Leanne Sawyers revenue is $316,786. This
is sales for all time and all categories. You need to see revenue for specific
quarter and category combinations, for example, electronics in Q1 2003 and
music in Q3 2003. To do this, switch to Design View and create a joint
element list, as described below.
Advanced Reporting Guide Advanced Filters 4
2011 MicroStrategy, Inc. Joint element lists: Grouping elements from multiple attributes 195
To create a joint element list
1 Double-click in the Report Filter pane to add a new qualification.
2 Select Add an Advanced Qualification and click OK. The Advanced
Qualification pane opens.
3 Select Joint Element List from the Option pull-down list.
4 Select Category and Quarter from the Available attributes list and click >
to add them to the Selected attributes list.
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.
7 Double-click Electronics to change the category.
8 Select Quarter from the Available Elements drop-down list.
9 Double-click Q1 03 to change the Quarter.
10 Click OK to return to the Advanced Qualifications dialog box.
11 Click the Add icon to add another element. Again, the first value in each
attribute is added by default.
12 Select the new element and then repeat steps 6 through 10, this time
changing Category to Music and Quarter to Q3 03.
13 Click OK to save the new qualification.
Execute the report. The results are displayed below:
When you embed a copy of the filter in the report, changes that you
make to the stand-alone filter are not propagated to this report.
Changes that you make to the embedded filter within this report are
not propagated to the filter. This is also called a local filter.
Create a filter at the same time that you create a new report. This filter is
embedded within the report and cannot be used in another report. For
instructions, see the Desktop Help or the Building Query Objects and
Queries, for Designers chapter in the MicroStrategy Basic Reporting
Guide.
When you save a report that contains a stand-alone filter, you can choose to
keep the shortcut or to embed a copy of the filter in the report. For
instructions, see Saving a report with a shortcut to a stand-alone filter,
page 200.
Analysts of report data can also apply filtering conditions to a report, for the
individual instance of the report that they are currently viewing. This is
called a view filter, and requires the MicroStrategy OLAP Services product.
For steps to use a view filter, see the Desktop Help.
If you drag and drop the filter into the Report Filter definition
pane, the filter is embedded as a copy.
5 Save the report. If you added the filter as a shortcut, you must save the
report with the shortcut to retain that functionality. See To save a report
with a shortcut to a stand-alone filter, page 201 for instructions.
Saving a report with a shortcut to a stand-alone filter
When you save a report that contains a stand-alone filter, you can choose to
save the filter as either a copy or a shortcut.
When you create a shortcut to a stand-alone object, changes that you
make to the object are propagated to this report and to all other reports
that use the object as a shortcut. Changes that you make to this object
within this report are propagated to the object, and to all other reports
Advanced Reporting Guide Advanced Filters 4
2011 MicroStrategy, Inc. Shortcut vs. embedded filters 201
that use the object as a shortcut. Use this option to share report caches.
This is sometimes referred to as a linked template or filter.
The engine uses its internal logic to create the bands based on the
banding points that you specify.
For example, you want to create a report with two bands, one band
showing the top 10 stores and the second band showing stores 11-100. For
this, you must use three points1, 10, and 100as shown in the following
figure.
To show a band of the bottom 10 stores and then the remaining, use the
same points in reverse order, that is, 100, 10, and 1.
Advanced Reporting Guide Custom Groups and Consolidations 5
2011 MicroStrategy, Inc. About custom groups: Grouping attribute elements with banding and filtering 211
Band for each distinct metric value: to create a separate band for each
value calculated by the metric. This type of banding qualification directly
uses the results of a metric as bands. It is very useful with metrics that
already contain the logic needed to calculate sequential band numbers.
Such metrics use mathematical formulas, NTile functions, Band
functions, or Case functions.
For example, a metric uses the NTile function to group revenue values
into three groups. The custom group element is therefore sliced into three
bands as well.
Banding points example
Report requirements
You want to create two reports that rank employees according to the revenue
that each employee generates.
1 Based on their revenue, the first report should segregate the employees
into the following three groups: Top for the top 10%, Next for the next
40%, and Lowest for the lowest 50%.
2 Based on their revenue, the second report should segregate the
employees into the following three groups: Lowest for the lowest 10%,
Next for the next 40%, and Top for the top 50%.
Solution
To create the first report in Desktop, create a custom group called Employee
Revenue and specify the banding points as 0, 10, 50, and 100. Create a report
Custom Groups and Consolidations Advanced Reporting Guide 5
212 About custom groups: Grouping attribute elements with banding and filtering 2011 MicroStrategy, Inc.
that uses this custom group. A sample report is shown in the following
image.
The engine considers 0 as the highest banding point and 100 as the lowest
banding point; hence, based on the revenue, it places the highest 10% of
employees in the first band and so on.
To begin creating the second report, define a custom group called Employee
Revenue and specify the banding points in reverse order, that is, specify the
banding points as 100, 90, 50, and 0.
Again, the engine applies the same logic. It considers 0 as the highest
banding point and 100 as the lowest banding point. Based on the revenue, it
places the lowest 10% of employees in the first band, the next 40% of
Advanced Reporting Guide Custom Groups and Consolidations 5
2011 MicroStrategy, Inc. About custom groups: Grouping attribute elements with banding and filtering 213
employees in the second band, and the highest 50% of employees in the third
band as shown in the following figure.
Metric value banding example
Report requirements
You want to create a report that ranks regions based on their revenue and
provides the profit margin for each. The groups are Top Performers, Average
Performers, and Under-performers.
Solution
First, create a metric that uses the NTile function to create three groups
based on revenue. Use that metric in a custom group that bands based on
metric value and for each metric value. Change the band names to Top
Performers, Average Performers, and Under-Performers. Create a report
Custom Groups and Consolidations Advanced Reporting Guide 5
214 About custom groups: Grouping attribute elements with banding and filtering 2011 MicroStrategy, Inc.
that uses this custom group. A sample Desktop report is shown in the
following image.
Note that this custom group shows the element names and items within the
element. For more information on this option, see Custom group structure
on reports, page 214.
Custom group structure on reports
Custom groups give a natural hierarchical structure to their elements. 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. For
example, in a Ranking custom group, the top-level element is Sales, which
can be separated into the bands of Top Cities, Average Cities, and Bottom
Cities. Each band can be further divided into elements such as San Diego and
Berlin. By default, only the element names are displayed on the report, as
shown in the following report sample in Desktop.
If you change the display option of the custom group element in the Custom
Group Editor, this division can be displayed in more detail. For example, the
Advanced Reporting Guide Custom Groups and Consolidations 5
2011 MicroStrategy, Inc. About custom groups: Grouping attribute elements with banding and filtering 215
following is the same report with the element names and individual items
displayed.
While hierarchical display is similar to drilling on a report, drilling requires
additional executions of the report. However, drilling allows you to
manipulate a report on the fly.
To view custom groups in a hierarchical structure on a report, you must:
Expand the item display of at least one custom group element
Enable hierarchical display for the custom group
Display the hierarchical view in the report
Custom Groups and Consolidations Advanced Reporting Guide 5
216 Creating a custom group 2011 MicroStrategy, Inc.
These tasks are completed at different levels and in different Desktop
interfaces, as described in the following table.
Steps are below to create a custom group in MicroStrategy Web. For detailed
instructions on setting all the options, in the Custom Group Editor click
Help.
Creating a custom group
The steps below show you how to create a custom group in MicroStrategy
Web. For steps to create a custom group in Desktop, see the Desktop Help.
Prerequisite
You must have the Web Use Custom Group Editor privilege to access the
Custom Group Editor.
Level Target Interface Settings
Element Individual custom
group element
Display Options in
Custom Group Editor
Display:
Only the element names
Only the individual items within this element
The element names, individual items, and
expand the items if possible
The individual items and expand them if
possible
Note: The last option is available only for
banding.
Custom
group
All elements of a
custom group
Options in Custom
Group Editor
Enable hierarchical display
Enable subtotals
Position of element headers
Report All custom groups
on a report
Report Data Options
in Report Editor
Display custom groups in hierarchical or flat
view
Report Individual custom
groups
Report Data Options
in Report Editor
Enable subtotals
Project All custom groups
in a project
My Preferences in
Desktop
Show advanced qualification in Custom
Group Editor
Show all prompt buttons in Custom Group
Editor
Show tip boxes in Custom Group Editor
Trim leading spaces
Advanced Reporting Guide Custom Groups and Consolidations 5
2011 MicroStrategy, Inc. Editing and formatting a custom group 217
To create a custom group
1 Browse to the folder in which to create the new custom group, then click
the Create Custom Group icon. The Custom Group Editor is
displayed.
2 Type a name for the custom group in the Enter Custom Group Name
Here field.
3 Type a description for the custom group in the Enter Custom Group
Description Here field.
To define custom group elements
4 Click New Custom Group Element. The Condition Editor opens.
5 Define the conditions to use to filter data by selecting an attribute, metric,
report, or filter, then specifying the appropriate options. For detailed
steps to define a condition, click Help in the Condition Editor.
6 Specify a name for the custom group element by clicking on the name of
the element and typing a name in the field.
7 Repeat the steps above, beginning at To define custom group elements, to
define additional custom group elements.
To save the custom group
8 Click Save. The Save As dialog box opens.
9 Browse to the location to save your custom group in, then click Save.
10 Click OK to return to the Custom Group Editor.
Editing and formatting a custom group
You can use any of the following ideas to further design your custom group
so it appears on reports the way that you want it to:
Changing the position of element headers, page 218
Enabling subtotals for custom groups, page 219
Custom Groups and Consolidations Advanced Reporting Guide 5
218 Editing and formatting a custom group 2011 MicroStrategy, Inc.
Sorting custom groups, page 220 (based on attribute ID or metric value)
Determining custom group interaction with the report filter, page 223
Prompted custom groups, page 224
You can also edit the custom group elements and the conditions in a custom
group element. For steps, see Editing custom group elements, page 224 and
Editing the conditions in a custom group element, page 226.
Changing the position of element headers
You can change the position of the element headers relative to the custom
groups elements. You can choose to display the element headers at the top
or bottom position, or inherit the default custom group definition. For this,
you must set the display option of the custom group to display both the
element headers and its elements. If the display option of the custom group
is set to display only either the element header or the elements, you cannot
change the position of the element headers.
For example, the following Desktop report displays the element headers
below their respective elements:
Advanced Reporting Guide Custom Groups and Consolidations 5
2011 MicroStrategy, Inc. Editing and formatting a custom group 219
Enabling subtotals for custom groups
As shown in the table in Custom group structure on reports, page 214, you
can enable custom group subtotals at the report or custom group level.
The report level is governed by the Report Data Options, which allow you
to disable or enable subtotals for each custom group on a particular
report. For example, a report contains two custom groups. You can
choose to subtotal on the Age Groups custom group but not on the
Customer Deciling group. Alternatively, you can use the default setting,
which is determined in the Custom Group Editor.
The setting in the Custom Group Editor allows you to enable or disable
subtotals for a particular custom group, regardless of the report in which
it is used.
Changing the position of totals
You can change the position of the totals for the custom group. This option is
enabled only if subtotals have been enabled for the custom group. You can
choose to display the totals at the top or bottom position, or inherit the
default custom group definition.
For example, the following Desktop report displays the Total Revenue at the
top of the report:
Custom Groups and Consolidations Advanced Reporting Guide 5
220 Editing and formatting a custom group 2011 MicroStrategy, Inc.
Sorting custom groups
A custom group is a convenient method to group attributes at the display
level. Therefore, by default, custom groups are not sorted on reports and you
cannot use the sort accessible from the toolbar or right-click menu option to
sort custom groups. However, you can use the advanced sorting functionality
to sort a custom group in either of the following ways:
Sort on the IDs of the attributes that compose the custom group.
Inherit the attribute sort, which uses the default sort of the attribute that
is set to display first. The display order is set in the Report display forms
list on the Attribute Editor Display tab. The default sort for each form is
determined in the New Attribute Form dialog box.
For example, a custom group uses the Call Center attribute, which has both a
numeric ID and a description. The description is defined to display on
reports, and its default sort is ascending. If the sort criteria is defined to
inherit the attribute sort, the custom group is sorted in alphabetical order by
the description, as shown below when displayed in Desktop:
Advanced Reporting Guide Custom Groups and Consolidations 5
2011 MicroStrategy, Inc. Editing and formatting a custom group 221
If ID sort is used, the custom group is sorted by the numeric ID of the
attribute, as shown below:
These settings are found in the Criteria column on the Sorting dialog
box, which is accessed from the Advanced Sorting option on the
Data menu in Desktop. For steps to sort custom groups, see the
Desktop Help.
Sorting by metric values of items
You can use the Keep Group Structure option to sort by the metric values of
the items in each custom group element. For example, the Areas custom
group used previously is defined to display the individual items within its
Custom Groups and Consolidations Advanced Reporting Guide 5
222 Editing and formatting a custom group 2011 MicroStrategy, Inc.
elements. It is placed on a report with the Revenue metric. Before sorting,
the report is displayed in Desktop as shown below:
To sort each Call Center (item) within each area (element), add the custom
group as a sort and change the Criteria to Keep Group Structure. Add the
metric as a second sort. The report now displays the call centers in order of
their revenue values, within each element:
Advanced Reporting Guide Custom Groups and Consolidations 5
2011 MicroStrategy, Inc. Editing and formatting a custom group 223
Determining custom group interaction with the report filter
You cannot combine a banding qualification with another type of
qualification (such as attribute qualification or metric qualification) in a
custom group element. However, you can add that qualification to the report
filter so that it will determine the values of the custom group elements. You
can then specify how the custom group interacts with the report filter.
When a custom group that uses attribute qualifications is included on a
report with a report filter, the report filter is always applied to the individual
custom group elements. However, if you create a custom group using metric
qualifications or banding qualifications, by default the report filter is not
applied to the custom group elements.
Incorrect data can be returned in some scenarios. For example, a custom
group displays revenue totals for customers in columns that represent the
range of revenue that the customer has contributed. A customer that has
contributed $7,500 in revenue is shown in the column for customers that
contributed $5,000 to $10,000 in revenue. This custom group is included on
a report that has a report filter that restricts results to data only for the year
2007.
In this scenario, the report filter is evaluated after the custom group. If the
same customer that has a total of $7,500 only had $2,500 in 2007, then the
report would only display $2,500 for that customer. However, the customer
would still show in the $5,000 to $10,000 in revenue range because the
custom group did not account for the report filter.
You can define the interaction between the report filter and the custom
group to avoid this scenario, by using the Custom Group interaction with
report filter property. This property has the following options:
No interaction - static custom group: Report filter qualifications are
not applied to custom groups that use metric qualifications or banding
qualifications. Filtering is applied only after the custom group has been
evaluated.
Apply report filter to custom group: Report filter qualifications are
applied to custom groups and are used to determine the values for each
custom group element.
Apply report filter to custom group, but ignore related elements
from the report filter: Report filter qualifications that do not qualify on
attribute elements that are used to define the custom group elements are
applied to custom groups. These filter qualifications are used to
determine the values for each custom group element. For example, a
Custom Groups and Consolidations Advanced Reporting Guide 5
224 Editing and formatting a custom group 2011 MicroStrategy, Inc.
report filter that qualifies on the Customer attribute is not applied to a
custom group that also uses the Customer attribute to define its custom
group elements.
Notice that elements are formatted as dollars ($) and percentages (%)
in the same consolidation. You can format individual consolidation
elements in the Consolidation Editor. However, element value
formatting cannot be overridden by report formatting. To apply
report formatting on element values, element values must be set to
the default formatting. For details on the interaction of formatting
layers, see Order of layers, page 337.
Custom Groups and Consolidations Advanced Reporting Guide 5
232 Consolidations: Grouping attribute elements with arithmetic and logical operators 2011 MicroStrategy, Inc.
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:
Elements from the same attribute, such as two cities
Attribute elements from different levels of the same hierarchy, such as
Region and Call Center in the Geography hierarchy
Elements from attributes in different hierarchies, such as Country (from
the Geography hierarchy) and Year (from the Time hierarchy)
Existing consolidation elements, such as the ratio of Spring and Summer
sales to Fall and Winter sales
Elements from any other consolidation in the project, that is, elements
imported from an existing consolidation into another one
You can combine the elements with simple mathematical expressions. For
example, you can have an expression that adds attribute elements together,
such as combining June, July, and August to get a Summer consolidation
element. A consolidation element can also contain the logical operator AND.
The following example demonstrates the use of mathematical expressions
(addition and subtraction) and the AND operator.
Example of AND used in a consolidation element expression
You must report on the difference in revenues between the USA and Web for
the winter of 2002 . Create the following consolidation elements:
USA: Winter 2002
({Month=Jan 02 AND Country=USA} + {Month=Feb 02 AND
Country=USA} + {Month=Mar 02 AND Country=USA})
Web: Winter 2002
({Month=Jan 02 AND Country=Web} + {Month=Feb 02 AND
Country=Web} + {Month=Mar 02 AND Country=Web})
You cannot type AND into the expression. You must drag and drop an
attribute element into the expression to trigger the AND operator. For
more details, see the online help.
Advanced Reporting Guide Custom Groups and Consolidations 5
2011 MicroStrategy, Inc. Consolidations: Grouping attribute elements with arithmetic and logical operators 233
Create a consolidation element that uses the above elements to calculate the
difference:
USA - Web: Winter 2002
([USA: Winter 2002] - [Web: Winter 2002])
Finally, create a report with this consolidation and the Revenue metric. The
report looks like the following:
Elements from the same attribute
A consolidation can contain elements from the same attribute, such as
(March) and (April), both elements of the attribute Month of Year. With
reference to the previous example, consolidation elements allow you to
expand the consolidation to see the values for each month. For example,
using elements from the same attribute, you can modify the report result set
as follows by adding the following three elements to the consolidation:
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.
A consolidation can contain any expression on the pairs of elements, such as
(March - April). Using another example, an element expression can also be
[DC, 2002] / [DC, 2003].
Custom Groups and Consolidations Advanced Reporting Guide 5
234 Consolidations: Grouping attribute elements with arithmetic and logical operators 2011 MicroStrategy, Inc.
Elements from different levels of the same hierarchy
A consolidation can contain elements from different levels within the same
hierarchy, such as Item and Subcategory from the Products hierarchy. For
example, you may want to compare the contribution of different items to the
Subcategory sales. Your consolidation, for the items Chocolate Roses and
Chocolate Spoons, looks like:
Element 1 (Roses percent)
[{Item=Chocolate Roses} / {Subcategory=Chocolate}]
Element 2 (Spoons percent)
[{Item=Chocolate Spoons} / {Subcategory=Chocolate}]
With the use of consolidation elements, the report displays the following.
Elements from attributes in different hierarchies
A consolidation element can contain elements from attributes in different
hierarchies. For example, you can calculate the difference between two
different regions for a particular month. For the months March and April,
the consolidation could contain the following elements:
Element 1 (March Southeast - Southwest)
[Month of Year=March AND Region=South-East]
- [Month of Year=March AND Region=South-West]
Element 2 (April Southeast - Southwest)
[Month of Year=April AND Region=South-East]
- [Month of Year=April AND Region=South-West]
The report now appears as follows:
Advanced Reporting Guide Custom Groups and Consolidations 5
2011 MicroStrategy, Inc. Consolidations: Grouping attribute elements with arithmetic and logical operators 235
Existing elements
Using existing elements allows you to perform row level math, as described
previously. For an example, see Perform row level math, page 231.
Importing elements from other consolidations
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.
For example, a report contains the Dollar Sales metric and two
consolidations. One consolidation is Seasons, as discussed in the previous
examples. The other is called Years and is composed of three elements: 2002,
2003, and 2002/2003. The row for Spring 2002/2003 can be calculated
either as (March 2002 + April 2002 + May 2002) / (March 2003 + April
2003+ May 2003) or as (March 2002 / March 2003) + (April 2002 / April
2003) + (May 2002 / May 2003). When the first calculation is used, that is,
the Seasons consolidation is evaluated first, the following report results.
Custom Groups and Consolidations Advanced Reporting Guide 5
236 Consolidations: Grouping attribute elements with arithmetic and logical operators 2011 MicroStrategy, Inc.
When the second calculation is used, that is, the Years consolidation is
evaluated first, the following report results. Notice the difference in the
2002/2003 rows.
The evaluation order is set in the Report Data Options dialog box of the
Report Editor when you create the report. To access this dialog box, select
Report Data Options from the Data menu.
Consolidations and SQL
The calculations associated with a consolidation are done by the Analytical
Engine component of Intelligence Server. The SQL Engine writes the SQL
query that gets the required data from the warehouse, and then passes it to
the Analytical Engine to do any mathematical operation that is needed to
create the report.
For example, the following SQL is for the dollar sales by season report
discussed in Create a virtual attribute, page 230.
Notice that the seasons are not mentioned in the SQL. The query
retrieves the data for the Months of Year, and then the Analytical
Engine performs the necessary calculations to present the data in
terms of seasons.
select a12.[MONTH_OF_YEAR] AS MONTH_OF_YEAR,
max(a13.[MONTH_OF_YEAR_NAME]) AS MONTH_OF_YEAR_NAME,
a12.[YEAR_ID] AS YEAR_ID, sum(a11.[TOT_DOLLAR_SALES]) as
DOLLARSALES
from [MNTH_CATEGORY_SLS] a11, [LU_MONTH] a12,
[LU_MONTH_OF_YEAR] a13
Advanced Reporting Guide Custom Groups and Consolidations 5
2011 MicroStrategy, Inc. Consolidations: Grouping attribute elements with arithmetic and logical operators 237
where a11.[MONTH_ID] = a12.[MONTH_ID] AND
a12.[MONTH_OF_YEAR] = a13.[MONTH_OF_YEAR] AND
a12.[MONTH_OF_YEAR] in (3, 4, 5, 6, 7, 9, 10, 11, 12, 1,
2)
group by a12.[MONTH_OF_YEAR], a12.[YEAR_ID]
Consolidations and subtotals
By default, subtotals for consolidations are disabled. This means that while
you can subtotal a consolidation on a report, you cannot subtotal an object
placed to the left of the consolidation on the report. That is, any subtotal
which is defined across the consolidation and its higher levels is not shown
on the report.
For example, the following report contains Year, Month of Year, Category,
and the Revenue metric, in that order from left to right. (Only a portion of
the report is included.) Notice that a consolidation is not included.
Custom Groups and Consolidations Advanced Reporting Guide 5
238 Consolidations: Grouping attribute elements with arithmetic and logical operators 2011 MicroStrategy, Inc.
If you add grand totals, a total is calculated for the entire report, as shown in
the portion of the report displayed below. (Add grand totals by pressing F11.)
If you add subtotals, a monthly total, yearly total, and grand total are
displayed. (Add subtotals by selecting Total on the Subtotals dialog box.)
Selected portions of the report are included below to show monthly and
yearly totals.
If you subtotal across level, you can choose Year, Month of Year, and/or
Category. Subtotaling across levels means to group by attributes to the left of
the selected attribute. In the report below, Category is selected as the
subtotal level, so the subtotals are grouped by month. Selected portions of
Advanced Reporting Guide Custom Groups and Consolidations 5
2011 MicroStrategy, Inc. Consolidations: Grouping attribute elements with arithmetic and logical operators 239
the report are included to show that monthly totals are calculated, but not
yearly totals.
All projects must have a default drill map; you cannot delete it unless
you first specify a new default drill map. The default project drill map
is specified in the Project Configuration Editor.
If you try to delete the only default drill map for a project, a message
indicates that other objects depend on it. When you search for
dependent objects, none are found. The dependent object is the
project itself.
Advanced Reporting Guide Drill Maps 6
2011 MicroStrategy, Inc. Creating custom drill maps and paths 249
In summary, a drill map determines what drill paths are available while
drilling from a report object. By default, the drill paths available to a report
object reflect exactly the drill hierarchies of the project.
Default drill paths: System hierarchy drill paths
Before customizing your drilling options you need to understand how the
default drill paths work.
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.
Filters and drilling
How a reports filter is changed while drilling depends on what part of the
original report is selected when the drill is performed. By default, if an
attribute element on the original report is selected while drilling, then that
attribute element is added to the new filter created for the drill. The filter
from the original report on which you drill is carried over as well. For
example, a report lists revenue by state and contains a filter for the
Electronics category. You select Virginia when you drill to Store. The
resulting report contains Electronics revenue for Virginia stores only. You
can change this default behavior for a drill path in the Drill Map Editor and
for a report in Report Data Options.
The destinations of those drill paths are displayed along with the
destinations you have created. For example, you select a drill map that
drills up to Brand. You already have a drill path up to Subcategory.
When you select Drill and Up, both Brand and Subcategory are
displayed.
You can group drill paths together in the right-click Drill menu by
using the same Set Name for them. This is valid for all drill path
types. Sets cannot cross drill types, so use them to group drill maps
within a single drill type, such as Up.
Drill path properties
The following properties affect how the filter is manipulated:
Apply user filtering conditions
Apply original report filter conditions
These properties are not mutually exclusive; you have four combinations to
choose from, which are listed below. The examples in the list are based on a
report that lists revenue by state and contains a filter for the Electronics
category. Virginia is selected when the report is drilled to store.
Apply both. This is the default. The resulting report contains Electronics
revenue for Virginia stores only.
Apply neither. The drill report includes revenue, by city, for all categories
and all states.
Apply the user selection. The new report displays Virginia revenue for all
categories, listed by store.
Apply the original only. The resulting report shows Electronics revenue
by store for all states.
The other property that affects the filter is Consider other filter
qualifications when resolving metric qualifications in the new report,
which is related to the report filters advanced option. Both determine
whether existing attribute qualifications are merged when the filter is
evaluated. The report filter setting affects the entire report, while the Drill
Map Editor setting applies only when you drill on the report. For more
information on the report filter setting, see Merging attribute qualifications,
Drill Maps Advanced Reporting Guide 6
252 Creating custom drill maps and paths 2011 MicroStrategy, Inc.
page 173. If you select Default in the Drill Map Editor, the report filters
setting is used. Select Yes to consider other qualifications or No to ignore
them, regardless of the report filter setting.
You can also create prompts for use with MicroStrategy Mobile for
iPhone and iPad. For more information on these prompts, see
Prompts for iPhone and iPad, page 859.
Filtering data on attributes, attribute forms, attribute elements,
or metrics: Filter definition prompts
These prompts are used for qualifying on the value of attribute elements and
metrics. The filters affected by these types of prompts can be in the report, in
a filter (which in turn may be used in the conditionality of a metric in the
report), or in an element of a custom group. Background information on
custom groups may be found in Chapter 5, Custom Groups and
Consolidations.
Choose from all attributes in a hierarchy
This type of prompt is used to qualify on one or more attributes in one or
more hierarchies. You are presented with at least one hierarchy and all of the
attributes included in that hierarchy. You can qualify on one or more of those
attributes by choosing an element list or by qualifying on a particular
attribute form. The choices made are included in the filtering criteria in the
report.
To define this type of prompt, you can do one of the following:
Choose a particular hierarchy.
Use the set of hierarchies resulting from a search for hierarchies.
List all hierarchies available in the project.
If you choose to display more than one hierarchy, you can make
qualifications from all hierarchies presented at report runtime.
Qualify on an attribute
This is used to apply conditions or qualifications to an attribute form.
Advanced Reporting Guide Advanced Prompts 7
2011 MicroStrategy, Inc. Types of prompts 261
The user is presented with one or more attributes and may qualify on an
element list or an attribute form of one of them.
To define an attribute qualification prompt, you can either:
Choose a particular attribute.
Present the user with a partial or complete list of attributes that are the
result of a search for attributes available in the project.
Choose from an attribute element list
This option is used to allow the user to choose from a list of attribute
elements to be included in a filter or custom group. This list may be
restricted, at prompt design time. This type of prompt can be used with any
attribute in a project.
The list of elements from which the user can choose can be implemented by:
Selecting all elements associated with an attribute
Providing a partial list of elements by applying a filter on all of the
elements associated with an attribute
Providing a predefined list of elements from which the user can choose
Qualify on a metric
A metric qualification prompt allows a user to qualify on a metric. The user is
presented with one or more metrics, and may choose one on which to qualify.
The choice of metrics can be defined by:
Specifying a single metric for run-time use
Specifying a search object to restrict the list of metrics from which the
user can choose
Example: Filter definition prompt
For procedures to create object prompts, see the Desktop Help or the
Building Query Objects and Queries, for Designers chapter of the
MicroStrategy Basic Reporting Guide.
Report requirement
Create a report displaying item sales. At runtime, the user can select whether
to calculate sales at the Category or the Subcategory level.
Solution
Create an object prompt with Category and Subcategory. Create the Sales
metric, using the object prompt as the target of the level (dimensionality).
When the report is executed, the user is prompted to select either Category or
Subcategory. Based on the users choice, the Sales metric is calculated
accordingly.
Report requirement
Create a report displaying item sales. At runtime, the user can select whether
to calculate sales at the level of Category, Subcategory, or Age Groups.
Solution
Create an object prompt with the Category and Subcategory attributes, as
well as the Age Groups custom group. Create the Sales metric, using the
object prompt as the target of the level (dimensionality). When the report is
executed, the user is prompted to select Category, Subcategory, or Age
Groups. Based on the users choice, the Sales metric is calculated
accordingly.
Advanced Prompts Advanced Reporting Guide 7
264 Types of prompts 2011 MicroStrategy, Inc.
Report requirement
The sales manager frequently asks her analysts to provide similar reports
with minor changes to the metrics. She always wants a metric to calculate
revenue for each employee. In addition, she sometimes wants to compare the
results of each employee to the revenue results of the best or the worst
employee. Other times, she wants to compare the results of each employee to
the average revenue of all the employees.
Solution
Rather than create many different reports, you would like to provide the
sales manager with the flexibility to select the analytical function she wants
at the time of running the report.
In this case you can give her three functions to choose from:
Minimum
Maximum
Average
When she runs the report, she selects which function to use with the Revenue
metric. Your final report can then display the following objects:
Employee
Revenue metric
Revenue metric that uses the analytical function selected by the user
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:
Date prompts for a date value.
Numeric prompts for a numeric value. Numeric value prompts accept
integers or decimals up to 15 digits of precision.
Advanced Reporting Guide Advanced Prompts 7
2011 MicroStrategy, Inc. Types of prompts 265
Text prompts for any type of text.
Big Decimal prompts for a big decimal value. Big Decimal value prompts
accept integers and decimals up to 38 digits of precision.
For procedures to create value prompts, see the Desktop Help or the
Building Query Objects and Queries, for Designers chapter of the
MicroStrategy Basic Reporting Guide.
Report requirement
Create a report showing sales since a certain date.
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.
Advanced Prompts Advanced Reporting Guide 7
266 Types of prompts 2011 MicroStrategy, Inc.
Example: Currency conversion
Report requirement
An international company is based in the United States, so the data is saved
in dollars in the data warehouse. However, an end user is based in Europe
and wants to see revenue in euros. Create a report that converts revenue in
dollars to euros.
Solution
The report prompts the user for a conversion rate, which is applied to a
revenue metric. If a user wants to see dollars, he can enter a conversion rate
of one.
The high-level steps are:
1 Create a value prompt for the conversion rate.
This report contains 360 rows, so only portions of the report have
been reproduced above.
If the prompt is answered with Subcategory instead, the report looks like the
following. Note that while the Revenue values are still the same, the
Category/Subcategory Revenue amounts change when the Subcategory (not
Advanced Reporting Guide Advanced Prompts 7
2011 MicroStrategy, Inc. Types of prompts 269
shown on the report) changes. The percentages are now greater, since the
item revenue is compared to the subcategory revenue, not the larger category
revenue.
This report contains 360 rows, so only portions of the report have
been reproduced above.
Solution
Create a level prompt with Category and Subcategory. Create a revenue
metric called Category/Subcategory Revenue, using the level prompt as the
target of the level (dimensionality). When the report is executed, the user is
prompted to specify the complete level of the metric, including the target,
filtering, and grouping. The Category/Subcategory Revenue metric is then
calculated accordingly.
To create a new search, click New. The Search for Objects dialog
box opens. Create a new search.
To allow users to choose from all the attributes and hierarchies
available in the project, select List all attributes and hierarchies (no
restriction).
To specify a title and instructions
Think about a name and instructions carefully, with your users in mind.
The title and instructions that you provide for a prompt can make the
Advanced Reporting Guide Advanced Prompts 7
2011 MicroStrategy, Inc. Types of prompts 271
difference between users finding prompted report execution confusing
and users completing rapid report execution that displays exactly the data
they want to see. For examples of effective and ineffective titles and
instructions, see the Building Query Objects and Queries, for Designers
chapter in the MicroStrategy Basic Reporting Guide.
4 Click Next. The General Information page opens.
5 Enter a Title, which is used as the default object name when you save the
prompt, although you can change it.
6 Type text in the Instructions field, which is displayed when the prompt is
run during report execution.
To allow personal answers
Personal answers allow a user to save prompt answers for this prompt,
and then reuse the answers on any report that this prompt is used on. For
more information on personal answers and how they can be used, see the
Building Query Objects and Queries, for Designers chapter in the
MicroStrategy Basic Reporting Guide.
7 To determine whether personal answers can be saved for this prompt,
select one of the following options from the Personal answers allowed
drop-down list:
None: No personal answers can be saved. Every time a user sees the
prompt, he must answer it manually (if it is required).
Single: Only one personal answer can be saved for this prompt. When
the prompt is used again (on this report or a different one), the
personal answer is displayed. A user can keep the personal answer, or
add or delete selections. He can save his changes as a new personal
answer, but only one personal answer can be saved for the prompt.
Multiple: Multiple personal answers can be named and saved,
allowing different answers for the same prompt. When the prompt is
used again (on this report or a different one), the personal answers are
available. The user can select one of them, or answer the prompt
manually.
To define a range within which the users answer must fall
8 To restrict the user to entering values within certain ranges (optional):
Select the Minimum objects check box and enter the lowest number
of objects allowed in the prompt answer.
Advanced Prompts Advanced Reporting Guide 7
272 Types of prompts 2011 MicroStrategy, Inc.
Select the Maximum objects check box and enter the highest number
of objects allowed for the prompt answer.
9 If you choose, you can select the Prompt answer required check box to
require users to answer the prompt before running the report. For
considerations about required and optional prompt answers, see the
Building Query Objects and Queries, for Designers chapter in the
MicroStrategy Basic Reporting Guide
10 Click Next. The Default Prompt Level Selection page opens.
To specify a default prompt level
A default prompt level can allow users to complete report execution more
quickly, since they do not need to answer the prompt, but can simply run
the report using the default level. The levels that you define here are
displayed when the prompt is executed. The user can select the default, or
specify his own level. A default prompt level is particularly useful if a
large percentage of your users will select the same level for this prompt.
By default, the default level is the report level, with standard filtering and
standard grouping. You can remove or edit this level, and add more
levels.
11 To add another level, click Modify. The Select Objects dialog box opens.
Select the object(s) to use as the target(s) from the Available objects list
and click > to move them to the Selected objects list. Click OK to return
to the Prompt Generation Wizard. The objects are added to the default
prompt answer table, with standard filtering and grouping.
The target is the attribute level at which the metric calculation groups.
For more information, see Target: The context of a calculation, page 44.
12 To change the filtering of a level, click in the Filtering column of the level
and select the new filtering option.
Filtering governs how the report filter interacts with the metric
calculation. For more information, see Filtering: Interaction with report
filters, page 52.
13 To change the grouping of a level, click in the Grouping column of the
level and select the new grouping option.
Grouping determines how the metric aggregates. For more information,
see Grouping: How aggregation is performed, page 45.
14 To delete the selected level, click Remove.
Advanced Reporting Guide Advanced Prompts 7
2011 MicroStrategy, Inc. Prompting for a users login name: System prompts 273
15 To return to the default report level and delete any additional levels, click
Reset.
16 By default, the metric filter is applied to the metric calculation. You can
instead exclude filter attributes, so that filter attributes that are not on the
report or in the level of the metric are not included in the metric
calculation. For more information on this behavior, see Level metrics:
Applying the metric condition to the metric calculation, page 75.
To change this behavior, click Advanced, set Filter setting: uncheck
to exclude attributes absent in report or level (dimensionality),
and click OK to return to the Prompt Generation Wizard.
17 Click Finish. The Save As dialog box opens.
To save your prompt
18 Select the folder in which to save the new prompt, enter a name, and click
Save to return to Desktop.
All level prompts must be added to a metric, and then the metric is added to
a report.
Prompting for a users login name: 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.
The User Login system prompt is a special prompt that returns the current
user's user login. The user is not prompted to provide an answer to the User
Login prompt, as the Intelligence Server automatically answers the prompt
with the user's login when prompts are resolved. The User Login system
prompt can be used in conditions in which a text value prompt is used in a
report.
See the MicroStrategy System Administration Guide for details on working
with system prompts.
Advanced Prompts Advanced Reporting Guide 7
274 Defining how a prompt is displayed in MicroStrategy Web 2011 MicroStrategy, Inc.
Defining how a prompt is displayed in
MicroStrategy Web
You can determine how a prompt appears when it is executed in
MicroStrategy Web, by selecting a display style, and then updating the style
properties associated with it. For examples of the display styles, see Display
styles for prompts in MicroStrategy Web, page 275. For descriptions of the
style properties, see Defining how prompts are displayed in MicroStrategy
Web: Style properties, page 278.
For Choose from All Attributes in a Hierarchy, Qualify on an Attribute,
and Qualify on a Metric prompts, you can also configure how the user can
define the attribute or metric qualification in the prompt when the prompt is
executed in MicroStrategy Web. For details, see Configuring how the
qualification can be defined in MicroStrategy Web prompts: Expression
properties, page 281.
Advanced Reporting Guide Advanced Prompts 7
2011 MicroStrategy, Inc. Defining how a prompt is displayed in MicroStrategy Web 275
Display styles for prompts in MicroStrategy Web
The type of prompt determines which display styles are available, as
described in the following table:
Display Style Available for:
Check box Attribute element list prompts
Object prompts
List Attribute element list prompts
Attribute qualification prompts
Metric qualification prompts
Object prompts
Pull down Attribute element list prompts
Attribute qualification prompts
Metric qualification prompts
Object prompts
Advanced Prompts Advanced Reporting Guide 7
276 Defining how a prompt is displayed in MicroStrategy Web 2011 MicroStrategy, Inc.
Radio button Attribute element list prompts
Attribute qualification prompts
Metric qualification prompts
Object prompts
Shopping cart Attribute element list prompts
Attribute qualification prompts
Hierarchy prompts
Metric qualification prompts
Object prompts
Display Style Available for:
Advanced Reporting Guide Advanced Prompts 7
2011 MicroStrategy, Inc. Defining how a prompt is displayed in MicroStrategy Web 277
Custom prompt styles for MicroStrategy Web
MicroStrategy provides a wide array of prompt styles out of the box, and you
can add custom prompt styles to suit your needs. You can use any custom
prompt styles that your project contains. To use a custom prompt style,
select the Display Style associated with the custom prompt style. Next,
select the custom prompt style from the Custom Style drop-down list. For
more information on custom prompt styles, including instructions to create
them, see the Creating a custom prompt style for MicroStrategy Web topic
in the Desktop Help.
Text box Attribute qualification prompts
Metric qualification prompts
Value prompts
Tree Hierarchy prompts
Display Style Available for:
Advanced Prompts Advanced Reporting Guide 7
278 Defining how a prompt is displayed in MicroStrategy Web 2011 MicroStrategy, Inc.
Defining how prompts are displayed in MicroStrategy Web:
Style properties
All the style properties for determining how prompts are displayed in
MicroStrategy Web are described below. Note that the type of prompt and
the display style determine which style properties are available.
Allow modification of the logical operator: Specifies whether the user,
when the prompt is executed, can change the logical operator (AND, OR,
and so on) of a qualification.
If Allow modification is selected, select one of the following options:
Use a single logical operator between all conditions: The user can
select only one logical operator to join all the conditions of the prompt
qualification.
For a prompt that uses a search object in the prompt definition, the
search root is the directory specified in the Look in field for the
search.
For a prompt that does not use a search object but allows a search (the
Show search box option is enabled), the search root is the project
directory, for example, \MicroStrategy Tutorial.
Allow the user to browse elements in a qualification: Specifies
whether a user, when the prompt is executed, can expand an attribute to
select elements to answer the prompt.
Height: If List height mode is set to Fixed, specifies the height of the
list. If List height mode is set to Automatically, this property is
unavailable.
Items per column/row: Defines the number of items to display in a
column/row of the check box or radio button list.
List height mode: Defines whether the height of the list is either:
You must enable Show search box for the Require search check
box to become available.
Advanced Reporting Guide Advanced Prompts 7
2011 MicroStrategy, Inc. Defining how a prompt is displayed in MicroStrategy Web 281
Width mode: Defines whether the width of the text box or pull-down list
is either:
Select and Qualify: When the prompt is executed, the user chooses
to either select attribute elements or create an attribute qualification,
as described above.
For example, the following prompt, which is being executed in
MicroStrategy Web, contains the radio buttons to select the
expression type:
Default qualification type (Available only if Select and Qualify is
chosen above): Select whether the default qualification type should be
Select or Qualify. The user can change from this default when the
prompt is executed.
Default operator: Select the default operator (such as In List or
Contains) to use in the prompt's attribute qualification. When the prompt
is executed, the user can accept this default operator or select a different
operator, using the Is drop-down list as shown in the samples above.
Allow import elements check box: By default, this check box is cleared,
which indicates that files cannot be imported. Select the check box to
allow a user to load a file containing a list of elements for an In List or Not
in List type of qualification. The file is loaded when the prompt is
executed.
Default operator between conditions: Choose either AND or OR as the
default operator that is used between conditions in the prompt's
definition. When the prompt is executed, the user can accept this default
operator or select the other operator.
For example, the following prompt, shown in MicroStrategy Web, allows
multiple conditions. The user has created a condition on north and
another on south. The AND operator was chosen as the default operator
between conditions, so the All selections option is selected. This report
would not return any results (a word cannot begin with both north and
Advanced Prompts Advanced Reporting Guide 7
284 Defining how a prompt is displayed in MicroStrategy Web 2011 MicroStrategy, Inc.
south), so the user can change the Match option to Any selection
(representing the OR operator). The report will then return all northern
and southern regions.
This report is saved as Sort by Revenue Rank - Report Filter & Report
Limit.
Notice that the report is much smaller than either the Sort by Revenue Rank
- Month Report Filter report or the Sort by Revenue Rank - Report 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.
The first step in creating this report is calculating metrics. The data used in
the metrics is restricted by the report filter, so information from April, May,
and December is not included. All the metrics are calculated using this data,
except for the unfiltered metric, which ignores the report filter. Its values are
calculated on the full years worth of data.
The results after all the metric calculations are completed form the report
data set. The report limit is applied to this data set. The employees with
revenue less than $320,000 (the report limit) are removed from the display
before the report is presented. Because the revenue is calculated on fewer
months than the Revenue Rank - Month Filter report, more employees are
discarded than from the previous limit.
This means that the limit stays the same (greater than $320,000), but the
filter changes the data considered in calculating each employees rank.
Designing Reports Advanced Reporting Guide 8
296 Filters and order of calculation on reports 2011 MicroStrategy, Inc.
A report filter affects the data used to calculate metrics, whereas a report
limit does not affect how the metrics are calculated. Report limits are applied
at the level of the report after the metrics are calculated.
About metric qualifications
A metric qualification is a filtering condition based on the value of a metric.
It contains an output level, which determines the level at which the metric is
calculated and to which attributes the metric applies. Like every filter, a
metric qualification changes the nature of the metric calculations, unlike a
report limit, which is applied after the metrics are calculated.
Recall that the level of the Basic Report is Region and Employeethe
attributes on the report. The output level of the metric qualification can
remain at the report level, or it can be changed.
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.
Example: Metric qualification
Right-click the Sort by Revenue Rank report on the Desktop and select Edit
to edit the report. Add a metric qualification by following the steps that
follow.
Advanced Reporting Guide Designing Reports 8
2011 MicroStrategy, Inc. Filters and order of calculation on reports 297
To add a metric qualification
1 Double-click in the Report Filter pane to add a qualification.
2 Select Add a Set qualification and click OK. A set qualification is based
on a metric or attribute relationships.
3 Click the browse button next to Output Level.
4 Select Calculate the output for the list of attributes. This allows you to
select the output level for the metric qualification.
5 Select Brand under the Products folder and click > to add it to the
Selected objects list.
6 Click OK.
7 Click the browse button next to Metric.
8 Select Revenue in the Sales Metrics folder.
9 Click OK.
10 Keep the Function as Metric Value, but select Greater than from the
Operator drop-down list.
11 Do not change Value, but type 320000 in the box next to it.
12 Click OK.
Execute the report. The results are displayed in the following figure.
Designing Reports Advanced Reporting Guide 8
298 Filters and order of calculation on reports 2011 MicroStrategy, Inc.
In many cases, a report limit can generate more efficient 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.
About the report-as-filter
Report as filter allows you to create a report and use it as a filter to generate
another report. It is a different way to achieve the same results as a metric
qualification. Because the logic used to generate the final report is clearer,
MicroStrategy recommends using it rather than the metric qualification.
You can create this report yourself by starting with the Basic Report.
Note that the Subtotal report has a different format than the Basic
Report. The Subtotal report uses the autostyle named SmallType,
while Basic Report uses Squares.
Designing Reports Advanced Reporting Guide 8
308 Totaling and subtotaling data on reports 2011 MicroStrategy, Inc.
Each region is totaled for each quarter, then each quarter is totaled, and
finally a grand total is calculated. The subtotals use the by position option. To
view how these subtotals are set up, select Subtotals from the Data menu.
Press F11 to toggle the grand total display for reports in Desktop.
Move Region to the left of Quarter and notice that the subtotals change.
Instead of totals by region, by quarter, and then a grand total, the subtotals
are calculated by quarter, by region, and then for all attributes (that is, a
grand total). This dynamic recalculation is a feature of the subtotal by
position option. Return Region to its position between Quarter and
Employee.
Subtotals across levels example
Begin with the Subtotals report, and change the by position subtotals to
across levels.
To set subtotals across levels
1 Select Data, then Subtotals. The Subtotals dialog box opens.
2 Click Advanced. The Advanced Subtotals dialog box opens.
3 Select Across level. A list of report objects is displayed.
4 Select Region from the list of report objects.
5 Click OK, then OK again to return to the report.
Advanced Reporting Guide Designing Reports 8
2011 MicroStrategy, Inc. Totaling and subtotaling data on reports 309
The only totals now are quarterly, as displayed below.
Across levels means group by attributes to the left of the selected attribute.
Since the selected attribute is Region, the only attribute to the left of it is
Quarter, hence the quarterly totals.
As you did with the by position example, move Region to the left. Only grand
total is displayed, because now there is no attribute to the left of Region.
Return Region to its position between Quarter and Employee.
Subtotals group by example
Begin with the Subtotals report, which contains subtotals by position. Sort
the report by region, by right-clicking Region in the grid and selecting Sort,
then Ascending. Notice how the Q1 and Q2 Totals now appear at the bottom
of the report.
Move Region to the right, after Employee. The employees for each region are
displayed, then employee totals for each quarter, with a quarterly total, and
finally a grand total. Now change the by position subtotals to group by.
Designing Reports Advanced Reporting Guide 8
310 Totaling and subtotaling data on reports 2011 MicroStrategy, Inc.
To set group by subtotals
1 Select Data, then Subtotals. The Subtotals dialog box opens.
2 Click Advanced. The Advanced Subtotals dialog box opens.
3 Select Group by. A blank list of group by levels is displayed.
4 Click Add. The Group By Selection dialog box opens.
5 Select Region from the list of attributes on the report.
6 Click OK to return to the Advanced Subtotals dialog box. Notice that
Region has been added to the list of levels.
7 Click OK, then OK again to return to the report.
Now the sort and the subtotals work together to provide regional totals, as
shown below.
Advanced Reporting Guide Designing Reports 8
2011 MicroStrategy, Inc. Totaling and subtotaling data on reports 311
Custom report subtotals
By default, when you use subtotals in a report, the same subtotal function is
used for all metrics in the report. The name of the subtotal is displayed in the
subtotal line items that appear in the report. You can use custom report
subtotals to give you more control over the characteristics of a subtotal.
Custom report subtotals allow you to define custom subtotal line items that
appear on your reports. Custom report subtotals allow you to do the
following:
Customize the subtotal name that appears in the subtotal line item
Define different subtotal functions to be used on different metrics in the
report
Specify the level of each total
Turn off subtotaling for specific metrics on the report
You can make the subtotal name dynamic by typing special characters in the
subtotal name field as listed in the following table.
Attribute display is an OLAP Services feature and you must have the
Use report objects window and Set attribute display privileges to
use this feature. For more information, see the OLAP Services Guide.
If multiple attribute forms are displayed for a single attribute, the report is
still initially sorted in the default order, as set in the Attribute Editor. You
can change the sorting, as described below; sorting set for a report takes
Designing Reports Advanced Reporting Guide 8
318 Sorting data on reports 2011 MicroStrategy, Inc.
precedence over default sorting set for attribute forms. (For details on
attribute forms, see the Attributes chapter of the MicroStrategy Project
Design Guide.) The attribute forms are displayed in the order in which you
added the forms.
The following report contains one attribute, Item, but multiple attribute
forms. The forms displayed are, from left to right, ID, Description, Long
Description, and Price. The report is sorted by ID, by default.
Although the ID is displayed in the leftmost column on this sample, the order
that attribute forms are displayed in the report does not affect how the report
is sorted. It is placed there to allow you to more easily see how the report is
sorted initially. Even if the ID was not displayed on the report, the report
would be sorted by ID by default.
The same report is shown below, sorted by Price, then Description. Notice
the order of the items with a price of $50.
The following procedure re-creates the example report shown above.
Advanced Reporting Guide Designing Reports 8
2011 MicroStrategy, Inc. Sorting data on reports 319
To set up the sample report
1 Create a new report.
2 Add Item to the report.
3 Create a report filter for Category = Electronics.
To add attribute forms and change their display order
4 Select Attribute Display from the Data menu. The Attribute Display
dialog box opens.
5 Select Use the following attribute forms.
6 In the Available forms list, select ID and click > to add it to the
Displayed forms and Report objects forms lists. Repeat with Long
Desc and Price.
7 Re-arrange the forms in the Displayed forms list, using the up and down
arrows on the right side of the Displayed forms box, until the forms are in
the following order:
ID
Desc
Long Desc
Price
8 Click OK to return to the report.
9 Save the report and then execute it.
To sort by attribute forms
10 From the Data menu, select Advanced Sorting. The Sorting dialog box
opens.
11 On the Rows tab, click Add to create a new sort.
12 Change Criteria to Price.
13 Click Add to create another sort.
Designing Reports Advanced Reporting Guide 8
320 Sorting data on reports 2011 MicroStrategy, Inc.
14 Change Criteria to Desc.
15 Click OK. The report is now sorted as shown above.
This same report is shown below, now sorted by Price, then Long
Description. Notice the order of the items with a price of $50. In the previous
sort, the first $50 item was the portable TV, followed by the portable CD
player. Now it is the compact flash, followed by the power TV antenna.
To change the attribute form sort
1 From the Data menu, select Advanced Sorting. The Sorting dialog box
opens.
2 On the Rows tab, click Desc in the Criteria column. From the drop-down
list, choose Long Desc.
3 Click OK. The report is re-sorted, as shown above.
If you remove Price from the report display, but not from the report, the sort
does not change. The report is still sorted by Price, then Long Description.
To remove an attribute form from the report display
1 In Report Objects, right-click Item, point to Attribute Forms, and then
select Price. Price is no longer displayed on the report, but remains in the
Report Objects.
Advanced Reporting Guide Designing Reports 8
2011 MicroStrategy, Inc. Sorting data on reports 321
If you remove Price from the report, the report can no longer be sorted in the
same way. It is re-executed, and sorted by Long Description only, as shown
below. Notice that the first item is now a CardBus as opposed to the TV
antenna of the previous sample.
To remove an attribute form from the report
1 In Report Objects, right-click Price and select Remove from Report. A
message is displayed, indicating that the report must be re-executed for
this manipulation to take effect.
2 Click Yes. The report is re-executed and displayed as shown above.
Designing Reports Advanced Reporting Guide 8
322 Sorting data on reports 2011 MicroStrategy, Inc.
Sorting with null values
You can specify a value to use to replace null values when the report is sorted.
For example, metric values on a report are sorted in descending order but
blank values (or nulls) appear first, as shown below:
You can instead specify that the null values are treated as zeros, so that he
null values will then display at the bottom of the report. The null values still
appear as blanks on the report, as shown below:
To specify a replacement value for null values when the report is sorted
1 From the Data menu, select Report Data Options. The Report Data
Options dialog box opens.
2 In the list of Categories on the left, expand Display, then select Null
Values.
3 Clear the Use Default check box under Null Display settings.
Advanced Reporting Guide Designing Reports 8
2011 MicroStrategy, Inc. Sorting data on reports 323
4 Select the Set the value to be used in place of empty values when the
report data is sorted check box.
5 Type the replacement value (such as 0) in the text box below the check
box.
6 Click OK to save the change and return to the report.
7 If a prompt to re-execute the report is displayed, click Yes.
8 Save the report.
Sorting the page-by list
Pages group report data into logical subsets, and allow you to view one
subset (or page) at a time. Page-by makes viewing a report easier, since users
do not have to scroll through long lists of data. You can specify how the pages
are displayed in the drop-down list of pages, by selecting the sorting order,
the sorting criteria (for example, the attribute form on which to sort), and the
position of the totals in the page list.
For example, the following report contains Region, Employee, the Revenue
metric, and the Rank metric. It is paged by Quarter, so that a user can select a
particular quarter to display. Notice that the Total is displayed first in the
list, followed by quarters from the earliest to the most recent. Sorting the
Designing Reports Advanced Reporting Guide 8
324 Sorting data on reports 2011 MicroStrategy, Inc.
page-by list allowed the report designer to select the order of the quarters
and whether the total is displayed at the beginning or the end of the list.
The following procedure describes how to recreate this example by starting
with the Advanced Sorting report.
To sort a page-by list
To set up the sample report
1 Run the Advanced Sorting report.
2 Move Quarter to the page-by area.
3 Add standard totals by choosing Subtotals from the Data menu, then
selecting Total from the list of available subtotals. Click OK to return to
the report.
4 Click the page-by field and note that the quarters are sorted from the
most recent date to the earliest date, with Total at the end of the list.
Advanced Reporting Guide Designing Reports 8
2011 MicroStrategy, Inc. Formatting a report 325
To sort the page-by list
5 Select Advanced Sorting from the Data menu. The Sorting dialog box
opens.
6 On the Rows tab, click Remove All to delete the previous sort. At the
prompt, click Yes.
7 Click the Pages tab. Notice that the attribute that the report is paged by,
Quarter, is displayed in the Sort By column.
8 Change the Order to Ascending.
9 Change the Total Position to Top.
10 Click OK to return to the report.
Click the page-by field and note that the quarters are sorted from the
earliest quarter to the latest quarter, with the total at the beginning of the
list.
You can sort the page list of any page field on the report. For example, on the
report created above, move Region to the page-by area. By default, the page
list is sorted in ascending alphabetical order, from Central to Web. You can
change the order to descending alphabetical order, or sort and order by the
attribute ID rather than description. The following report sample shows the
region page list sorted by ID, in descending order.
Formatting a report
You can change the general presentation formats and formatting details of a
report to suit your requirements and preferences. You can 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
Designing Reports Advanced Reporting Guide 8
326 Formatting a report 2011 MicroStrategy, Inc.
formatting basics, see the Report Formatting chapter of the Basic Reporting
Guide.
Formatting report cell data
The Format Cells dialog box consists of the following tabs:
Number: Allows you to select the number formatting options, such as
decimal spaces, currency symbol, time format, zip code format, and so
on. If none of the built-in number formats meet your needs, you can
create your own custom number formats using number format symbols.
For more details on custom formatting, see Custom formats, page 326.
Alignment: Determines how the contents of the section are aligned when
the formatting is applied. You can select horizontal and vertical
alignment, as well as select if you would like to wrap the text or not.
Font: Defines the text font for the selected section. You can select the font
name, font style, size, color, and effects.
Border: Defines how the borders are displayed for the selected section.
Background: Defines how to fill the cell background. You can choose
whether the background is a solid color, uses gradient colors (a two-color
combination), uses a pattern, or is transparent to allow what is behind the
cell to show.
Chart: Applies a background pattern and color for a metric when it is
displayed as a series in a graph report.
By default, the chart color that you define for a metric overrides
any default color schemes for the graph report, although you can
disable this metric formatting. For more detailed instructions, see
Defining a graph color for metrics in Desktop, page 449.
Custom formats
Custom formats allow you to create your own formats for data in a report.
You can format text, numbers, and date and time using custom formats.
Once you create a custom format, you can use it in other metrics and report
objects as well. Each custom format can have up to four optional sections,
one each for:
Positive numbers
Advanced Reporting Guide Designing Reports 8
2011 MicroStrategy, Inc. Formatting a report 327
Negative numbers
Zero values
Text
You can specify these sections, separated by semicolons in the order listed
above. If you specify only two sections, the first is used for positive numbers
and zeros, and the second is used for negative numbers. If you specify only
one section, all numbers use the same format.
Numeric data formatting
You can format fractions or numbers with decimal points by including
appropriate digit placeholders in the custom format. This is explained in
detail in the following table:
Symbol Description
0 (zero) Digit placeholder.
If the number contains fewer digits than the placeholders contained in the format,
the number is padded with zeros.
For example, the format code 00000 will display the number 12 as 00012.
If there are more digits to the right of the decimal point than the placeholders in the
format, the decimal portion is rounded to the number of places specified by the
placeholders.
If there are more digits to the left of the decimal point than the placeholders in the
format, the extra digits are retained.
If the format contains zeros to the left of the decimal point, numbers less than one
are displayed with a zero to the left of the decimal point.
# 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.
% This symbol displays the number as a percentage, by multiplying the number by 100
and appending the % character.
Designing Reports Advanced Reporting Guide 8
328 Formatting a report 2011 MicroStrategy, Inc.
Character/text data
You can include formats for text and character data as mentioned in the
following table:
, (comma) Thousands separator.
If the format contains commas separated by #'s or 0's, commas separate the
thousands. Note that the actual thousands separator used depends on the
session locale.
A comma following a placeholder scales the number by a thousand. For example,
using 0, scales the number by 1000, so that 10,000 displays as 10.
. (period) Decimal separator. Note that the actual decimal separator used depends on the
session locale.
E+, E-, e+, e- Scientific notation.
If the format contains a scientific notation symbol to the left of a 0 or # placeholder,
the number is displayed in scientific notation and an E or e is added.
The number of 0 and # placeholders to the right of the decimal determines the
number of digits in the exponent.
E- and e- place a minus sign by negative exponents. E+ and e+ place a minus
sign by negative exponents and a plus sign by positive exponents.
Symbol Description
Symbol Description
text Displays the text inside the quotation marks. Even if the text is a valid formatting
symbol, it is treated as literal text if it appears within quotes.
Use quotation marks around any character that is not a formatting symbol, including
a space, the dollar sign ($), minus sign (-), slash (/), exclamation mark (!), ampersand
(&), tilde (~), curly brackets ({ }), equals sign (=), less than and greater than signs (<
>), and the caret (^). This ensures that the text appears correctly in both Desktop and
MicroStrategy Web.
: In a date/time format, the colon (:) does not need to be enclosed in double quotation
marks (" "). However, to display it in a numeric format, it must be enclosed in quotes.
For example, if you have an integer that must be displayed as 12:34:56, the correct
format is "##":"##":"##".
*(asterisk) This symbol repeats the next character until the width of the column is filled. Only one
asterisk can be used in each format section.
_(underline) This symbol skips the width of the next character. For example, to make negative
numbers surrounded by parentheses align with positive numbers, you can include
the format _) for positive numbers to skip the width of a parenthesis.
Advanced Reporting Guide Designing Reports 8
2011 MicroStrategy, Inc. Formatting a report 329
Date and time
The format codes for formatting days, months, years and time in a report are
given in the following table:
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.
mmm Month abbreviation, such as Jan.
mmmm Month name, such as January.
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.
ddd Day abbreviation, such as Sun.
dddd Day name, such as Sunday.
yy Year number.
Displays the year as a two-digit number, such as 00.
yyyy Year number.
Displays the year as a four-digit number, such as 2003.
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.
Designing Reports Advanced Reporting Guide 8
330 Formatting a report 2011 MicroStrategy, Inc.
Color
You can change the color of data in your report using custom formatting. The
following table lists the format for color codes:
Currency
You can include the following currency symbols in a number format. Keep
the ALT key pressed and type the ANSI code of the currency. The ANSI code
should be followed by the format code for the number.
To type ANSI code for the currency symbol, turn on NUM LOCK and
use the numeric keypad. As you type the ANSI code, the Custom box
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.
AM/PM
am/pmA/P a/p
12-hour time.
Displays time using a 12-hour clock. Displays AM, am, A, or a to display time
between midnight and noon; displays PM, pm, P, or p to display time between noon
and midnight.
[h] Displays the total number of hours.
[m] Displays the total number of minutes.
[s] Displays the total number of seconds.
Symbol Description
Symbol Description
[Black] Displays cell text in black.
[Blue] Displays cell text in blue.
[Cyan] Displays cell text in cyan.
[Green] Displays cell text in green.
[Magenta] Displays cell text in magenta.
[Red] Displays cell text in red.
[White] Displays cell text in white.
[Yellow] Displays cell text in yellow.
Advanced Reporting Guide Designing Reports 8
2011 MicroStrategy, Inc. Formatting a report 331
appears blank. The currency symbol is displayed only when you finish
typing the code.
Conditional symbols
You can apply conditional formatting to monitor the data in your report.
Custom number formatting examples
The following table lists examples of custom number formats. It includes the
formatting symbols, the report data, and how that data is displayed after
using the formatting.
Hold the ALT
key down and
type this code
To display
0162
0163
0165
0128
Symbol Description
[conditional value] Designates a different condition for each section. For example, data in a column
has values ranging from 200 to 800 and you want the text Poor to be displayed in
black for values less that 400, the text Good to be displayed in Red for values
greater than 600, and the text Average to be displayed in blue for values ranging
between 400 and 600.
You can use the following code for these conditions: [<400][Black]Poor;
[>600][Red]Good; [Blue]Average
In this example, [<400] and [>600] are the conditional values.
Format Cell data Display
#.## 250.436
0.43
250.44
.43
#.0# 250.436
125
250.44
125.0
???.??? 123.43, 45.90,
345.809
With aligned decimals
Designing Reports Advanced Reporting Guide 8
332 Formatting a report 2011 MicroStrategy, Inc.
#,##0"CR";#,##0"DR";
0
2567
-4567
0
2,567CR
4,567DR
0
#,### 1500 1,500
0, 10,000 10
"Sales="0.0 123.45 Sales=123.5
"X="0.0;"x="-0.0 -12.34 x=-12.3
"Cust. No. " 0000 1234 Cust. No. 1234
m-d-yy 2/3/03 2-3-03
mm dd yy 2/3/03 02 03 03
mmm d, yy 2/3/03 Feb 3, 03
mmmm d, yyyy 2/3/03 February 3, 2003
d mmmm yyyy 2/3/03 3 February 2003
hh"h" mm"m" 1:32 AM 01h 32m
h.mm AM/PM 14:56 2.56 PM
#?/? 1.25 1 1/4
#?/8 1.25 1 2/8
ALT+0163 #.## 250.45 250.45
#.##% .08
2.8
8%
280%
$* #,##0.00;$*
-#,##0.00
5632.567
-12.34
$ 5,632.57
$ -12.34
0*- 250.45 250.45----
*-0 250.45 ----250.45
000-00-0000 345126789 345-12-6789
0.00E+00 10000 1.00E+04
##0.0E+0 10000 10.0E+03
0.00E+00 0.0001 1.00E-04
##0.0E-0 0.0001 100.0E-6
0.0E-00 0.0001 1.0E-04
Format Cell data Display
Advanced Reporting Guide Designing Reports 8
2011 MicroStrategy, Inc. Formatting a report 333
Understanding how formatting impacts report display
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 layerszones 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
The following diagram illustrates the basic formatting zones of a report.
Each zone is formatted differently so that you can easily distinguish among
them.
When data is manipulated in a report that is formatted by zone, the new
location of the object determines what formatting is applied to it. For
example, if you pivot Region from rows to columns in the preceding example,
the background of the text changes from light grey to dark grey. It is now part
Designing Reports Advanced Reporting Guide 8
334 Formatting a report 2011 MicroStrategy, Inc.
of the column header, as shown below. The formatting of a zone does not
move with the data.
Grid unit formatting
Grid units are the individual attributes, metrics, and consolidations that
make up a report. Unlike zone formatting, grid unit formatting is attached to
the object and moves with it when the object is pivoted. For example, the
following report is the same as the previous examples, except that Region has
been formatted, at the unit level. The header, that is, Region, is now black on
light grey and the values (Northeast and Mid-Atlantic) are now black on
white.
Advanced Reporting Guide Designing Reports 8
2011 MicroStrategy, Inc. Formatting a report 335
When Region is pivoted to the column area, as in the zone formatting
example, the formatting accompanies the attribute. Compare the following
example with the pivot example in Zone formatting, page 333.
Formatting subtotals
Subtotal formatting can be applied to either zone or grid unit formatting. If
the formatting is applied at the zone level, the formatting stays with that
zone. If the formatting is applied at the grid unit level, when the unit is
pivoted, the formatting moves with the unit.
In the following example, notice that the row subtotal formatting overwrites
the column subtotal formatting.
Designing Reports Advanced Reporting Guide 8
336 Formatting a report 2011 MicroStrategy, Inc.
Formatting thresholds
Thresholds allow conditional formatting for metric values. It is similar to
unit formatting because it is data-driven. For example, the following report
has a threshold set for revenue less than $400,000.
Besides the basic formatting options such as font and alignment, the cell
contents can be replaced with any of the following when the condition is met:
Replacement text, which is text, such as Good Sales
A replacement image. The destination of the image can be set using any of
the following:
A path on the network, that is, a path on the local area network, which
is in a UNC format (\\machine_name\shared_folder\img.jpg)
After an autostyle is placed in the folder, Web users must log out and
then log in to refresh the autostyles list.
Find and replace report, template, and metric formatting
Find and replace allows you to globally change reports, templates, and metric
formatting. You can replace autostyles, Report Data Options, metric
formatting, and graph fonts for a set of reports, templates, and metrics.
This feature is helpful when a report design changes. For example, suppose
the formatting of all your inventory reports must be changed. Create a new
autostyle with the changes, search for only inventory reports, and substitute
the new autostyle. Find and replace autostyles allows you to quickly switch
the formatting of the selected reports.
The feature also is useful when standardizing the appearance of a set of
metrics across the project. However, changes to metric formatting do not
overwrite the format of such metrics set by individual reports or templates.
Designing Reports Advanced Reporting Guide 8
346 Determining which attribute elements are displayed: Attribute joins 2011 MicroStrategy, Inc.
For detailed instructions and a description of the Find and Replace interface,
click Help.
You cannot change the join types of individual attributes on the report
with this option. The attributes and their join types are displayed for
information only.
Option 2: Preserve lookup table elements joined to final pass result
table based on fact table keys
This attribute join option causes the SQL Engine to calculate for only the
attribute elements that are joined to the fact table based on fact table keys.
Sometimes the level of the fact table is not the same as the level of the report.
For example, a report contains the attributes Store and Month and the Sales
metric which is based on the Sales fact table. The report level is Store and
Month, but the fact table level is Store, Day, and Item. Different methods to
keep all the store and month attribute elements so they are displayed on the
report are described below:
Perform a left outer join first to keep all attribute elements at the Store,
Day, and Item level, then aggregate the data to the Store and Month level.
Perform the data aggregation first, then perform a left outer join to bring
in all attribute elements.
This attribute join option uses the first approach. Working with the example
above, the SQL Engine makes two SQL passes:
Pass 1: LOOKUP_STORE cross join LOOKUP_DAY cross join
LOOKUP_ITEM; inserted into temporary table TT1
Pass 2: TT1 left outer join Fact_Table on (store, day, item)
The advantage of this approach is that you can perform a left outer join and
aggregation in the same pass (pass 2). The disadvantage is that because you
perform a Cartesian join with the lookup tables at a much lower level (pass
1), the result of the Cartesian joined table (TT1) can be very large.
Option 3: Preserve lookup table elements joined to final pass result
table based on template attributes without filter
This attribute join option causes the SQL Engine to calculate for all attribute
elements and ignores all related filtering conditions.
Sometimes the level of the fact table is not the same as the level of the report.
For example, a report contains the attributes Store and Month and the Sales
Designing Reports Advanced Reporting Guide 8
350 Determining which attribute elements are displayed: Attribute joins 2011 MicroStrategy, Inc.
metric which is based on the Sales fact table. The report level is Store and
Month, but the fact table level is Store, Day, and Item. Different methods to
keep all the store and month attribute elements so they are displayed on the
report are described below:
Perform a left outer join first to keep all attribute elements at the Store,
Day, and Item level, then aggregate the data to the Store and Month level.
Perform the data aggregation first, then perform a left outer join to bring
in all attribute elements.
This attribute join option uses the second approach. The SQL Engine makes
three SQL passes:
Pass 1: Aggregate the Fact_Table to TT1 at Store and Month. This is
actually the final pass of a normal report when this option is not enabled.
Pass 2: LOOKUP_STORE cross join LOOKUP_MONTH; inserted into
temporary table TT2
Pass 3: TT2 left outer join TT1 on (store, month)
This approach requires one more pass than the previous option, but the cross
join table (TT2) is usually smaller.
Option 4: Preserve lookup table elements joined to final pass result
table based on template attributes with filter
This attribute join option causes the SQL Engine to calculate for all attribute
elements and applies all related filtering conditions.
This attribute join option is similar to Option 3. The only difference is that
the report filter is applied in the final pass (Pass 3). For example, a report
contains Store, Month, and Sum(Sales) with a filter of Year = 2005. You want
to display every store in every month in 2005, regardless of whether there
are sales. However, you do not want to show any months from other years,
but only the 12 months in the year 2005. This attribute join option provides
this data.
Selecting an attribute join option
You can determine attribute join types in the following ways:
Use a VLDB property setting to determine attribute join types for a given
database instance, report, or report template. See details about the
Advanced Reporting Guide Designing Reports 8
2011 MicroStrategy, Inc. Determining which attribute elements are displayed: Attribute joins 351
Preserve All Lookup Table Elements VLDB property in Chapter 15, VLDB
Properties.
Use the Report Data Options dialog box to individually select attributes
on the template that need to display attribute elements. When you change
the default attribute join type setting to Option 2, 3, or 4 as described
above, it is assumed that you want to keep ALL elements of the attributes
in their lookup tables. However, sometimes you want such a setting to
affect only some of the attributes on a report. For example, for a report
containing Store, Month, and Sum(Sales), you may want to show all the
store names, even though they have no sales, but not necessarily all the
months in the LOOKUP_MONTH table. To do this, use the Report Data
options dialog box as described in the procedure below.
The four attribute join options available in the Report Data Options
dialog box are the same as those in the VLDB Properties dialog box.
The system reads them from the same location.
To view and change attribute join types
1 Open a grid report.
2 From the Data menu, select Report Data Options. The Report Data
Options dialog box opens.
3 Under Categories, expand Calculations, and then select Attribute Join
Type. The Calculations - Attribute Join Type appears on the right side of
the interface. This subcategory lists all attributes on the report, along
with each attributes join type, as shown in the image on page 347.
If you have a long list of attributes, you can sort them by attribute
name or by join type, by clicking the Attribute or Join Type
column headers.
4 Depending on your goals for joining attribute data, select one of the
following options. Details and examples for each option are provided in
Understanding attribute join options, page 347.
Preserve common elements of lookup and final pass result table:
(Default setting) This option causes the SQL Engine to calculate for
only the attribute elements that exist in both the lookup and fact
tables. This option lets you display all attribute elements that exist in
the lookup tables in your data warehouse, whether or not there is a
Designing Reports Advanced Reporting Guide 8
352 Determining which attribute elements are displayed: Attribute joins 2011 MicroStrategy, Inc.
corresponding fact value in the data warehouse. You cannot change
the join types of individual attributes with this option. The attributes
and their join types are displayed for information only.
Preserve lookup table elements joined to final pass result table
based on fact table keys: This option causes the SQL Engine to
calculate for only the elements that are joined to the fact table based
on fact table keys.
Preserve lookup table elements joined to final pass result table
based on template attributes without filter: This option causes the
SQL Engine to calculate for all attribute elements and ignores all
related filtering conditions.
Preserve lookup table elements joined to final pass result table
based on template attributes with filter: This option causes the SQL
Engine to calculate for all attribute elements and applies all related
filtering conditions.
5 You can change the join type of a specific attribute, if you select any of the
Preserve lookup table elements options. In the Join Type settings
table, click the Join Type for the attribute and select the join type from
the drop-down list. The join type options are:
Default: This option sets the attribute to use the join type set for that
individual attribute using the Attribute Editor. If a join type was not
set at the attribute level, the attribute uses the join type set at the
project level.
Inner: This option displays only the attribute elements common to all
data warehouse tables from which data is being gathered for this
attribute.
Outer: This option displays all of the attribute elements from all data
warehouse tables from which data is being gathered for this attribute.
These actions must include or affect objects on which you can set the
evaluation order. For example, a consolidation on the Report Objects
but not on the grid will activate the View evaluation order. Since a
derived metric is, by definition, a compound smart metric, it always
activates the View evaluation order.
A separate view order is necessary because any manipulation of the view that
does not change the SQL is performed after the base report is completed.
Therefore, objects in the Data Set evaluation order settings are evaluated
Advanced Reporting Guide Designing Reports 8
2011 MicroStrategy, Inc. Evaluation order of objects on reports 357
first, and then those in the View evaluation order are evaluated. The
following table describes where objects are evaluated.
Data set vs. view evaluation order example
Consider the following report, where Revenue Rank is a smart metric
ranking the Revenue metric. (To create this metric, apply the rank function
to the Revenue metric. On the Subtotals/Aggregation tab of the Metric
Editor, select the Allow Smart Metric check box. For more details, see the
Desktop Help.) Eight rows of data are returned.
To restrict the report, create a metric limit of Revenue greater than
$3,000,000, as described below.
To create a metric limit
1 From the Data menu, choose Report Data Options. The Report Data
Options dialog box opens.
Object Evaluation Order
Consolidation Data Set
Derived metric View
Derived element View
Report limit Data Set
Compound smart metric Data Set or View:
Set automatically to View
Can be changed manually
Subtotals View
Designing Reports Advanced Reporting Guide 8
358 Evaluation order of objects on reports 2011 MicroStrategy, Inc.
2 Under Categories, expand Calculations and then select Report Limit.
Calculations Report Limit appears on the right-hand side of the dialog
box.
3 Click Modify. The Report Limit Editor opens.
4 Double-click in the Limit Definition area of the editor. The Report Limit
Qualification dialog box opens.
5 In the Metric box, type Revenue and click OK.
6 Select the Revenue metric from the list and click OK.
7 In the Function box, select Metric Value.
8 From the Operator box, select Greater than.
9 From the Value box, select Value.
10 Type 3000000 in the field.
11 Click OK. You are returned to the Report Limit Editor.
12 Click Save and Close. You are returned to the Report Data Options
dialog box.
13 Click OK. You are returned to the Report Editor.
Only those regions with a Revenue greater than $3,000,000 appear on the
report. Only six rows of data are displayed, as shown below:
The values for Revenue and Revenue Rank have not changed, only the
amount of data that is displayed has. By default, Revenue Rank, as a smart
metric, is calculated before the metric limit. The metric limit then removes
the regions with the lowest revenue, which have the Revenue Rank of 1 and 2.
Advanced Reporting Guide Designing Reports 8
2011 MicroStrategy, Inc. Evaluation order of objects on reports 359
Next, create a derived metric, which causes the report view to differ from the
data set.
To create a derived metric
1 Select New Metric from the Insert menu. The Input Metric Formula
dialog box opens.
2 Double-click Revenue in the list of Report Objects. It appears in the
metric definition on the right.
3 Type /2, which also appears in the metric definition.
4 By default, the name of the derived metric is New Metric. Change it by
typing Revenue/2 over New Metric in the text field above the toolbar.
5 Click OK to return to the report.
6 Format the derived metric:
a From the Format menu, point to Revenue/2, then select Values. The
Format Cells dialog box opens.
b On the Number tab, select Currency in the Category list.
c Set Decimal Places to 0 (zero).
d Click OK to return to the report.
The report results are displayed below. Notice that Revenue Rank is no
longer missing 1 and 2, but is instead calculated based only on the six rows
displayed. This results in a ranking from 1-6, instead of 3-8.
Once a derived metric is added to a report, the view evaluation order is
activated. As a smart metric, the Revenue Rank metric is automatically
moved to the view evaluation order, while the metric limit stays in the data
Designing Reports Advanced Reporting Guide 8
360 Evaluation order of objects on reports 2011 MicroStrategy, Inc.
set. Recall that, by default, objects in the view are calculated after objects in
the data set are computed.
You can specify whether compound smart metrics are evaluated in the data
set or the view definition. For instance, in this example, you can force
Revenue Rank to be calculated before the metric limit, to include all the
regions, even those no longer displayed on the report, in the ranking.
To move a compound smart metric from the view to the data set evaluation
order
1 From the Data menu, choose Report Data Options. The Report Data
Options dialog box opens.
2 Under Categories, expand Calculations and then select Evaluation
Order. Calculations Evaluation Order appears on the right side of the
dialog box.
3 Clear the Use default evaluation order check box.
Notice that both the Revenue Rank metric and the derived metric
Revenue/2 are calculated in the view evaluation order.
4 Click Advanced. The Advanced dialog box opens.
5 Click in the Metric Calculation column of the Revenue Rank row, and
select Evaluate in the data set from the drop-down menu.
6 Click OK to return to the Evaluation Order dialog box.
Revenue Rank is now displayed in the Data Set evaluation order.
7 Click OK to return to the report.
As shown below, the range of Revenue Rank is now 3-8, because the metric
includes all the regions, even if they are not displayed on the report.
Advanced Reporting Guide Designing Reports 8
2011 MicroStrategy, Inc. Evaluation order of objects on reports 361
Consolidation and view evaluation order example
Formatting properties
VLDB properties
Export options
Filters
Formatting
Grid options
VLDB properties
This graph report, named Bar Chart - Revenue, Cost and Profit by
Region and Quarter, is available in the MicroStrategy Tutorial project.
Notice in the graph report shown above that the attribute Quarter is included
in the categories, while the metrics Revenue, Cost, and Profit are included in
the series. This displays a cluster of three bars for the Revenue, Cost, and
Profit metrics. Each cluster represents the metric values for a particular
quarter. This view of data displays how revenue, cost, and profit affect each
other for a given quarter.
You can change the focus of the graph report simply by changing the series
and categories. For example, the same graph report is used to display the
graph below.
Notice that the only change that has been made is that the Quarter attribute
is now a part of the series, while the metrics Revenue, Cost, and Profit are
part of the categories. Each cluster of bars now represents a single metric
over time. This view of data displays how revenue, profit, and cost have
increased or decreased over four quarters.
As shown in the previous examples, how you situate report objects such as
attributes and metrics on a grid directly affects how data is displayed on your
Graphing Advanced Reporting Guide 9
398 Moving objects on a graph report 2011 MicroStrategy, Inc.
graph, which in turn can change the analytical focus of the graph. It is helpful
to keep this in mind as you design reports you intend to display as graphs.
Absolute
Stacked
Bi-polar Absolute
Bi-polar Stacked
Dual-axis Absolute
Dual-axis Stacked
Percent
3D Area styles:
Series
Group
Vertical Area: Absolute graph example
One of the types of Area graphs you can create in MicroStrategy is a Vertical
Area: Absolute graph. You can think of this type of graph as a vertical Line
graph that has the area beneath it filled in a certain color.
Advanced Reporting Guide Graphing 9
2011 MicroStrategy, Inc. Graph style usage and examples 401
For example, the following graph provides information about how many
customers a company lost per quarter. The top edge of the graph represents
the various data points, in this case, the number of customers lost. The
X-axis represents the different quarters. In the graph, notice the sharp
increase in lost customers between Q3 2008 and Q4 2008.
Going into Q3, the company had lost only a total of 12 customers. During Q4
alone, however, the company saw that number grow to a total of 25
customers, as shown by the highest point on the far right of the graph.
Using Area graphs effectively
Overall, the Area graph is a flexible graph format because you can create
one from a variety of attributes, metrics, and other report objects. Its
minimum requirements are that one attribute and one metric be present
on the report grid. However, as explained in Moving objects on a graph
report, page 396, the location of these objects on your graph report
determines whether and how the grid report can be generated as an Area
graph.
You can apply a curved effect to the lines of the graph, as shown in the
image above. To do so, from the Graph menu, select Preferences.
Within the General category, select the Enable curved areas check box.
Graphing Advanced Reporting Guide 9
402 Graph style usage and examples 2011 MicroStrategy, Inc.
For detailed information about specific formatting, scaling, and other
options for Area graphs in MicroStrategy, see the MicroStrategy Desktop
Help. (From within Desktop, press F1.)
Bar
Bar graphs, also known as column graphs, are one of the most commonly
used graphs because they are easy to use, flexible, and allow you to easily
compare a wide range of data values.
Bar graph types
You can create many types of Bar graphs in MicroStrategy, including the
following:
Horizontal Bar and Vertical Bar styles:
Absolute
Clustered
Stacked
Dual-axis Absolute
Dual-axis Clustered
Dual-axis Stacked
Bi-polar Absolute
Bi-polar Clustered
Bi-polar Stacked
Percent
3D Bar styles:
Riser
Floating
Advanced Reporting Guide Graphing 9
2011 MicroStrategy, Inc. Graph style usage and examples 403
Vertical Bar: Dual-Axis Clustered graph example
One type of Bar graph you can create in MicroStrategy is a Vertical Bar:
Dual-Axis Clustered graph. This traditional vertical Bar graph generally plots
data within individual categories, with each bar representing a different
measurement.
For example, the graph below allows you to analyze the revenue and profit
generated by different suppliers, as well as the number of units each sold.
The X-axis is divided by supplier (ACS Innovations, for example), the Y1-axis
on the left represents the number of units sold, and the Y2-axis on the right
represents dollar amounts.
Notice that 20th Century Fox sold the most units, as represented by the
tallest blue (the leftmost column for each category) column on the graph. The
suppliers smaller red (the middle column for each category) and yellow (the
right-most column for each category) columns represent revenue and profit
respectively. You can determine how much revenue and profit ACS
Innovations generated by identifying the top of each column and comparing
it against the dollar amounts on the right.
In the grid report, notice that the Units Sold metric is the first object on the
grids columns. This is important because the Units Sold metrics placement
on the grid determines that the Y1-axis on the left side of the graph will
represent the number of units sold.
Graphing Advanced Reporting Guide 9
404 Graph style usage and examples 2011 MicroStrategy, Inc.
Revenue and profit are measured in the same way, in that both are calculated
by currency. Therefore, it is convenient for these metrics to reside to the right
of the Units Sold metric in the columns. This way, a Y-2 axis on the right side
of the graph can measure both Revenue and Profit along the same axis.
As shown in the graph above, you can allow some graph types to have
two numeric axes (Y1 and Y2). This allows you to chart some of the
series on one axis and some of the series on another axis. This is most
helpful when the series use different value formatting. For example,
the Units Sold data is displayed as a general count while Revenue and
Profit data are displayed in a currency format.
Vertical Bar: Stacked graph example
Another type of Bar graph you can create in MicroStrategy is a Vertical Bar:
Stacked graph. This vertical Bar graph plots data within one column, with
individual sections of the column representing a different measurement.
For example, the graph below provides information about the amount of net
sales generated for each material (in this case, servers) in 2007 Q4. On the
grid report, notice that the Material attribute is placed within the series and
Product Hierarchy Level 2 attribute is placed within the Page-by field; having
this attribute in the page-by field allows you to switch between different
graph data for each specific material. For instance, since PCs is selected in
the Page-by field, the graph below reveals net sales data about the different
PCs purchased by customers in Q4 2007.
Advanced Reporting Guide Graphing 9
2011 MicroStrategy, Inc. Graph style usage and examples 405
Using Bar graphs effectively
The Bar graph is a flexible graph format since you can create one from
any number of attributes, metrics, and other report objects. Its minimum
requirements are that one attribute and one metric be present on the
report grid. However, as explained in Moving objects on a graph report,
page 396, the location of these objects on your graph report determines
whether and how the grid report can be generated as a Bar graph.
When you are using a Vertical Bar: Dual-Axis Clustered graph (see
Vertical Bar: Dual-Axis Clustered graph example, page 403), or other
graphs similar to it, think about the order in which your metrics appear
on the grid report. The order of the metrics in the series for the graph
report determines which metrics are represented by the Y-1 and Y-2 axes.
For example, in the Vertical Bar: Dual-Axis Clustered graph above, the
order of the metrics in the series determines what the Y-1 and Y-2 axes
represent.
As shown in the graph in Vertical Bar: Dual-Axis Clustered graph
example, page 403, you can allow some graph types to have two numeric
axes (Y1 and Y2). This allows you to chart some of the series on one axis
and some of the series on another axis. This is most helpful when the
series use different value formatting. For example, the Units Sold data is
displayed as a general count format, while Revenue and Profit data are
displayed in a currency format.
Placing an attribute in the page-by field can not only enhance the look
and feel of your graph, it is often an essential step in the graph design
process. For example, recall the Vertical Bar: Stacked graph example
above. If you move the Product Hierarchy Level 2 attribute off the
page-by field onto the grid, the graph presents an excessive number of
columns, making it difficult to focus on specific data.
Apply a gradient to the bars in your graph to make them stand out from
the other sections of the graph. For example, the graph above has a
gradient applied to its series. To apply gradients and other effects,
right-click your graphs series and access the Preferences dialog box. For
these steps, see Manually formatting graph series and objects,
page 462.
For detailed information about the specific options for Bar graphs in
MicroStrategy, see the MicroStrategy Desktop Help. (From within
Desktop, press F1.)
Graphing Advanced Reporting Guide 9
406 Graph style usage and examples 2011 MicroStrategy, Inc.
Line
A Line graph is a type of graph that highlights trends by connecting lines
between different data points. Like the Bar graph and Pie chart, the Line
graph is one of the most commonly used graph types. It is often used as a
visual alternative to Bar graphs and other types.
Line graph types
You can create many different types of Line graphs in MicroStrategy,
including the following:
Horizontal Line and Vertical Line styles:
Absolute
Stacked
Bi-polar Absolute
Bi-polar Stacked
Dual-axis Absolute
Dual-axis stacked
Percent
3D Line styles:
Series
Group
Vertical Line: Absolute graph example
One of the many variations of vertical Line graphs you can create in
MicroStrategy is the Vertical Line: Absolute graph.
Advanced Reporting Guide Graphing 9
2011 MicroStrategy, Inc. Graph style usage and examples 407
The following graph highlights the amount of revenue generated for various
subcategories of Electronics per month.
Each colored line in the graph represents a different electronics subcategory,
such as Cameras or TVs. The X-axis represents different months in
chronological order and the Y-axis represents the amount of revenue. The
upper most line in the graph represents Camera revenue. To analyze how
much revenue was generated during a specific month, follow the appropriate
line from left to right until you reach the correct Month along the X-axis. For
example, follow the line for Cameras to discover that, in May 2006, revenue
generated by camera sales was just over $100,000.
Using Line graphs effectively
The Line graph is a flexible graph format because you can create one from
any number of attributes, metrics, and other report objects. Its minimum
requirements are that one attribute and one metric be present on the
report grid. However, as explained in Moving objects on a graph report,
page 396, the location of these objects on your graph report determines
whether and how the grid report can be generated as a Line graph.
You can apply a curved effect to the Line graph. To do so, from the Graph
menu, select Preferences. Expand Options, and select the General
category. Select the Enable curved lines check box.
Graphing Advanced Reporting Guide 9
408 Graph style usage and examples 2011 MicroStrategy, Inc.
For detailed information about the specific options for Line graphs in
MicroStrategy, see the MicroStrategy Desktop Help. (From within
Desktop, press F1.)
Pie chart
A Pie chart is a style of graph in which data values such as percentages are
represented as proportionally-sized slices of a pie.
Pie chart graph types
You can create several different types of Pie charts in MicroStrategy,
including the following:
Pie
Ring
Multiple Proportional Pie
Multiple Proportional Ring
Pie chart example
In the following exploded Pie chart example, each slice of the graph
represents a different region, for example, the Northeast or Mid-Atlantic.
The size of each pie slice is determined by the values of the Revenue metric.
For example, the Southeast region had $2.2 million in revenue, compared to
Advanced Reporting Guide Graphing 9
2011 MicroStrategy, Inc. Graph style usage and examples 409
over $8.5 million in the Northeast. The Northeast slice has been moved away
from the pie slightly to draw attention to it.
On the graph report, notice that the Region attribute is included in the series
for the graph, and the Revenue metric is included in the categories for the
graph. This causes the elements of the Region attribute, the regions
themselves, to appear as slices in the Pie chart. Each region is assigned its
own color to distinguish it from the other regions.
However, if you move the attribute to the categories and the metric to the
series on the graph report, multiple Pie charts are created for each region. If
you then view the report as a graph, each Pie chart is not divided into slices,
which makes it more difficult for you to compare values. Keep this in mind
when you are designing your own graph.
Pie: Multiple Proportional Pies example
The graph below is an example of a Pie chart displayed as multiple pies. Each
pie is formatted identically to the single graph in the previous example. In
this graph, each pie represents the total revenue for a quarter, divided among
several geographic regions. The pies are of different sizes depending on the
total amount of revenue for that quarter. For example, the pie for 2006 Q4 is
Graphing Advanced Reporting Guide 9
410 Graph style usage and examples 2011 MicroStrategy, Inc.
visibly larger than the pie for 2006 Q1, because the total revenue for Q4 was
nearly $1,000,000 greater than the total revenue for Q1.
Notice that in the grid report above, the Quarter attribute is in the categories,
on the left of the metrics. This causes the graph to display one Pie chart for
each available value of Quarter. The way a graph appears depends heavily on
whether the attributes and metrics are in the series or the categories of the
graph report.
Using pie charts effectively
The Pie chart is a flexible graph format because you can create one from a
number of attributes, metrics, and other report objects. Its minimum
requirements are that one attribute and one metric be present on the
report grid. However, as explained in Moving objects on a graph report,
page 396, the location of these objects on your graph report determines
whether and how the grid report can be generated as a pie graph.
When you create a Pie chart, move the attributes and metrics of your
report between the series and categories until a useful and easy-to-follow
graph is displayed. The location of the attributes and metrics on the grid
directly affects whether one Pie chart with different slices is displayed or
whether multiple pies are displayed. Review the Pie chart examples above
for an example of this.
Advanced Reporting Guide Graphing 9
2011 MicroStrategy, Inc. Graph style usage and examples 411
For detailed information about the specific options for Pie charts in
MicroStrategy, see the MicroStrategy Desktop Help. (From within
Desktop, press F1.)
Scatter plot
A Scatter plot is a graph showing points of data that are not connected by a
line. A Scatter plot can help you identify the relationships that exist between
different values. Each dot on the graph represents the intersection of the data
on the X and Y axes. For example, if you are looking at numeric profit data on
a report, the profits of various call centers are clear. However, when you
display the report as a Scatter plot, the visualization of the data reveals that a
certain call center is performing significantly better than other call centers.
Scatter plots are often used for quality control and management. However,
like most graph styles, they are also useful because of their distinct visual
style.
Scatter plot graph types
You can create several different types of Scatter plots in MicroStrategy,
including the following:
X-Y Scatter
Dual-axis X-Y Scatter
X-Y-Z Scatter Chart (three-dimensional)
Scatter: X-Y graph example
In the Scatter: X-Y graph below, the revenue generated by each customer
appears along the X-axis, while the customer satisfaction for each customer
Graphing Advanced Reporting Guide 9
412 Graph style usage and examples 2011 MicroStrategy, Inc.
appears along the Y-axis. The individual circles within the graph represent
each customer.
This graph report, named Scatter Plot Chart - Revenue vs. Customer
Satisfaction, is available in the MicroStrategy Tutorial project.
The Scatter plot shown above helps to show the relationship between a
customers satisfaction with a company and how much revenue is generated
by a customer. This graph suggests that customers who are satisfied with the
company are likely to spend more money with the company.
Using Scatter plots effectively
While a Scatter plot is a flexible graph format because you can create one
from a number of report objects, its minimum requirements are that one
attribute and two metrics be present on the report grid. However, as
explained in Moving objects on a graph report, page 396, the location of
these objects on your grid report determines whether and how the grid
report can be generated as a Scatter plot.
If you include more than two metrics on the report grid for a Scatter plot
like the one shown above, the graph may not be useful because Scatter
plots are specifically designed to plot two distinct metric values. You can
include three metrics on Scatter: X-Y-Z graphs, which display the metric
values on a three-dimensional Scatter plot.
Advanced Reporting Guide Graphing 9
2011 MicroStrategy, Inc. Graph style usage and examples 413
If you include only one metric on the report grid and apply a Scatter plot
graph style, an error message notifies you that there is not enough data to
create the Scatter plot. For details on how the placement of objects on a
report can affect the display of data for various graph styles, see
Placement of report objects and choice of graph styles, page 394.
For detailed information about the specific options for Scatter plots in
MicroStrategy, see the MicroStrategy Desktop Help. (From within
Desktop, press F1.)
Polar chart
A Polar chart is a graph drawn with circular, polar coordinates. As shown in
the example that follows, data points often fall within a certain distance of
the middle of the circular graph and another axis.
Polar chart graph types
You can create the following types of Polar charts in MicroStrategy:
Coordinate Chart
Dual-axis Coordinate Chart
Graphing Advanced Reporting Guide 9
414 Graph style usage and examples 2011 MicroStrategy, Inc.
Polar: Coordinate Chart graph example
The Polar: Coordinate Chart graph shown below provides data about the unit
cost versus the unit profit for various items.
In this graph, the vertical line cutting through the Polar chart is the Y-axis,
which represents the unit profit made for each item. The X-axis is
represented via the seven-sided polygon. A range of values is listed in order,
starting from the top, and moving clockwise around the shape. These values
represent the unit cost for each item.
To determine the unit profit for each item, notice how high or low a marker
resides based on the Y-axis. For example, notice in the graph above that
Lethal Weapon 4 had over $14.00 in profit, as shown by the data marker to
the left of the vertical Y-axis. Another item, Everest, had between $12.00 and
$14.00 in profit, as shown by the location of the marker along the Y axis.
To determine the unit cost for each item, line the items data marker up with
a location along the perimeter of the graph. For example, if the data marker
is at the bottom of the graph, you know that the item had between $1.20 and
$1.60 unit cost because those are the data values along the bottom of the
graph. Notice in the graph above the Armageddon items data marker can be
lined up near the $1.60 label along the outside of the graph. The Everest item
has a much lower unit cost, as shown by how close its marker is to the $.80
label on the graph.
Advanced Reporting Guide Graphing 9
2011 MicroStrategy, Inc. Graph style usage and examples 415
Using Polar charts effectively
While a Polar chart is a flexible graph format because you can create one
from a number of report objects, its minimum requirements are that one
attribute and two metrics be present on the report grid. However, as
explained in Moving objects on a graph report, page 396, the location of
these objects on your grid report determines whether and how the grid
report can be generated as a Polar chart.
When you design a Polar chart, try to include both the attribute and
metric in the grid reports columns. This ensures that each attribute
element is represented with a single marker on the Polar chart. To create
the example Polar chart above, the Item attribute and the metrics Unit
Cost and Unit Profit were all placed in the grids columns. Therefore, each
item is represented by its own marker on the graph.
For detailed information about the specific options for Polar charts in
MicroStrategy, see the MicroStrategy Desktop Help. (From within
Desktop, press F1.)
Radar chart
A Radar chart resembles a Polar chart, but works differently. Instead of
allowing you to see distinct data markers, Radar charts connect these
Graphing Advanced Reporting Guide 9
416 Graph style usage and examples 2011 MicroStrategy, Inc.
markers to form a shape. Each corner of the shape represents a different data
point, as shown in the example below.
Radar chart graph types
You can create the following types of Radar charts:
Line
Stacked Line
Dual-axis Line
Dual-axis Stacked Line
Area
Stacked Area
Dual-axis Area
Dual-axis Stacked Area
Advanced Reporting Guide Graphing 9
2011 MicroStrategy, Inc. Graph style usage and examples 417
Radar: Line graph example
The following graph is a Radar: Line graph. It is called a Radar: Line graph
because of the line formed between the data points in the graph. The graph
reveals information about the resumes received for each position in a
company.
In the graph, notice that the Y-axis is represented as a vertical line that runs
down the upper portion of the circular X-axis. The Y-axis lists various
received resume amounts in ascending order from bottom to top. Each label
on the circular X-axis represents a different position in the company, for
example, Sales Consultant or Customer Support Engineer.
You can read this graph by displaying markers for each position on the
graph. In the example above, each marker is displayed as a rectangle. These
markers are placed based on the metric values for the attributes. For
example, the marker for Customer Support Engineer is displayed between
the 50 and 60 lines since there were a total of 59 resumes received for this
position.
This graph sample serves as an example of the flexibility of Radar charts, as
well as Polar charts. In this example, this graph gives quick insight into how
many resumes are received for each position and how this relates to the
amount received for other positions. This can highlight positions that a
Human Resources department may need to recruit more heavily for to find
additional candidates. For example, more recruiting may be necessary for
the Accountant position, as only 28 resumes were received.
Graphing Advanced Reporting Guide 9
418 Graph style usage and examples 2011 MicroStrategy, Inc.
Using Radar charts effectively
The Radar chart is a flexible graph format because you can create one
from a number of attributes, metrics, and other report objects. Its
minimum requirements are that one attribute and one metric be present
on the report grid. However, as explained in Moving objects on a graph
report, page 396, the location of these objects on your grid report
determines whether and how the grid report can be generated as a Radar
chart.
In the Radar: Line graph example above, notice that there are ten
positions listed in the grid, but only seven positions appear on the graph.
The IS Engineer, HR Specialist, and Marketing Analyst positions are
missing from the graph because the Maximum number of categories for
this graph style is set to seven; therefore, only seven positions appear on a
page. In this case, you can ensure all of the attribute elements appear on
the graph by selecting Preferences from the Graph menu. In the
Maximum number of categories field, type 10, the number of attribute
elements you want to appear on the graph.
For detailed information about the specific options for Radar charts in
MicroStrategy, see the MicroStrategy Desktop Help. (From within
Desktop, press F1.)
Bubble chart
A Bubble chart is a Scatter plot that also displays the size of each data
marker, using bubbles to represent the different sizes of data markers.
To create a Bubble chart, you must include at least one attribute and three
metrics on your report grid. Where you place each object on the report grid
affects how that object is displayed in the resulting graph, as follows:
The first metric on the grid determines what is placed on the X-axis.
The second metric on the grid determines what is placed on the Y-axis.
The third metric on the grid determines the size of each bubble.
Advanced Reporting Guide Graphing 9
2011 MicroStrategy, Inc. Graph style usage and examples 419
Bubble chart graph types
You can create the following types of Bubble charts in MicroStrategy:
Bubble
Dual-axis
Bubble chart example
The graph below provides an example of how three metrics are displayed
within a Bubble chart. In the graph, a colored bubble is designated for each
shipping point for the years 2008 and 2009. The size of each bubble
represents that shipping points average total delivery time for outbound
items.
The X-axis represents the Outbound Deliveries metric, which displays the
number of outbound deliveries. The Y-axis represents the Outbound
Delivery Items metric. A third metric, Average Total Delivery Time for
Outbound Deliveries (Days), is included as the third metric on the columns
of the grid report. The third metric placed in the columns determines the size
of each bubble.
Graphing Advanced Reporting Guide 9
420 Graph style usage and examples 2011 MicroStrategy, Inc.
Notice that the largest bubble in the graph is the one for the 2009 Dallas, TX;
this shows that the average delivery time was the largest for the Dallas, TX
shipping point during the year 2009. Its placement along the X-axis informs
you that the Dallas, TX shipping point for 2009 had fewer than 10 outbound
deliveries. The bubbles vertical position along the Y-axis emphasizes that the
Dallas, TX shipping point for 2009 shipped fewer than 20 outbound items
for all outbound deliveries. This analysis suggests that further analysis needs
to be done to determine why shipping times were so long for this shipping
point in 2009, since the number of outbound deliveries and delivery items
were both relatively small.
Using Bubble charts effectively
At least one attribute and three metrics must be present on a grid report
to be able to create a Bubble chart. However, to create an effective Bubble
chart, it is best to avoid more than three metrics on the grid report. If the
grid contains more than three metrics on the grid, the graph may not be
useful because Bubble charts are designed to plot two values, that is, two
metrics, at a time. The size of each bubble represents the third metric.
For detailed information about the specific options for Bubble charts in
MicroStrategy, see the MicroStrategy Desktop Help. (From within
Desktop, press F1.)
Combination
Combination graphs are graphs that use default formatting to display risers
with multiple marker types. For example, one combination graph can display
both bars and lines together on the same graph. Combination graphs use the
formatting options of other standard MicroStrategy graph types, as
described below:
The options to display open and close values are available through
drop-down lists in MicroStrategy Web.
For detailed information about the specific options for Stock graphs in
MicroStrategy, see the MicroStrategy Desktop Help. (From within
Desktop, press F1.)
Histogram
A Histogram is designed to group data frequencies in a Bar graph format.
Histograms capture how certain data falls within specific intervals, and are
often represented as bell curves. The intervals (for example, profit ranges of
$200,000-$300,000) appear on one axis. The number of attribute elements
(for example, the number of call centers) that fall within each interval are
displayed on the other axis. Therefore, a Histogram graph can allow you to
answer questions such as:
How many call centers generated profits within the $200,000 to
$300,000 range?
In which profit range did the majority of the call centers profits exist?
A Histogram can also display the variation in a performance and helps you
make decisions about a process, product, or procedure that could be
improved after examining the variation.
The data in a Histogram can be skewed to the left or right. If the Histogram
shows a long line of short columns on the left side of the Histogram and the
high value on the graph appears on the far right, the data is defined as
left-skewed or negatively skewed. If a long line of short columns appears
Advanced Reporting Guide Graphing 9
2011 MicroStrategy, Inc. Advanced graph style usage and examples 427
on the right side and the high value on the graph appears on the far left, the
data is defined as right-skewed or positively skewed. Data that is skewed
either to the left or right can indicate inconsistent procedures or processes.
The decisions you make based on a Histogram can include determining the
appropriateness of the direction of the skew.
Histogram graph types
You can create the following types of Histogram graphs in MicroStrategy:
Vertical Histogram graph
Horizontal Histogram graph
Vertical Histogram graph example
A vertical Histogram graph is shown below. The height of the columns
represents the number of customers who placed an order, while the X-axis
highlights different ranges of the number of orders placed. For example, the
tallest column shows that about 180 customers placed between 15 to 20
orders each.
This graph report, named Histogram - Normal Distribution of Orders Placed
by Customers, is available in the MicroStrategy Tutorial project.
Graphing Advanced Reporting Guide 9
428 Advanced graph style usage and examples 2011 MicroStrategy, Inc.
Using Histogram graphs effectively
As shown in the example above, Histogram graphs are best suited for
large statistical datasets. In this case, a sample of 500 customers is used,
as indicated by the note below the graph.
Your Histogram graph may not display all of its data on one page when
you first build it. If this occurs, from Graph or Grid Graph view, select the
Graph menu and then Preferences. Within the General category, adjust
the Maximum number of categories setting to reflect the number of
report-level elements on which the Histogram is based. For example, the
graph above contains order data for 500 different customers, and
Customer is the report-level attribute. In this case, you can adjust the
Maximum number of categories setting to 500 to reflect the 500
different customers represented in the graph.
In MicroStrategy Web, you can make data labels visible using the
Format: Graph dialog box. To open the Format: Graph dialog box,
from the Format menu select Graph. In the Format category,
from the left-most drop-down list, select Series Values. To
display data labels on the graph, select the Show check box.
For information about the specific options for Pareto charts in
MicroStrategy, see the MicroStrategy Desktop Help. (From within
Desktop, press F1.)
Boxplot
A Boxplot (sometimes called a box and whisker plot) is a graph type designed
to compare similar distributions at a glance. The goal of Boxplot graphs is to
make the center, spread, and overall range of values immediately apparent.
The Boxplot is useful for isolating the extreme values and identifying the
range of middle values in your data. The box shows the median values of a
variable, while the whiskers stretch to the greatest and lowest values of that
Graphing Advanced Reporting Guide 9
440 Advanced graph style usage and examples 2011 MicroStrategy, Inc.
variable. Boxplots can also help you identify symmetrical or skewed
distributions among values.
This type of graph is most beneficial when you are comparing one variable
for several different groups, for comparing similar distributions (because the
center, spread, and overall range are immediately apparent), and for
detecting symmetrical or skewed distributions.
The image above provides an overview of the values and statistics depicted in
Boxplot graphs, and is not an actual representation of a MicroStrategy
Boxplot graph. A Boxplot consists of five summary statistics, each of which is
described below. As shown in the image, a box is drawn around the quartile
values, and the whiskers extend from each quartile to the extreme data
points.
The summary statistics within box and whisker plots include the following:
Median: The middle of the data when it is arranged in order from least to
greatest.
Lower quartile or 25th percentile: The median of the lower half of the
data.
Upper quartile or 75th percentile: The median of the upper half of the
data.
Minimum value: The smallest observed value. In MicroStrategy graphs,
this is depicted as a whisker on the bottom of a column.
Maximum value: The largest observed value. In MicroStrategy graphs,
this is depicted as a whisker on the top of a column.
Boxplot graphs only work well when there is enough data to provide
the statistics described above. For example, you use a Boxplot graph
for data that covers certain years or quarters to see the different time
periods plotted. If you only have one or two years or quarters in your
data, the Boxplot graph does not display all the expected statistics
because it cannot define quartiles and medians from only one or two
values.
Advanced Reporting Guide Graphing 9
2011 MicroStrategy, Inc. Advanced graph style usage and examples 441
Boxplot graph example
The following Boxplot graph and its corresponding grid report provide data
about the amount of revenue generated each day during a given quarter.
Each column is split into two sections. The top section represents the upper
quartile or the 75th percentile, and the bottom section represents the lower
quartile or the 25th percentile. The whiskers extending from the top and
bottom of each column indicate the highest and lowest daily revenue values
respectively.
For example, during Q4 of 2007, daily revenue reached a low of about $12, as
shown by the whisker below the column. Daily revenue that quarter did,
however, reach a high of over $14,000, as evidenced by the whisker at the top
of the column. The median revenue value for the quarter, $1,758, is shown as
a horizontal line that splits the column. The upper and lower quartiles are
shown above and below the median line respectively.
Graphing Advanced Reporting Guide 9
442 Advanced graph style usage and examples 2011 MicroStrategy, Inc.
This graph report is a modified version of the graph report named BoxPlot -
Visualizing Statistics of Daily Revenue by Quarter, which is available in the
MicroStrategy Tutorial project.
Using Boxplot graphs effectively
When you create a Boxplot graph you must include the correct number of
metrics for the graph to resemble the example above. To view the quartile
sections and median line within the graph columns, as well as the
high-low whiskers, five metrics must appear on your report template in
the following order:
Base or median value metric (for example, the Median Daily Revenue
metric).
One metric serves as the length, or duration, from the starting point.
If you use two metrics that both return dates such as a start date
and an end date, the Gantt chart is not displayed correctly.
A pair of metrics defines start and length values which are translated as a
horizontal bar in the graph. These metrics must use the same time
interval to accurately display data on a Gantt chart. For example, if your
starting point is a specific day such as 07/25/2010, the duration must be
provided in terms of days. Therefore, a project that started on
07/25/2010 and ends on 07/31/2010 must have its duration provided as
seven days. If, however, project start and end dates are based on a
quarterly schedule (for example, starting in quarter one of 2009 and
ending in quarter one of 2010) the duration must be provided as the
number of quarters that the project was active for.
Multiple metric pairs can be added to the columns to represent more
start-length pairs. If you add an odd number of metrics to the report, the
last metric on the report is not displayed on the graph.
If you use dates to define the time period for the Gantt chart, you may
need to change the minimum value of the graphs axis to better display
Graphing Advanced Reporting Guide 9
446 Formatting a graph report 2011 MicroStrategy, Inc.
data. For information on defining the minimum or maximum value of a
graph, see Scaling a graph, page 494.
For information about the specific options for Gantt charts in
MicroStrategy, see the MicroStrategy Desktop Help. (From within
Desktop, press F1.)
Formatting a graph report
Formatting a graph report enables you to specify font, line, and fill
characteristics for text, lines, and areas in a graph. This allows you to
highlight important information, and to make your graph reports easier to
read and understand.
You can format several objects within your graph, including the following:
Title
Legend
Subtitle
Footnote
Background
Frame
X-axis Label
Y1-axis Label
Y2-axis Label
You can format the above graph elements by using the Formatting option in
the Graph menu in Grid Graph or Graph view.
The Title, Subtitle, Footnote, X-axis Label, Y1-axis Label, and Y2-axis
Label options are enabled only if the option is used in the graph. For
example, you can select the option Title only if the graph includes a
title.
Advanced Reporting Guide Graphing 9
2011 MicroStrategy, Inc. Formatting a graph report 447
You can format the following elements of a graph by selecting an item on the
graph, right-clicking it, and then choosing Format <object name> from the
right-click menu:
Labels
Headers
Risers (bar, area, and so on)
Pie slices
3D objects
Controlling how a graph report appears
Report designers can control the look of a graph report at any time, even
after it has been analyzed and potentially reformatted by users.
When thinking about how to format a graph report, you must first consider
the various layers of formatting that exist within the report. Each report in
MicroStrategy contains several layers of formatting, including the formatting
of metrics on the grid report, axes, subtotals, column banding, thresholds,
and more. Report formatting is contained in these different layers, allowing
you to control different aspects of a graphs formatting and ensure that the
important information is still emphasized. For example, as explained in
Formatting numeric values on a graph, page 471, a metrics formatting in a
grid report plays a role in how the metric is formatted in a graph. The
metrics formatting is one report formatting layer you can modify as you
consider different ways to format your graph.
For specific details about the report formatting layers, see Understanding
how formatting impacts report display, page 333.
Formatting a graph using colors, shading, and effects
You can change the colors and overall look and feel of specific objects, such
as series, on your graph. For example, you can format individual bars in your
Bar graph or pie slices in your Pie chart. The graph legend or axes can be
formatted as well.
You can format a graph report by adjusting colors, and applying a variety of
graphical effects, including gradients, transparency, patterns, pictures,
Graphing Advanced Reporting Guide 9
448 Formatting a graph report 2011 MicroStrategy, Inc.
textures, and bevel effects. You can also apply a set of color and shading
schemes to all the objects on a graph report.
Information is below for formatting the Y-axis (the series) in both Desktop
and MicroStrategy Web.
Formatting colors, shading, and effects in Desktop
You can change the colors, shading, and other effects on your graph report in
a number of ways. For example, you can do the following:
Select a color/shading scheme from the Color Styles drop-down menu
on the Graph toolbar. When you select a color/shading scheme for a
graph report, the colors of the graph are changed, and shading and other
effects are applied as well. For these steps, follow the procedure To
change the colors, shading, and other effects on a graph report in
Desktop below.
Select from several color palettes in the Color Palette drop-down menu
on the Graph toolbar. When you select a color palette for a graph report,
the colors of the graph are changed, but shading and other effects are not
applied. For these steps, follow the procedure To change only the colors
of a graph report in Desktop below.
Manually format the color of individual objects and apply effects such as
gradients to them. For example, you can adjust the color of and apply a
texture to the bars of a Bar graph. For more information, see Manually
formatting graph series and objects, page 462.
Define metric-specific graph colors that are used when a metric is
displayed as a series in a graph. Metric-specific graph colors override any
colors defined by the color palettes and color styles selected for the graph,
as well as any manual color formatting selected for the series of the graph.
For steps to define metric-specific graph colors, see Defining a graph
color for metrics in Desktop, page 449.
The procedure below provides instructions on changing the colors, but not
the shading and other effects, on your graph report.
To change only the colors of a graph report in Desktop
1 View a report in Graph or Grid Graph view. To do so, from the View
menu, select Graph View or Grid Graph View.
Advanced Reporting Guide Graphing 9
2011 MicroStrategy, Inc. Formatting a graph report 449
2 On the Graph toolbar, click the arrow next to the Color Palettes
icon. A list of available color palettes is displayed.
If the Graph toolbar is not displayed, from the View menu, select
Toolbars, then Graph.
3 Select a color palette to apply its color scheme to the graph report. The
graph report is updated with the new colors.
The procedure below provides instructions on changing the colors, as well as
the shading and other effects, on your graph report.
To change the colors, shading, and other effects on a graph report in Desktop
1 View a report in Graph or Grid Graph view. To do so, from the View
menu, select Graph View or Grid Graph View.
2 On the Graph toolbar, click the arrow next to the Color Styles icon.
A menu of available color/shading schemes is displayed.
If the Graph toolbar is not displayed, from the View menu, select
Toolbars, then Graph.
3 Select a color/shading scheme to apply to the graph report. The graph
report is updated with the new color and shading scheme.
Defining a graph color for metrics in Desktop
You can define the color used for a metric when it is displayed as a series in a
graph. The graph color that you define for a metric overrides any default
color schemes for the graph report. This lets you maintain any
metric-specific color schemes that are utilized throughout a MicroStrategy
Graphing Advanced Reporting Guide 9
450 Formatting a graph report 2011 MicroStrategy, Inc.
project. For example, you can define a Profit metric to always display in
green on graph reports.
To allow colors for metrics to be inherited in graph reports, you must take
the following actions:
Define the colors to use for a metric when it is displayed as a series in a
graph. You can define this color formatting for the metric itself, or for the
metric on a specific graph report:
You can define the graph color for a metric, and this color is then used
as the default graph color for the metric in all graph reports. Steps on
how to complete this configuration are described in To define the
default graph color for a metric in Desktop, page 450.
You can define the graph color for a metric on a specific graph report.
This overrides any default metric graph color options. Steps on how to
complete this configuration are described in To define the graph color
for a metric in a graph report, page 452.
Enable the graph report to inherit a metrics graph color. Steps on how to
complete this configuration are described in To enable or disable a graph
report to inherit a metrics graph color in Desktop, page 453.
To define the default graph color for a metric in Desktop
1 Using MicroStrategy Desktop, log in to a project. You must log in with an
account that has privileges to modify metrics.
Advanced Reporting Guide Graphing 9
2011 MicroStrategy, Inc. Formatting a graph report 451
2 Browse to a metric, right-click the metric, and then select Edit. The
Metric Editor opens.
3 From the Tools menu, point to Formatting, and then select Headers.
The Format Cells dialog box opens.
4 From the Chart tab, in the Series Color drop-down list, select one of the
following options:
<default>: Allows the color for the metric to be defined on the graph
report. For steps on how to define the graph color for a metric in a
graph report, see To define the graph color for a metric in a graph
report, page 452.
Solid: Displays a single color for the metric when the metric is
displayed as a series in a graph report. You can select the color from
the Fill color drop-down list.
Gradient: Displays a blend of two colors in a gradual color change for
the metric when the metric is displayed as a series in a graph report.
You can select the two colors for the gradient from the Color 1 and
Color 2 drop-down lists, and select the angle for the gradient.
Pattern: Applies a pattern to the objects background. Patterns can
help to distinguish between the risers of different series in a graph
without having to rely solely on color. For example, the three bar
risers shown below can be distinguished by color as well as by the
pattern that they use.
From Graph: Allows the color for the metric to be defined on the
graph report. When defining the default graph color for the metric at
the metric level, this From Graph option is the same as using the
<default> option. For steps on how to define the graph color for a
metric in a graph report, see To define the graph color for a metric in
a graph report below.
5 Click OK to save your changes and close the Format Cells dialog box.
Graphing Advanced Reporting Guide 9
452 Formatting a graph report 2011 MicroStrategy, Inc.
6 Click Save and Close to save your changes and close the Metric Editor.
You can repeat these steps for any metrics that require a specific graph color.
Each metric should use a color that can be easily distinguished from the
colors used for other metrics. This ensures that graph report results are easy
to decipher based on color.
To define the graph color for a metric in a graph report
1 Using MicroStrategy Desktop, log in to a project and navigate to a graph
report.
2 Right-click the graph report and select Run. The Report Editor opens,
displaying the report as a graph.
3 From the View menu, select Grid View. The report is displayed as a grid.
4 In the report results, right-click the metric, point to Formatting, and
select Metric Name Headers. The Metric Name is the name of the
metric. The Format Cells dialog box opens.
5 From the Chart tab, in the Series Color drop-down list, select one of the
following options:
<default>: Displays the default graph color that was defined for the
metric using the Metric Editor. For steps on how to define the graph
color for a metric using the Metric Editor, see To define the default
graph color for a metric in Desktop, page 450.
Solid: Displays a single color for the metric when the metric is
displayed as a series in a graph report. You can select the color from
the Fill color drop-down list.
Gradient: Displays a blend of two colors in a gradual color change for
the metric when the metric is displayed as a series in a graph report.
You can select the two colors for the gradient from the Color 1 and
Color 2 drop-down lists, and select the angle for the gradient.
Advanced Reporting Guide Graphing 9
2011 MicroStrategy, Inc. Formatting a graph report 453
Pattern: Applies a pattern to the objects background. Patterns can
help to distinguish between the risers of different series in a graph
without having to rely solely on color. For example, the three bar
risers shown below can be distinguished by color as well as by the
pattern that they use.
From Graph: Displays the color defined by the graphs default color
scheme. Manually selecting this option overrides any default metric
graph color options defined using the Metric Editor.
6 Click OK to save your changes and close the Format Cells dialog box.
7 From the View menu, select Graph View to display the report results as a
graph.
You can repeat these steps for any metrics on the report that require a
specific graph color. Each metric should use a color that can be easily
distinguished from the colors used for other metrics. This ensures that graph
report results are easy to decipher based on color.
To enable or disable a graph report to inherit a metrics graph color in
Desktop
Inheriting metric graph color is enabled by default. The steps below show
you how to ensure that metric graph colors are inherited, as well as how to
disable this formatting.
1 Using MicroStrategy Desktop, log in to a project and navigate to a graph
report.
2 Right-click the graph report and select Run. The Report Editor opens,
displaying the report as a graph.
3 From the Graph menu, select Preferences. The Preferences dialog box
opens with the Options - General page displayed.
Graphing Advanced Reporting Guide 9
454 Formatting a graph report 2011 MicroStrategy, Inc.
4 By default, all metric-specific graph colors are inherited. To disable this
inheritance and apply the graph color scheme to all metrics, in the Other
area, clear the Apply metric formatting when available check box.
5 Click OK to save your changes and return to the graph report.
Formatting the Y-axis: Graph series in MicroStrategy Web
The procedure below describes how to format a graph in MicroStrategy Web
using the Format: Graph dialog box, because this dialog box contains all
formatting options for a graph. As an alternative, you can quickly format a
graph by right-clicking the graph component and selecting a formatting
option. You can also format the graph using the Formatting toolbar, which is
available from the View menu.
Prerequisites
You must have the necessary Web Professional privileges to format graph
series.
To format the series of a graph in MicroStrategy Web
1 Run a report and display it in either Graph view or Grid and Graph view.
2 From the Home menu, select Graph.
3 Right-click the graph and select Format. The Format: Graph dialog box
opens.
If DHTML is disabled, click Go. The Format: Graph panel is
displayed.
4 Select the Format tab.
If DHTML is disabled, select the Format link.
5 From the left-most drop-down list at the top, select Series Colors. From
the next drop-down list, select the specific series to format. In a bar
graph, you can select Bar Riser for [name of attribute/metric
combination]. For example, this may be displayed as Bar Riser for
Electronics Revenue.
This option is named based on the object you select. For example,
for a line in a Line graph, this option is named Format Data
Marker.
3 You can use the following formatting categories to format graph objects:
When defining the Fill options for a series object of a graph, the
options described below are ignored if the metric for the series has
a metric-specific graph color. To apply the manual Fill options
described below for a series object, you can disable the display of
metric-specific graph colors by clearing the Apply metric
formatting when available check box. Steps to perform this
configuration are described in Defining a graph color for metrics
in Desktop, page 449.
From the Background type drop-down list, select Gradient to
apply a gradient. This type of background style displays a blended
effect to gradually change from one color to a second color. For
example, the image shown below displays a gradient that changes
from a light yellow color to a dark green color.
Use the Transparency slider to apply a transparency effect. The
slider uses a range of zero to 100. A value of zero means the object
is not transparent and thus appears as a solid object. Higher values
make the object more transparent, which allows you to see objects
behind the transparent object.
Click Bevel to apply a bevel effect to the objects background.
Bevel effects apply three-dimensional framing effects to the graph
object.
From the Background type drop-down list, select Pattern to
apply a pattern to the objects background. Patterns can help to
distinguish between different series risers in a graph without
Graphing Advanced Reporting Guide 9
464 Formatting a graph report 2011 MicroStrategy, Inc.
having to rely solely on color. For example, the three bar risers
shown below can be distinguished by color as well as by the
pattern they use.
From the Background type drop-down list, select Picture to
apply a picture to the objects background. Pictures can be applied
to graph frames or backgrounds to apply a standard company
background style or watermark to all graphs.
From the Background type drop-down list, Texture to apply a
texture to the objects background. Textures can help to
distinguish between different series risers in a graph without
having to rely solely on color. However, the formatting applied for
each texture can be drastically different from other textures. For
this reason it is important to make sure the textures you apply to
your graph objects are visually appealing when displayed on the
same graph.
4 Click Apply to apply any formatting changes to the object.
5 Click OK to close the dialog box and return to the graph.
Creating and formatting titles, axes, and footnotes
All graphs can include titles and subtitles which can help to clearly identify
the graph. They can also include footnotes that provide additional
information about the graph.
By default, the title of a graph is the name of the report, but you can
manually change this as described in the procedure below.
Advanced Reporting Guide Graphing 9
2011 MicroStrategy, Inc. Formatting a graph report 465
Most graphs can also include a category axis title and a numeric Y1-axis title.
Some graph styles, such as Histograms, and graph sub-types, such as 3D
graphs, can include additional titles, as described in the table below.
Creating and adjusting title, axes, and footnotes in Desktop
The steps below show you how to display and format titles and labels for a
graph.
To create and adjust title, axes, and footnotes in Desktop
1 Open a report in Graph View.
2 From the Graph menu, select Titles and Labels. The Preferences dialog
box is displayed.
3 Within the Titles category, select the check box for the title or label to
display. For example, you can select the Title, Footnote, or Subtitle
check boxes to display these titles and labels.
4 Type the text to display for the title or label.
You can also use variables that display various report information for the
titles and labels such as the report name, report creation time, report
description, and so on. For information on creating a dynamic title, see
Creating dynamic titles using variables in Desktop, page 466.
Graph
Sub-Type/Graph
Style
Additional titles that can be included
All Surface graphs Series Axis Title, which provides additional detail on the information that is being
shown on the series axis
All 3D graphs Series Axis Title, which provides additional detail on the information that is being
shown on the series axis
All Dual-Y graphs Value Title (Y2), which can provide information about the Y-2 axis
All bi-polar graphs Value Title (Y2), which can provide information about the Y-2 axis
Bubble X-Axis Title
Scatter X-Axis Title
Histogram X-Axis Title
Graphing Advanced Reporting Guide 9
466 Formatting a graph report 2011 MicroStrategy, Inc.
5 Click Apply to apply any title changes.
6 Click OK to close the dialog box and return to the graph.
7 From the File menu, select Save to save the updated information.
Creating dynamic titles using variables in Desktop
For some types of titles, you can use variables so the titles become dynamic.
Variables generate the titles automatically every time the report is run.
Variables can be used to display the report name, current date and time,
report description, name of the project, name of the user executing the
report, and so on. You can use multiple variables in the same title or combine
static text and variables.
The following table describes the variables you can use to insert dynamic text
into your graphs titles and labels.
Variable Description
{&REPORTNAME} Name of the report.
{&REPORT
DESCRIPTION}
Report description as entered in the Properties dialog box.
{&CREATIONDATE} Date the report was created. All dates and times are displayed in the format
designated for the computer.
{&CREATIONTIME} Time the report was created. All dates and times are displayed in the format
designated for the computer.
{&AXISINFO} (Scatter plots and Bubble charts only) Innermost label from the grid that
represents either the X or Y metric.
{&PROJECT} Project in which the report is stored.
{&USER} Full name (not Desktop login) of the user executing the report.
{&PROMPTn&} User's answers to prompts in the report, where n is the number of the prompts, in
order; that is, {&PROMPT1&} returns the answer to the first prompt,
{&PROMPT2&} returns the answer to the second prompt, and so on. Applies to
object prompts and attribute qualification prompts only.
If n is greater than the number of prompts in the report, the code itself is
displayed in the report.
{&PROMPTDETAILS} All prompt answers for the report. Applies to metric qualification prompts, object
prompts, and attribute qualification prompts only.
This variable is useful if you do not know the exact order or number of prompts in
the report.
{&EXECUTIONTIME} Date and time the report was executed. All dates and times are displayed in the
format designated for the computer.
Advanced Reporting Guide Graphing 9
2011 MicroStrategy, Inc. Formatting a graph report 467
Positioning and formatting graph titles in Desktop
You can also determine the location, font, and color of any of the titles by
using various formatting options, as described in the procedure below.
To change the formatting of a graph title in Desktop
1 Open a report in Graph view.
2 On the Graph menu, point to Formatting, and then choose the title to
format. The Preferences dialog box opens.
3 Define the color, font, alignment, frame, and other font options for the
text.
4 Click Apply to apply any formatting changes.
5 Click OK to close the dialog box and return to the graph.
6 On the File menu, select Save to save the new graph title format.
If you select All Titles, you can format all titles on the graph
at one time, but cannot change the actual text of the titles.
If DHTML is disabled: From the drop-down list, under Titles, select
All Titles, Title, Subtitle, or Footnote to specify the graph title to
format. Depending on the type of graph, you may also be able to
format Category Axis Title, Y1 Axis Title, or Y2 Axis Title. Then
click the check mark.
6 To display the title on the graph, select the Show check box.
7 Modify the name of the title as desired. You can use dynamic titles using
shortcuts; see the table below for the text you need to type to achieve a
dynamic title.
8 Specify the font type, size, color, and effects to apply to the selected title.
9 Click OK to update the graph and close the dialog box/panel.
Shortcuts for dynamic titles in MicroStrategy Web
You can create dynamic titles for a graph by typing a shortcut in the title. A
dynamic title is automatically generated every time a report is run. You can
use multiple shortcuts in the same title, and combine static text and
shortcuts.
For example, if you type Profit Forecast - {&CREATIONDATE} in a
graph title, when the report is executed the date that the report was created is
automatically displayed in the graph title, as follows: Profit Forecast -
4/15/11.
The table below lists the shortcuts you can use to create dynamic titles for a
graph.
Type This Shortcut In Title Title Displays This When Report Is Run
{&REPORTNAME} Name of the report, designated by the report's creator.
{&REPORTDESCRIPTION} Report description, as it appears in the report's Properties dialog box.
{&CREATIONDATE} Date the report was created.
{&CREATIONTIME] Time the report was created.
{&PROJECT} Project in which the report is located.
Graphing Advanced Reporting Guide 9
470 Formatting a graph report 2011 MicroStrategy, Inc.
Formatting number values on a graph in MicroStrategy Web
You can format the display of numbers on a graph. For example, you can
display the values along the Y-axis as currency, with two decimal places.
You can add tooltips that display additional information for the
values on the graph. For more information, see Creating tooltips
in a graph, page 485.
7 Specify the font type, size, color, and effects to apply to the selected label.
8 To apply labels, such as currency, percentages, or fractions, select the
Number tab. If DHTML is disabled, select the Number link.
9 From the Series Labels drop-down list at the top, select the series labels
to format. Then select a format category to display, such as Currency or
Percentage. When selected, some format categories have additional
settings such as the number of decimal places and how to display negative
numbers.
10 Click OK to apply the changes to the graph.
Formatting numeric values on a graph
While graphs rely on colors, objects, and patterns to provide insight into
data, the formatting of the numeric data is also a key component to
developing a graph that is easy to analyze and interpret.
Numeric data is often included on a graph as either a label for graph risers
and data points, or as a label for the increments of the graph axes. To
Graphing Advanced Reporting Guide 9
472 Formatting a graph report 2011 MicroStrategy, Inc.
understand the effect that numeric data formatting can have on the graph,
consider the graph shown below.
This graph displays revenue, profit, revenue percent contribution, and profit
margin information for various electronic product categories. Relationships
can be seen between the data for metric pairs of Revenue and Profit as well as
Revenue Percent Contribution and Profit Margin. However, notice that the
labels for each axis use a generic number formatting. This makes it difficult
to fully understand the data that is displayed for each metric.
Advanced Reporting Guide Graphing 9
2011 MicroStrategy, Inc. Formatting a graph report 473
The same graph is displayed below, with formatting applied to the numeric
values that serve as labels for the increments of the graph axes.
Notice that now the Revenue and Profit metrics are on an axis that is
displayed with a currency format, while the Revenue Percent Contribution
and Profit Margin metrics are on an axis that is displayed with a percentage
format. This simple formatting change makes it easy to understand the data
values at a glance.
There are two methods to applying formats to numeric values in a graph,
which are described in the following sections:
Inheriting the formatting of numeric values, page 473
Manually defining the formatting of numeric values, page 476
Inheriting the formatting of numeric values
Graphs in MicroStrategy can inherit the formatting of metric values and
other numeric values. This allows the same default formatting seen on a grid
Graphing Advanced Reporting Guide 9
474 Formatting a graph report 2011 MicroStrategy, Inc.
report to also be displayed on a graph report. For example, the simple report
shown below displays the quarterly percent growth for each region.
Since the Percent Growth metric uses a percentage format with two decimal
places, this formatting is applied by default when viewing this report as a
graph.
Notice that the highlighted labels on the left use the numeric formatting of
the Percent Growth metric.
If a graph does not apply the formatting of a metrics values by default, you
can define the graph to inherit the numeric formatting. The steps below show
you how to inherit numeric formatting for objects on a graph.
Advanced Reporting Guide Graphing 9
2011 MicroStrategy, Inc. Formatting a graph report 475
Prerequisites
A graph report has been created.
You are logged in to a project using MicroStrategy Desktop.
To inherit the formatting of numeric values
1 Open a report in Graph View.
2 From the Graph menu, select Graph Options. The Preferences dialog
box opens.
3 Browse to the Number Formatting category for the graph object that you
want to define the numeric formatting for:
Axis labels: To access the numeric formatting options for an axis label,
expand the Axes category, expand the category of the axis to format
(for example, X or Y), expand the Axis Labels category, and then
select Number Formatting.
Series data labels: To access the numeric formatting options for a
series data label, you must first choose to display series data labels
(see Displaying and formatting data labels, page 479). Then expand
the Series category, expand the Labels and Values category, and
then select Number Formatting.
4 In the Category pane for the number formatting options, select the
option to inherit numeric formatting:
If you are formatting values for axis labels, select Automatic. This
applies the numeric formatting automatically retrieved for the graph.
If you are formatting values for series data labels, select From Grid.
This applies the numeric formatting that is shown for the object on a
MicroStrategy grid report.
5 Click Apply to accept and apply your changes.
6 Click OK to return to the graph.
Graphing Advanced Reporting Guide 9
476 Formatting a graph report 2011 MicroStrategy, Inc.
Manually defining the formatting of numeric values
Graphs cannot always correctly inherit the formatting of metric values and
other numeric values. For example, the report shown below includes metrics
with two different numeric value formats.
Since there is more than one numeric value format used in the grid report,
the graph uses a generic numeric format by default. This is highlighted in the
Area graph shown below.
While these values do not automatically represent the numeric formatting of
the metric values, you can define the formatting for these values. The steps
below show you how to define numeric formatting for objects on a graph.
Advanced Reporting Guide Graphing 9
2011 MicroStrategy, Inc. Formatting a graph report 477
Prerequisites
A graph report has been created.
You are logged in to a project using MicroStrategy Desktop.
To manually define the formatting of numeric values
1 Open a report in Graph View.
2 From the Graph menu, select Graph Options. The Preferences dialog
box opens.
3 Browse to the Number Formatting category for the graph object that you
want to define the numeric formatting for:
Axis labels: To access the numeric formatting options for an axis label,
expand the Axes category, expand the category of the axis to format
(for example, X or Y), expand the Axis Labels category, and then
select Number Formatting.
Series data labels: To access the numeric formatting options for a
series data label, you must first choose to display series data labels
(see Displaying and formatting data labels, page 479). Then expand
the Series category, expand the Labels and Values category, and
then select Number Formatting.
4 In the Category pane for the number formatting options, select the
desired numeric formatting option:
General: Select this option to display numbers without any
punctuation or other formatting symbols or syntax. This is often used
as a default when a numeric format cannot be determined by default.
Fixed: Select this option to define the number of decimal places to
show, whether to include a thousands separator, and whether to use
an abbreviation such as thousands, millions, or billions.
Currency: Select this option to display number with various
formatting options that reflect monetary values. You can choose from
many different currency symbols, as well as how many decimal places
to display.
Date: Select this option to display numbers in a format that
represents the day of the year. A list of available formats to choose
from is provided.
Graphing Advanced Reporting Guide 9
478 Formatting a graph report 2011 MicroStrategy, Inc.
Time: Select this option to display numbers in a format that
represents the time of day. A list of available formats to choose from is
provided.
Percent: Select this option to display numbers in a percentage format.
For example, a value of .275 is displayed at 27.50% when displayed as
a percent. You can also define how many decimal places to display.
Fraction: Select this option to display numbers as fractions. A list of
available formats to choose from is provided.
Scientific: Select this option to display number in scientific notation.
Scientific format displays numbers as decimal numbers, with only one
digit to the left of the decimal point. E notation is used to describe the
true location of the decimal point.
For example, the number 123.456 in scientific format is
1.23456E+002. The E+002 means that the decimal points true
location is two digits to the right of its scientific value position.
Numbers that are less than zero use a slightly different format. For
example, the number .012345 in scientific format is 1.2345E-002. The
E-002 means that the decimal points true location is two digits to the
left of its scientific value position.
Special: Select this option to choose from various numeric formatting
options. Some of the special formatting options available include:
Zip code
Extended zip code
Phone number
Social security number
Automatic or From Grid, see Inheriting the formatting of numeric
values, page 473.
5 Click Apply to accept and apply your changes.
6 Click OK to return to the graph.
Advanced Reporting Guide Graphing 9
2011 MicroStrategy, Inc. Formatting a graph report 479
Displaying and formatting data labels
It is often convenient to display the numeric values for each data point on a
graph. For example, you may want to see individual numeric values along the
lines in your Line graph or the bars within your Bar graph.
If you choose to display data labels, you can also format them manually or
allow the system to apply an automatic format style.
To display data labels on a graph report
1 Open a report in Graph view.
2 On the Graph menu, point to Display, and then choose Data Label. The
data labels are displayed on your graph report.
3 The data labels and axes numbers are automatically formatted based on
the formatting of the metrics in Grid View, as long as all metrics are
formatted in the same manner. To apply different numeric formatting to
the data labels, see Formatting numeric values on a graph, page 471.
You can also manually format the data labels and axes and numbers by
following the steps below.
To manually format data labels and axes numbers on a graph
1 Open a report in Graph View.
2 On the Graph menu, select Graph Options. The Preferences dialog box
opens.
3 You can define the number formatting for all data labels, or for each data
label associated with each series in a graph:
To define the number formatting for all data labels, expand the Series
category, then expand Labels and Values, and then select Number
Formatting.
To define the number formatting for an individual data label, expand
the Series category, then expand the category for the series, then
expand Data Labels, and then select Number Formatting.
Graphing Advanced Reporting Guide 9
480 Formatting a graph report 2011 MicroStrategy, Inc.
4 In the Category pane for the number formatting options, select the
desired numeric formatting option. For detailed information on each
numeric formatting option, see Manually defining the formatting of
numeric values, page 476.
5 Click Apply to accept and apply your changes.
6 Click OK to return to the graph.
7 On the File menu, select Save to save your new data label or axis format
as part of the report definition.
Displaying and formatting a graph legend
The legend of a graph reflects the data displayed in the graph's Y-axis, also
called the graph series. This is the data that comes from the columns of the
corresponding grid report, and usually represents metrics.
A graph legend generally appears as a box to the right or left of your graph.
The box contains small samples of each color on the graph as well as a short
description of what each color means. A graph legend is a common
component of any graph report, because it helps the analyst understand what
the colors and shapes in the graph mean in terms of your data.
As you format your graph, you may find that you need to make a graph
legend visible or format it. Steps are below for displaying, hiding, and
formatting a graph legend in both Desktop and MicroStrategy Web.
Displaying and formatting a graph legend in Desktop
If a graph legend does not already appear on your graph report, display it
using the following steps.
To display a graph legend on the graph in Desktop
1 Make sure you are viewing your report in Graph or Grid Graph view.
Advanced Reporting Guide Graphing 9
2011 MicroStrategy, Inc. Formatting a graph report 481
2 From the Graph menu, select Display, then Legend. A graph legend is
displayed on your graph.
To remove the legend from the graph, select Legend again.
Order of categories
If boxes appear around the legend text, try clicking further outside
of the legend text area until a selection box with handles appears.
5 Drag and drop the legend to the desired location.
Advanced Reporting Guide Graphing 9
2011 MicroStrategy, Inc. Formatting a graph report 493
6 Save the graph.
Resizing a graph
You can manually resize the elements on your graph, including the graph
chart itself, if manual layout is enabled, as explained in Pros and cons of
manual and automatic graph layout, page 489.
The following procedure guides you in resizing the actual graph chart within
your graph report.
To manually resize a graph
1 View a report in Graph view.
2 Make sure manual layout mode is enabled. See Pros and cons of manual
and automatic graph layout, page 489 for the necessary steps.
3 Click a section of the graph that is blank. For example, do not click the
actual bars or lines of your graph; instead, click the graphs background.
Handles appear around the graph frame.
4 Use the handles on each side and corner of the graph to manually resize
the graph.
Resizing a 3D graph using Auto Arrange
When you set the font size for an axis label to a very large value in a non-3D
graph, the graph shrinks to accommodate the new font size. However, in 3D
graphs, after you resize the font to the original value, the graph does not
expand to its original size. You can resize the 3D graph to its original size by
using the Auto Arrange option. This option can be accessed from the Graph
menu of the Report Editor.
Prerequisites
A graph with a 3D graph style has been created.
Graphing Advanced Reporting Guide 9
494 Formatting a graph report 2011 MicroStrategy, Inc.
To resize a 3D graph using Auto Arrange
1 View a report in Graph view, using one of the available 3D graph styles.
2 From the Graph menu, select Auto Arrange.
Scaling a graph
Configuring the scaling of your graph is one of the most important steps in
creating a clear and useful graph report. A graphs scale determines the range
of values that appears on your graphs axes, which directly affects how data is
presented on your graph. Scaling differs from resizing in that scaling
determines how data is measured along each axis. Resizing does not affect
actual measurements of data or how that data is presented as a graph.
When you switch a report from Grid view to Graph view for the first time, the
graph scaling is automatically set for you. For example, if revenue data does
not exceed $5,000 in your grid report, then $5,000 may be set as the highest
label on the Y-axis.
To scale your graph efficiently, analyze the data on your grid report and then
base your scaling decisions on that data. For example, if profit data on your
grid report does not exceed $500,000, consider setting $500,000 as the
maximum value on the appropriate axis. This allows elements on your graph
such as bars in a Bar graph to be rendered at a considerable size, making it
easier for you to view and analyze the data on your graph.
Consider another example. In the report grid in the following image, notice
there are no more than 1,049 active customers for any given month.
Therefore, the labels on the Y-axis on the graph report do not exceed 1,200.
When you switch a grid report to a graph, the scaling of the graph is
automatically determined for you. In this case, MicroStrategy Desktop
produces a graph whose Y-axis does not exceed 1,200. This scaling allows the
bars on the graph to appear at a considerable size, which makes the graph
Advanced Reporting Guide Graphing 9
2011 MicroStrategy, Inc. Formatting a graph report 495
more attractive and usable. The grid report and resulting graph report are
shown below.
While the automatic scaling displays the active and retained customer data
effectively, notice that the new and lost customer data is difficult to interpret
from this graph. Another option to improve the scaling of a graph is to use a
dual Y-axis. These two axes can then be used to display metrics with similar
values when the relative scale of some metric data is far different than the
scale of other metric data on the graph. For example, the same graph is
displayed below with a dual Y-axis that displays Active Customers and
Graphing Advanced Reporting Guide 9
496 Formatting a graph report 2011 MicroStrategy, Inc.
Retained Customers on one Y-axis, and New Customers and Lost Customers
on another Y-axis.
Notice in the graph above that by putting the metrics on separate Y-axes, the
scale is improved for the data and all data is easier to interpret and analyze.
To further adjust the scale of the graph, you can change the top Y-axis to have
a maximum of 1,100 and a minimum of 900. Additionally, you can change
Advanced Reporting Guide Graphing 9
2011 MicroStrategy, Inc. Formatting a graph report 497
the bottom Y-axis to have a maximum of 50. This modified graph is shown
below.
Notice how defining a minimum of 900 for the top graph provides more
clarity to the Active Customers and Retained Customers metric values. It is
now much easier to see the differences in active and retained customers for
each month. This shows that it is just as important to define a good
minimum value for a graph as it is to define a good maximum value.
Also, defining a slightly smaller maximum of 50 for the bottom graph has
provided a small improvement to the display of data.
The procedure below show you how to manually define the scale of your
graph. Steps are provided to adjust scaling in both Desktop and
MicroStrategy Web.
Scaling a graph in Desktop
Prerequisites
A graph report has been created.
You are logged in to a project using MicroStrategy Desktop.
Graphing Advanced Reporting Guide 9
498 Formatting a graph report 2011 MicroStrategy, Inc.
To manually scale a graph
1 In Desktop, view a report in Graph view.
2 Select one of the data labels along any of the axes on your graph.
3 From the Graph menu, select Grids and Scales. The Preferences dialog
box opens.
4 Underneath the Axes category, select one of the available Y-axis
categories.
If the graph uses a dual Y-axis you can define the minimum and
maximum values for the two Y-axes. To define a graph to use a dual
Y-axis, see Defining a graph to use a dual Y-axis in Desktop, page 499.
If the graph uses three-dimensional formatting, you can define the
minimum and maximum values for the X-axis and the Y-axis.
5 In the Use Manual Setting area, select the Maximum Value and
Minimum Value check boxes. You can then type in the maximum and
minimum values to define for the Y-axis of the graph.
Area
Bar
Line
Scatter
Polar
Radar
Bubble
Two or more objects (commonly metrics) are included in the series of the
graph report.
You are logged in to a project using MicroStrategy Desktop.
To use a dual Y-axis in Desktop
1 In Desktop, view a report in Graph view.
2 From the Graph menu, select Graph Options. The Preferences dialog
box opens.
3 Select the Layout category.
4 Select the Dual Axis check box. This displays each Y-axis overlaid on top
of the other, with each axis using a different color.
5 If you want each Y-axis to be displayed separately, select the Split Dual
Axis check box. Displaying a dual Y-axis in this manner can make the
graph easier to analyze and interpret.
6 Select the Dual Y Options category To define which Y-axis each series
object (commonly metrics) is displayed on.
Graphing Advanced Reporting Guide 9
500 Formatting a graph report 2011 MicroStrategy, Inc.
7 Select series objects in the Primary Axis or Secondary Axis panes and
use the arrow button to change the axis the series object is displayed on.
You should include series objects on the same axis if they have similar
data ranges. For example, review the reports described in Scaling a
graph, page 494 which use one Y-axis for metrics that have values
between 900-1,000 and use a second Y-axis for metrics that have values
between 0-50.
You cannot access the custom graph styles you create from the Graph
Styles dialog box. You must follow the steps in this procedure to
access and apply any custom graph styles.
To apply a custom graph style to a graph
1 Select the report to which you want to apply the custom graph style, and
display the report in Graph view.
2 From the Graph menu, select Apply Graph Style. The Apply Graph Style
dialog box opens.
3 Navigate to the custom graph style of your choice. The extension for
custom graph styles is .3TF.
Graphing Advanced Reporting Guide 9
506 Formatting a graph report 2011 MicroStrategy, Inc.
4 Select the file and click Open. Your graph is updated with the formatting
that is part of the graph style template you selected.
Example: Saving and applying a custom graph style
The following example demonstrates how you can save a formatted graph as
a new, custom graph style, and then apply the new graph style to another
graph.
Notice the following formatting qualities of the graph report below:
The large font of the title
The Line graph style that uses different colors
Markers are displayed as small triangles for each data point
The legend appears below the graph rather than on the right side
The legend labels do not include the metric name Revenue by selecting
the Suppress last level labels option in the Graph Preferences dialog
box within the Options: General category
You save this specific graph formatting as a new graph style. For the steps to
take to save graph formatting as a new graph style, see Saving and applying
a custom graph style, page 504.
Advanced Reporting Guide Graphing 9
2011 MicroStrategy, Inc. Formatting a graph report 507
Now that you have saved the new graph style, you are considering applying
the style to the following graph report.
When you apply the custom graph style to the report above, the reports
formatting changes according to your custom graph style, as shown in the
image below.
Graphing Advanced Reporting Guide 9
508 Choosing a graph image format for HTML documents and Web 2011 MicroStrategy, Inc.
The overall formatting of the Sales by Region report was updated according
to the custom graph style you created from another report.
Choosing a graph image format for HTML
documents and Web
When you create and save a graph in MicroStrategy Desktop, you should
consider whether users will access the graph in MicroStrategy Web, for
example, in a report or HTML document. The image format assigned to a
graph report directly affects how the graph is executed in graphs and HTML
documents in MicroStrategy Web.
The report details properties at the report and project levels are the
same; the only differences are where you configure the properties and
what they affect.
Configuring the display of object name delimiters for report
details
One property, Use delimiters around metadata object names, is used in
all the different types of report details. Metadata objects include attributes
and metrics. Delimiters are the characters around these objects which set
them off from other text. Braces (that is, {}) are used as delimiters. You can
select whether to:
Display delimiters for all metadata objects
Omit delimiters for all metadata objects
Advanced Reporting Guide Displaying Information about Reports: Report Details 10
2011 MicroStrategy, Inc. Configuring report details properties 519
Display delimiters only for those objects that contain a special character
(Automatic)
You can disable the report details preferences when you save changes
to the report details properties (as described in the following
procedure) or by using the Desktop Preferences dialog box (for
instructions, see To disable report details preferences, page 517).
If you do not disable the report details preferences, they override some of the
report details properties that deal with the content of the report details.
These include whether the following types of report details are displayed:
Report description
Prompt details
Filter details
Template/metric details
If the report details preferences specify that a type of report details is not
displayed, you cannot display that type using the Report Details Properties
dialog box.
Advanced Reporting Guide Displaying Information about Reports: Report Details 10
2011 MicroStrategy, Inc. Configuring report details properties 523
If the report details preferences specify that a type of a report details is
displayed, you cannot hide that type using the Report Details Properties
dialog box. You can use the Report Details Properties dialog box to configure
how that type is displayed, however.
To configure the report details
1 Disable the report details preferences, if you have not already done so.
For instructions, see To disable report details preferences, page 517.
2 Do one of the following to access the Report Details Properties dialog
box:
To configure the report details for the entire project:
a In MicroStrategy Desktop, right-click the project that you want to
work with, and select Project Configuration. The Project
Configuration Editor opens.
b In the Categories list, expand Project Definition, and then select
Document and Reports.
c Click Report Details Properties.
To configure the report details for a specific report:
a Open the report. You can either edit it or execute it.
b From the Data menu, select Report Details Properties.
3 Click the General tab.
To disable report details preferences, click Yes. The changes that you
made affect the display of report details in this report, and report
details preferences are disabled for all reports.
Metric formulas
Metric dimensionality
Metric conditionality
Metric transformation
A report that does not use a template does not display a name.
Displaying Information about Reports: Report Details Advanced Reporting Guide 10
528 Configuring the template details 2011 MicroStrategy, Inc.
To always display a template name, set the Base Template name
property to Yes.
You can disable the report details preferences when you save changes
to the report details properties (as described in the following
procedure) or by using the Desktop Preferences dialog box (for
instructions, see To disable report details preferences, page 517).
If you do not disable the report details preferences, they override some of the
report details properties that deal with the content of the report details.
These include whether the template/metric details are displayed.
If the report details preferences specify that the template/metric details are
not displayed, you cannot display them using the Report Details Properties
dialog box. If the report details preferences specify that the template/metric
details are displayed, you cannot hide them using the Report Details
Properties dialog box. You can use the Report Details Properties dialog box
to configure how they are displayed, however.
To configure the template details
1 Disable the report details preferences, if you have not already done so.
For instructions, see To disable report details preferences, page 517.
Advanced Reporting Guide Displaying Information about Reports: Report Details 10
2011 MicroStrategy, Inc. Configuring the template details 531
2 Do one of the following to access the Report Details Properties dialog
box:
To configure the template details for the entire project:
a In MicroStrategy Desktop, right-click the project that you want to
work with, and select Project Configuration. The Project
Configuration Editor opens.
b In the Categories list, expand Project Definition, and then select
Document and Reports.
c Click Report Details Properties.
To configure the template details for a specific report:
a Open the report. You can either edit it or execute it.
b From the Data menu, select Report Details Properties.
3 Click the General tab.
4 Ensure that template details are displayed (that is, Template Details is
set to Yes).
5 Click the Template Details tab.
To disable report details preferences, click Yes. The changes that you
made affect the display of template details in this report, and report
details preferences are disabled for all reports.
Display nothing
Display No Selection
Display All/None
Whether the word All or None displays depends on the type of
prompt. For example, an unanswered object prompt displays as
None, because no objects are selected. An unanswered filter
definition prompt displays as All because the report is not filtered
and therefore all the objects appear on the report.
Whether and how to display the attribute name for the attribute element
list prompts in the report. The options are:
Repeat the attribute name for each prompt answer (for example,
Region = North, Region = South)
You can disable the report details preferences when you save changes
to the report details properties (as described in the following
procedure) or by using the Desktop Preferences dialog box (for
instructions, see To disable report details preferences, page 517).
If you do not disable the report details preferences, they override some of the
report details properties that deal with the content of the report details.
These include whether the prompt details are displayed.
Displaying Information about Reports: Report Details Advanced Reporting Guide 10
538 Configuring the prompt details 2011 MicroStrategy, Inc.
If the report details preferences specify that the prompt details are not
displayed, you cannot display them using the Report Details Properties
dialog box. If the report details preferences specify that the prompt details
are displayed, you cannot hide them using the Report Details Properties
dialog box. You can use the Report Details Properties dialog box to configure
how they are displayed, however.
To configure the prompt details
1 Disable the report details preferences, if you have not already done so.
For instructions, see To disable report details preferences, page 517.
2 Do one of the following to access the Report Details Properties dialog
box:
To configure the prompt details for the entire project:
a In MicroStrategy Desktop, right-click the project that you want to
work with, and select Project Configuration. The Project
Configuration Editor opens.
b In the Categories list, expand Project Definition, and then select
Document and Reports.
c Click Report Details Properties.
To configure the prompt details for a specific report:
a Open the report. You can either edit it or execute it.
b From the Data menu, select Report Details Properties.
3 Click the General tab.
4 Ensure that prompt details are displayed (that is, Prompt Details is set to
Yes).
To disable report details preferences, click Yes. The changes that you
made affect the display of prompt details in this report, and report
details preferences are disabled for all reports.
This section assumes that you are familiar with filters, especially the
different types of filters, stand-alone vs. embedded filters, and the
components of filters. For background information, see the
MicroStrategy Basic Reporting Guide.
The filter details display information about the report filter and report limit
used in the report by default, although other types of filters can be displayed.
The filter details have many configuration properties, which can be grouped
into the following categories. This list does not describe all the properties; it
is only a summary.
You can configure the content of the filter details, by selecting which filter
types to include (report filter, view filter, report limits, and so on) and
how the filters are displayed. For example, you can select whether to
include the name of the filter type and whether to display the report
limits before or after view filters. See Configuring the content of the filter
details, page 541 for descriptions of all these options.
For filters that contain attribute element list qualifications, you can
configure how those lists are displayed. For example, you can specify
whether to show the attribute name (such as Region or Category) and the
separator between attribute names. See Configuring how attribute
element list qualifications are displayed, page 548 for descriptions of all
these options.
You can configure how attribute form and set qualifications in filters are
displayed. For example, you can select whether to use names or symbols
for the operators. See Configuring how attribute form and set
qualifications are displayed, page 550 for descriptions of all these
options.
You can configure how logical operators, which join multiple
qualifications or filters, are displayed. For example, you can configure
whether to include parentheses around conditions. See Configuring how
logical operators are displayed, page 552 for descriptions of all these
options.
You can configure whether aliases replace object names in the filter
details. See Configuring whether to use aliases in the filter details,
page 555 for a detailed description of this option.
For the procedure to configure the filter details, see Configuring the filter
details: Procedure, page 556.
Advanced Reporting Guide Displaying Information about Reports: Report Details 10
2011 MicroStrategy, Inc. Configuring the filter details 541
Interaction of report details preferences and filter details for
reports
Ensure that the report details preferences are disabled, which allows the
report details properties to be used instead. For more information on report
details preferences, see Enabling and customizing report details
preferences, page 558.
You can disable the report details preferences when you save changes
to the report details properties (as described in Configuring the filter
details: Procedure, page 556) or by using the Desktop Preferences
dialog box (for instructions, see To disable report details preferences,
page 517).
If you do not disable the report details preferences, they override some of the
report details properties that deal with the content of the report details.
These include whether the filter details are displayed.
If the report details preferences specify that the filter details are not
displayed, you cannot display them using the Report Details Properties
dialog box. If the report details preferences specify that the filter details are
displayed, you cannot hide them using the Report Details Properties dialog
box. You can use the Report Details Properties dialog box to configure how
they are displayed, however.
Configuring the content of the filter details
You can choose whether or not to include each type of filter. The filter types
are listed below:
Report Filter
If the report filter is displayed, you can select whether or not to display
the following:
Report Filter Name. You can also select another option, Automatic.
If Automatic is chosen, the report filter name is displayed for a
stand-alone filter, but is omitted for an embedded filter.
The report sample above does not have a new line between the
filter types or after the filter type name.
Whether to show the report limits before or after the view filter.
Whether to expand shortcut filters, which are stand-alone filters used in
the report filter. The options are:
or
and
custom (in the Custom separator field, type the characters to use as
the separator)
New line between elements: Determines whether or not each attribute
element displays on a separate line.
Trim elements: Determines whether extra spaces in the attribute
elements are deleted. For example, an element of an account attribute is
PSI2415 : 10 : COMMERCIAL. If Trim elements is enabled, the attribute
is displayed as PSI2415:10:COMMERCIAL, omitting the extra spaces.
You can also choose to inherit the setting instead, as described in Levels of
report details configuration, page 515.
In the report sample below:
Show attribute name for In List conditions = Yes
New line after attribute name = Yes
Separator between last two elements = custom
Custom separator = , and (note that a space is included after the word
and)
Displaying Information about Reports: Report Details Advanced Reporting Guide 10
550 Configuring the filter details 2011 MicroStrategy, Inc.
New line between elements = No
In the following report sample:
Show attribute name for In List conditions = Repeated
New line after attribute name = No
Separator between last two elements = comma
New line between elements = Yes
Configuring how attribute form and set qualifications are
displayed
A filter can contain:
An attribute form qualification, which is based on attribute forms (such
as First Name and Last Name for the Customer attribute)
A metric set qualification, which is based on metric value or rank
A relationship set qualification, which is based on relationships between
attributes
Advanced Reporting Guide Displaying Information about Reports: Report Details 10
2011 MicroStrategy, Inc. Configuring the filter details 551
For more information on these types of filter qualifications, see the
MicroStrategy Basic Reporting Guide.
For these types of filters, you can configure how the qualifications are
displayed using the following properties:
Use names or symbols for operators: Determines whether names
(such as Equals or Greater Than) or symbols (such as = or >) are
displayed.
For example, the filter details displayed below use a symbol to indicate
the operator:
Revenue > 6000000
The filter details displayed below use a name:
Revenue Greater than 6000000
Include attribute form names in qualification conditions: For
conditions in attribute qualification filters, determines whether or not to
display attribute form names (such as DESC or ID).
For example, the filter details displayed below include the attribute form
name (DESC):
(Region (DESC) Begins with "North")
These filter details do not display the attribute form name:
(Region Begins with "North")
Dynamic dates: Determines whether dynamic dates are shown as the
date or as the expression that calculates the date.
For example, the filter details displayed below includes the date:
Day = 4/24/2008
The filter details shown below display the dynamic date expression:
Day = Today minus 12 Month(s)
For all these properties, you can also choose to inherit the setting instead, as
described in Levels of report details configuration, page 515.
Displaying Information about Reports: Report Details Advanced Reporting Guide 10
552 Configuring the filter details 2011 MicroStrategy, Inc.
Configuring how logical operators are displayed
Filters can have multiple qualifications, which are the conditions (such as
Revenue > 6,000,000) that the data must meet to be included in a report. A
report can also contain multiple filters in its report filter. For example, a
report filter contains two filters, East Coast Regions and Revenue > $6M.
The filters are joined by a logical operator, which is AND in this case.
Use the following properties to configure how to display the logical operators
that join multiple conditions:
New line between conditions: Determines whether or not each
condition is placed on a separate line. You can also select Automatic,
which inserts a line only when conditions are joined by different logical
operators.
For example, a report is filtered for revenue greater than $5 million and
profit greater than $800,000 and the Northeast region. The filter details
use the Automatic option for New line between conditions. Because
the conditions are joined by the same logical operator (and), the
conditions are displayed on the same line.
A second report uses the same filter conditions, except the second logical
operator is replaced by OR; the report is filtered for revenue greater than
$5 million and either profit greater than $800,000 or the Northeast
region. The New line between conditions property is still set to
Advanced Reporting Guide Displaying Information about Reports: Report Details 10
2011 MicroStrategy, Inc. Configuring the filter details 553
Automatic. A new line is started at the logical operator AND, and again
before the second condition. Using the new lines helps to distinguish the
conditions.
To disable report details preferences, click Yes. The changes that you
made affect the display of filter details in this report, and report
details preferences are disabled for all reports.
If you clear the Show report details check box, the rest of the
options on this interface become unavailable.
4 To define the size, color, or type of font for report detail display, click
Font Options. The Font dialog box opens. Once you have formatted the
font, click OK to return to the Desktop Preferences dialog box.
5 By default, these preferences override some of the report details
properties that are configured in the Report Details Properties dialog box.
To use the report details properties instead, disable the report details
preferences by clearing the Apply these Desktop preferences to the
Report Details check box.
For a list of prompt types, see the Building Query Objects and Queries
chapter in the MicroStrategy Basic Reporting Guide. For a more
extensive description of each prompt type from an analysts
perspective, with images of each prompt as it appears to users, see the
Answering Prompts and Refreshing Data chapter of the
MicroStrategy Basic Reporting Guide.
Prompt Answer
Method
Requirements Prompts in the Target Are Answered By...
Answer with the
same prompt
Same prompt in the target
and source
The prompt answer from the source
Prompt user None The user (prompts are displayed when the target is
executed)
Default answer None The default prompt answer for the target prompt
Dynamically Attribute element
prompt in target
Value prompt in target
(available only in
MicroStrategy Web)
The object selected in the source (for example, the
attribute element or metric value that the user clicked
on)
Empty answer Target prompt must not be
required
Nothing (no prompt answer is provided from the source
and the user is not prompted)
Static element list Attribute element prompt
in target
List of elements created by the link designer
Used to pass attribute elements from conditional
metrics to the target
Current unit Hierarchy prompt in target The object selected in the source (for example, the
attribute element that the user clicked on)
All valid units Hierarchy prompt in target Any object to the left of or above the user selection in
the source
Linking Reports and Documents Advanced Reporting Guide 11
572 About links 2011 MicroStrategy, Inc.
Answer with the same prompt. The same prompt answers that were
used to execute the source are used in the target.
For example, the Prompted Regional Revenue report links regions to
another report called Revenue by Category. Both reports contain the
same prompt, which prompts the user to select the regions to display on
the report. A user executes the Prompted Regional Revenue report and
selects Mid-Atlantic, Northeast, and Southeast when prompted. He
right-clicks Mid-Atlantic and selects the link to the Revenue by
Category report. The Revenue by Category report displays data for all
three regions, although only one region was selected in the link. For an
expanded description of this example, with sample reports, see
Answering target prompts with the source prompt answers, page 575.
Prompt user. When the target is executed, the user is prompted to
provide answers manually.
For example, the Regional Revenue report links regions to another
report called Revenue by Category, which is prompted for regions. A
user right-clicks Mid-Atlantic on the Regional Revenue report, and
selects the link to the Revenue by Category report. The regional prompt
is displayed, although a region was selected on the source report. The
Prompt user prompt method does not pass information to the target
report, so the user must answer the prompts manually.
Default answer. The prompt is answered by the default prompt answer
for the prompt in the target. If the target prompt does not have a default
answer, the Empty answer method is used. That is, the prompt is not
answered, unless it is required, in which case the user is prompted.
For example, continue with the same Regional Revenue and Revenue
by Category reports described above. This time, however, the Default
answer prompt method is used in the link, and the regional prompt has a
default answer of Central. When a user right-clicks Mid-Atlantic on the
Regional Revenue report, the Revenue by Category report displays
data for Central.
Dynamically. The object selected in the source is passed to the prompt in
the target. If this object does not answer the target prompt, the Empty
answer method is used. That is, the prompt is not answered, unless it is
required, in which case the user is prompted.
Available for attribute element prompts and value prompts only.
The prompt must not be required, otherwise, after the user clicks
the link, the prompt is executed and must be answered before the
target will execute.
The Empty prompt answer method, when used in conjunction with the
dynamic prompt answer method (described above), allows a source
report to answer one prompt in a target report with the user selection,
while ignoring any other prompts.
For example, a source report contains Region in the rows and Category in
the columns. Both attributes link to the same target report, which
prompts for Region and Category. If a user clicks Central in the source,
the target report is executed, with data for all categories for the Central
region. If a user clicks Books in the source, the target is executed, with
data for all regions for the Books category. The prompt for the selected
attribute is answered using the dynamic prompt answer method, while
the prompt for the other attribute is ignored, using the Empty answer
prompt method. No prompt answer is provided to the target, but the user
is not prompted, either. For a more detailed explanation of the Empty
answer prompt answer method, including samples, see Ignoring target
prompts: Using the Empty answer prompt method, page 576.
Static element list. This method answers the target prompt with a list of
elements. This allows you to pass fixed conditions to the target.
Once you select this method when you are creating the link, the Element
List area becomes available, allowing you to select the elements that will
be passed as answers to the element list prompt in the target.
Available for attribute element prompts only.
Linking Reports and Documents Advanced Reporting Guide 11
574 About links 2011 MicroStrategy, Inc.
Use Static element list when you link from a conditional metric.
Conditional metrics are filtered by attribute elements, and this prompt
method allows you to pass those elements to the target. For an example,
and more details on this method, see Passing metric conditions: Using
the Static element list answer prompt method, page 578.
This method also allows you to pass characteristics and key figures from
MDX cubes to the target; for more information on using links with MDX
cubes, see Passing MDX cube data: Using the Static element list answer
prompt method, page 581.
The prompt answer methods listed below are available for hierarchy prompts
only. The source report used in these examples contains Category, Region,
and Revenue. The source report links Region to the target report, which
contains the Geography hierarchy and Revenue, with a hierarchy prompt in
the report filter.
Current unit. Similar to the Dynamic prompt answer method, where the
prompt is answered using the object selected in the source. If the user
selects an attribute header rather than a specific attribute element, the
Empty answer method is used. That is, the prompt is not answered,
unless it is required, in which case the user is prompted.
For example, if the link uses this prompt answer method, when the user
clicks Central in the target report, the target displays all the revenue for
the Central region. The report is filtered on Region only.
All valid units. Any object to the left of or above the user selection in the
source is used as the prompt answer for the target. In other words, this
method passes all the selections made on the source, rather than just the
selection made for the link. If the user does not select any valid objects
(for example, the user selects an attribute header rather than a specific
attribute element), the Empty answer method is used. That is, the
prompt is not answered, unless it is required, in which case the user is
prompted.
For example, if a user selects Central in the target report, a category is
also selected. When the user clicks Central in the source, if the link uses
this prompt answer method, the target report displays the revenue from
the Central region, but only for the category that was selected in the
target. The report is filtered on Region and Category.
For a more detailed comparison of these two methods, and report samples,
see Prompt answer methods for hierarchy prompts, page 582.
Advanced Reporting Guide Linking Reports and Documents 11
2011 MicroStrategy, Inc. About links 575
Answering target prompts with the source prompt answers
When you select the Answer with the same prompt method, the existing
prompt answers from the source are used in the target. To use this method,
the target and the source must use the same prompt. If the same prompt
does not exist in the source and in the target, the user is prompted when the
target is executed.
For example, the regions in the Prompted Regional Revenue report have
links to another report called Revenue by Category. Both reports contain
the same prompt, which prompts the user to select the regions to display on
the report. Execute the Prompted Regional Revenue report and select
Mid-Atlantic, Northeast, and Southeast when prompted. The results are
shown below, in Desktop.
Right-click Mid-Atlantic and select the link to the Revenue by Category
report. The Revenue by Category report displays data for all three regions,
as shown below, although only one region was selected in the link.
Linking Reports and Documents Advanced Reporting Guide 11
576 About links 2011 MicroStrategy, Inc.
Ignoring target prompts: Using the Empty answer prompt
method
When you select the Empty prompt method, the prompt in the target report
or document is ignored. This means that the prompt is not answerednot by
the selections made on the source, by the default prompt answer, or by
prompting the user. You must ensure that the prompt is not required,
however, because in that case the user is prompted when the target is
executed from the link in the source. The Empty prompt answer method,
when used in conjunction with the dynamic prompt answer method, allows a
source report to answer one prompt in a target report with the user selection,
while ignoring any other prompts.
For example, the following report contains Region on the rows, and Category
and Revenue in the columns. Region contains a link, as shown in the
following image:
When the selected link is run, the following report is displayed:
Note that only the selected region (Central) is displayed in the target. All
categories are also displayed.
Advanced Reporting Guide Linking Reports and Documents 11
2011 MicroStrategy, Inc. About links 577
Return to the source report, which contains a link on Category as well, as
shown in the following image:
When the selected link is run, the following report is displayed:
This is the same target report as the other link, however, only the selected
category (Books) is displayed. All the regions are displayed. How does this
work?
The target report contains two prompts, one for Region and one for
Category, but the user makes only one selection (a region or a category), yet
is not prompted for the other. This is because the prompts in the link
definition use different prompt answer methods. The link on region uses the
following prompt answer methods:
Region prompt: Dynamic
Category prompt: Empty answer
Linking Reports and Documents Advanced Reporting Guide 11
578 About links 2011 MicroStrategy, Inc.
This passes the selected region to the target, to answer the region prompt,
and ignores the category prompt. Likewise, the link on category uses the
following prompt answer methods:
Region prompt: Empty answer
Category prompt: Dynamic method
This passes the selected category to the target, to answer the category
prompt, and ignores the region prompt.
If you do not add any elements to the element list, the Empty answer
method is used. That is, the prompt is not answered, unless it is
required, in which case the user is prompted.
In this example, the target report is prompted for Category. Each conditional
metric in the source report contains a link to the target. In the link, the
Category prompt uses the Static element list prompt answer method. For the
link from the Books Revenue metric, the list contains Books. For the link
from the Movies Revenue metric, the list contains Movies, and so on.
The target report also contains prompts for Region and Customer. In the
links in the example above, those prompts use the Empty answer prompt
method. The prompts are not answered; no data about Region or Customer
is passed from the source to the target. The region and customer selections
can be passed to the target if the Dynamic prompt method is used instead.
The following source report is based on the previous example, but the Region
and Customer prompts now use the Dynamic prompt method instead of
Empty answer. Notice that the link name has changed as well to reflect this
change; the link name is very important to help a user understand what the
target report will contain.
Note that only a portion of the source report is shown; all regions and
customers are included on the report.
Advanced Reporting Guide Linking Reports and Documents 11
2011 MicroStrategy, Inc. About links 581
When the link is run, the following target report is displayed. This report is
shown in its entirety.
Only the Region (Central) and Customer (Warner Aadland) selected in the
source report are included on this target report. The report is also filtered by
Category, as before.
Instructions for creating this example are provided in Creating linked
reports that answer prompts using metric conditions, page 597.
The Static element list method also allows you to pass characteristics and
key figures from MDX cubes to the target; for more information on using
links with MDX cubes, see Passing MDX cube data: Using the Static
element list answer prompt method below.
Passing MDX cube data: Using the Static element list answer
prompt method
You can use an MDX cube report as a source report, and pass data from the
MDX cube to the target, just as you can with any other report. The difference
is that an MDX cube report uses data from an MDX cube source, and this
data must be passed to the target using static element lists.
The data from the MDX cube can include characteristics and key figures.
Characteristics are translated into dimensions in MicroStrategy, and
characteristic values into attribute elements. An example of a
characteristic is Sales Region, with characteristic values of North,
Central, and South.
Key figures are numeric and time-related data, such as revenue figures,
months, and years.
In MicroStrategy Web, you must execute the report before you can
create links.
2 Right-click the object to create a link from, and select Edit Links. The
Link Editor opens.
Answer with the same prompt. The same prompt answers that were
used to execute the source are used in the target. To use this method,
the target and the source must use the same prompt.
Static element list. This method overrides the prompt answers from
the source with a list of elements. Once you select this method when
you are creating the link, the Element List area becomes available,
allowing you to select the elements that will be passed as answers to
the element list prompt in the target.
Available for attribute element prompts only.
All valid units. Any object to the left of or above the user selection in
the source is used as the prompt answer for the target. In other words,
Advanced Reporting Guide Linking Reports and Documents 11
2011 MicroStrategy, Inc. Creating links 591
this method passes all the selections made on the source, rather than
just the selection made for the link.
Available for hierarchy prompts only.
Prompt user
Default answer
Empty answer
This procedure assumes you have already created the link that you
want to copy. For instructions, see To create a link, page 589.
1 Open the report. You can edit the report or execute it.
In MicroStrategy Web, you must execute the report before you can
copy links.
2 Right-click the object that contains the link to be copied, and select Edit
Links. The Link Editor opens.
3 Click Copy Links. The Copy Links dialog box opens.
4 In the list under Select the links to be copied, select the link or links to
be copied.
5 In the list under Select the units to which the selected links will be
copied, select the object or objects to copy the links to.
Linking Reports and Documents Advanced Reporting Guide 11
594 Creating linked reports 2011 MicroStrategy, Inc.
6 You can choose whether or not to copy the Open in a new window
setting to the new link. This setting determines whether the target opens
in the same window as the source (replacing the source) or in a new
window (simultaneously displaying the target and the source) in
MicroStrategy Web.
Right-click the object that contains the new link, and select Edit
Links. The Link Editor opens.
Reports that are built using the Freeform SQL feature are referred to
as Freeform SQL reports in this chapter.
The Freeform SQL feature allows you to use your own SQL statements to
access data from various ODBC data sources, including relational databases,
Excel files, and flat files, as long as they are included in the MicroStrategy
environment. Since you create your own SQL statements to create reports
with Freeform SQL, a strong knowledge of how to create and use SQL
statements is essential.
Details on how to create Freeform SQL reports from these ODBC data
sources are discussed in this chapter.
Advanced Reporting Guide Custom SQL Queries: Freeform SQL and Query Builder 12
2011 MicroStrategy, Inc. Customize your SQL statements: Freeform SQL 609
The following image is an illustration of the Freeform SQL Editor, where you
define the SQL statement for the report. Notice the different panes for
different purposes.
Usage scenarios and SQL standards
How to use the Freeform SQL feature effectively depends on your work
environment. As with every other MicroStrategy functionality, before you
start using this feature, you need to assess your particular work situation and
find a way to strike a good balance between project maintainability and
fast-paced development. For example, building three or four Freeform SQL
reports could be very valuable, but building 100 such reports could make
maintenance and testing very difficult.
Whether you should use the Freeform SQL feature to build reports at all is
another question that you should ask yourself. You may want to consider
using this feature if you are in one of the situations discussed below. For
Custom SQL Queries: Freeform SQL and Query Builder Advanced Reporting Guide 12
610 Customize your SQL statements: Freeform SQL 2011 MicroStrategy, Inc.
information on using the Freeform SQL Editor to report on third-party web
services, see Reporting on third-party web services with XQuery, page 638.
When should I use the Freeform SQL feature?
If your company is accustomed to creating static reports using customized
SQL to retrieve data from a certain ODBC data source, and especially if your
SQL queries have worked well in the past, then you may want to simply use
MicroStrategy to deploy those reports to your users. There is no need to
recreate the SQL with the MicroStrategy Engine, as is done if the data is
moved to a data warehouse for report generation. Freeform SQL allows you
to use your own SQL statements rather than generating new and possibly
different SQL statements.
If you have existing stored procedures that have proven to be successful, then
you can continue to use them to generate MicroStrategy reports. One
important thing to note is that you must know what data the stored
procedure is supposed to retrieve because this information is essential in
building a Freeform SQL report. Specifically, you need to know the number
of columns, column names, and their data types, all of which are necessary
for mapping the columns to MicroStrategy objects.
Another situation for which you might want to use Freeform SQL reporting is
when you need to run queries against a set of OLTP tables that are not set up
for OLAP analysis. Data warehouses that do not lend themselves well to
MicroStrategys attribute and fact schema can be accessed with Freeform
SQL and mapped to new MicroStrategy objects automatically created by the
Freeform SQL feature. As for all the Freeform SQL reports, connecting to the
desired ODBC data source is a prerequisite.
Freeform SQL can also be a helpful tool to perform database maintenance
tasks such as updates and inserts. For information on this scenario see Using
Freeform SQL for updates, inserts, and other database maintenance tasks,
page 615.
SQL query syntax
Well-written SQL queries are the key to building successful Freeform SQL
reports. To take full advantage of the Freeform SQL feature, MicroStrategy
recommends that you ensure the correctness and validity of your SQL
statements before creating any reports using Freeform SQL. MicroStrategy
does not offer consultation or technical support for the syntax or
composition of your SQL queries.
Advanced Reporting Guide Custom SQL Queries: Freeform SQL and Query Builder 12
2011 MicroStrategy, Inc. Customize your SQL statements: Freeform SQL 611
Depending on your needs, you can compose SQL statements in several ways:
Create new SQL statements from scratch.
Use existing SQL statements that you previously defined, which have
proven to be successful in terms of retrieving data from the data source.
You must save the report before you can run it, otherwise a
message is displayed.
11 Enter a name for the report and click Save.
12 Run the Freeform SQL report.
Create a Freeform SQL report using a stored procedure
Since stored procedures are run against databases, creating a Freeform SQL
report using a successful stored procedure requires you to first connect to a
database (see Connect to databases, page 715). Mapping columns to
attributes and metrics requires prior knowledge of your data warehouse
structure. Although the stored procedure itself does not display any column
names, you need to know in advance what columns will be retrieved once the
Custom SQL Queries: Freeform SQL and Query Builder Advanced Reporting Guide 12
620 Customize your SQL statements: Freeform SQL 2011 MicroStrategy, Inc.
procedure is executed. Without this knowledge, it may be difficult for you to
map the columns.
For example, if you use the following stored procedure:
Execute sp_customer_profit
you may need to map the columns to the following MicroStrategy objects:
Customer ID
Customer DESC
Customer City ID
Customer City DESC
Profit
Below are the general steps you need to take when you use a stored
procedure to create a Freeform SQL report.
Prerequisites
Freeform SQL reports can be created on Desktop only. However, these
reports can be manipulated and executed from both Desktop and the
Web. Access to the Freeform SQL Editor is available only to Desktop
Designers with the Define Freeform SQL Report privilege and those with
the Create schema objects Common privilege.
You must connect Freeform SQL to a database, which is described in
Connect to databases, page 715.
To use a stored procedure to create a Freeform SQL report
1 In Desktop, from the File menu, select New, and then choose Report.
The New Grid dialog box opens.
2 On the Freeform Sources tab, in the Source area, select the database
instance you created for Freeform SQL reports with stored procedures.
3 Select Create Freeform SQL report and click OK. The Freeform SQL
Editor opens.
Advanced Reporting Guide Custom SQL Queries: Freeform SQL and Query Builder 12
2011 MicroStrategy, Inc. Customize your SQL statements: Freeform SQL 621
4 In the SQL Statement pane (the top pane on the right), type in your
stored procedure.
You must save the report before you can run it, otherwise a
message is displayed.
8 Enter a name for the report and click Save.
9 Run the Freeform SQL report.
Mapping columns to metadata objects
You use the Mapping pane in the Freeform SQL Editor to map the columns
in your SQL query to attributes and metrics included in a MicroStrategy
report.
You can map columns to:
Managed object attributes and metrics: Managed objects are created
on the fly and only exist in the context of Freeform SQL and Query
Database Stored procedure Notes
DB2 call stored_procedure_name with
DB2 ODBC driver
The stored procedure must have been created
indicating that it has a result set. The results will be
sent back to the client.
Oracle call stored_procedure_name( ) with
MicroStrategy ODBC driver
{call stored_procedure_name} with
Oracle ODBC driver
The stored procedure must return the results into a
table that can subsequently be selected.
SQL
Server
exec stored_procedure_name with
SQL Server ODBC driver
The stored procedure returns the data to the client.
No particular precaution is needed.
Custom SQL Queries: Freeform SQL and Query Builder Advanced Reporting Guide 12
622 Customize your SQL statements: Freeform SQL 2011 MicroStrategy, Inc.
Builder reports. These objects are stored in the Freeform Objects folder,
and are known as managed objects. Managed objects enable you to create
a Freeform SQL or Query Builder report quickly, without having to take
the time to manually create or map data to schema objects.
For more information on managed objects and how they are used in
MicroStrategy, see Map data to non-project objects: Managed objects,
page 718.
Only two types of prompts can be used: value prompts and element
list prompts. For more information, refer to Prompts, page 628.
In addition, you can use the view filter functionality for Freeform SQL
reports in the same way as for regular reports.
Prompts
A prompt is a MicroStrategy object that allows user interaction at report run
time. For general information on prompts, refer to Chapter 7, Advanced
Prompts, in this guide.
For Freeform SQL reports, only two types of prompts are supportedvalue
prompts and element list prompts. To add prompts, you can select from the
two options on the Edit menu in the Freeform SQL Editor:
Add New Prompt: launches the Prompt Generation Wizard, which
allows you to create a new value prompt or an element list prompt.
You cannot type the name of an existing prompt directly into the
SQL statement.
Once you exit the Prompt Generation Wizard or the Select a Prompt dialog
box, the prompt is inserted 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
Advanced Reporting Guide Custom SQL Queries: Freeform SQL and Query Builder 12
2011 MicroStrategy, Inc. Customize your SQL statements: Freeform SQL 629
enclosed in brackets ([ ]) if the name of the prompt contains any spaces, for
example:
Element list prompts
If the prompt is an element list prompt and you use the key word In, you
need to manually add parentheses around the prompt name in the SQL
statement. You can select either a single answer or multiple answers to the
prompt, yielding results such as (4) or (1,2,3,4). See the example below.
If you use other operators such as =, >, <, or =/, you do not need to add any
parentheses around the prompt name. 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
Date and number value prompts are properly formatted to the standards of
the database platform that the Freeform SQL report is executed against. For
example, a date value prompt yields TO-DATE('08-MAY-06') for Oracle and
2006-05-08 for DB2.
However, for text value prompts, you need to manually add single quotes ( )
around the prompt name if you want the text prompt answer to be applied as
a text constant. See the example below.
Custom SQL Queries: Freeform SQL and Query Builder Advanced Reporting Guide 12
630 Customize your SQL statements: Freeform SQL 2011 MicroStrategy, Inc.
You do not need to add the quotes around the prompt name if the answer is
part of the SQL command. See the example below.
If you are prompting on which table to retrieve data from, you should
enter the most commonly used or most appropriate table as the
default value of the prompt.
Optional prompts
When you create a new prompt to add to the SQL statement, you can make
the answer optional by clearing the Prompt answer required option in the
Prompt Generation Wizard. Alternatively, if you use an existing prompt, you
need to know if this option was selected during the prompt creation. You can
open the prompt with the Prompt Editor to check whether the option has
been selected.
For both new and existing prompts, if the prompt answer is optional make
sure that the syntax related to the prompt is also made part of the prompt
string. Taking this step ensures that if the optional prompt is not answered,
then neither the syntax nor the prompt will be processed when the report
SQL is generated. If you do not take this step, the report will fail due to an
invalid SQL statement.
To accomplish this, refer to the procedure below.
Prerequisites
The procedure below assumes you have already created a Freeform SQL
report and it is open in the Freeform SQL Editor.
You must have the Define Freeform SQL report and Create schema
objects privileges to access and use the Freeform SQL Editor.
To define Freeform SQL statements to support optional prompts
1 In the SQL Statement pane (the top pane on the right), highlight the
related syntax before and/or after the prompt together with the prompt
itself.
2 Right-click the highlighted part and select Prompt-dependent SQL. The
highlighted syntax turns pink just as the prompt.
Advanced Reporting Guide Custom SQL Queries: Freeform SQL and Query Builder 12
2011 MicroStrategy, Inc. Customize your SQL statements: Freeform SQL 631
You should highlight the entire syntax that could be affected by the
optional prompt. For example, the first example shown below is correct,
whereas the second example could return an error if no answer is
supplied for the optional prompt.
Drilling
Drilling allows you to look at specific data at levels other than what is
originally displayed on the grid or graph. For standard reports, you can drill
in different directions, such as down, up, or across attributes, based on the
drill map. For Freeform SQL reports, support for drilling is limited to
attributes within what is known as a personal Intelligent Cube. For a
description of what a personal Intelligent Cube is, see the section Intelligent
Cubes, page 304.
Drilling in Freeform SQL reports works in the following ways:
This functionality is controlled by the privilege named Drill within
Intelligent Cube, and requires an OLAP Services license.
You can only drill to attributes that are included in the Report Objects
pane but are not on the report grid.
You can only use drill maps with project attributes, since managed object
attributes do not have associated drill maps.
You can drill from managed objects to any other project objects that are
included in the Report Objects pane but are not on the report grid. You
cannot drill from a managed object to another managed object.
The user who creates the new attributes and metrics with Freeform
SQL is automatically given the Full Control permission of the new
objects.
In the Properties [XDA Objects] dialog box, you can change the settings of
the default ACL for different groups of users.
The changed settings will only affect the new attributes and metrics
created subsequently in Freeform SQL reports, but not those objects
created prior to the change.
User Children
Administrator Full Control
Everyone View
Public/Guest View
Custom SQL Queries: Freeform SQL and Query Builder Advanced Reporting Guide 12
634 Customize your SQL statements: Freeform SQL 2011 MicroStrategy, Inc.
Security filters
In MicroStrategy, a security filter is a filter object that is used to narrow
down the result set that users or groups can view when they execute reports
or browse elements. Usually assigned by administrators, security filters
control what warehouse data users can see within MicroStrategy.
Once a security filter is created for users or groups, it is automatically applied
when those users or groups view report data or browse attribute elements.
However, you must perform some additional configuration to apply security
filters to a Freeform SQL report. You configure your Freeform SQL report to
apply security filter qualifications by inserting and configuring a placeholder
for a user or groups security filter. Placeholders of this type created in
Freeform SQL reports are referred to as security filter placeholders in this
section.
Freeform SQL works with security filters in the following ways:
If you use a version of MicroStrategy earlier than 8.0, make sure that
you run the project update for the metadata; otherwise, security filter
functionality with Freeform SQL is not supported.
By default, Freeform SQL reports ignore security filters. The Report
Designer has to insert a security filter placeholder as a qualification in the
WHERE clause of a Freeform SQL report and configure it; otherwise, any
user can run the Freeform SQL report without being limited in the data
they see. For more information on creating security filter placeholders,
see Create security filter placeholders, page 635.
Security filter qualifications are performed on Freeform SQL reports only
if the attribute in the qualification is mapped to a column in the Freeform
SQL report using a security filter placeholder. For more information on
mapping attributes in security filter placeholders, see Attribute Mappings,
page 636.
Security filter qualifications are ignored in Freeform SQL reports if the
attributes in the qualifications are explicitly ignored in a security filter
placeholder. For more information on ignoring security filter attributes in
security filter placeholders, see Ignored Attributes, page 637.
Security filters which qualify on multiple attributes can be used with
Freeform SQL reports only if every attribute in the security filter is either
mapped to a column or ignored in a security filter placeholder. Freeform
SQL reports fail for users with security filters containing multiple
attribute qualifications that are not mapped or set to be ignored by a
security filter placeholder.
Advanced Reporting Guide Custom SQL Queries: Freeform SQL and Query Builder 12
2011 MicroStrategy, Inc. Customize your SQL statements: Freeform SQL 635
A security filter can restrict the attributes a user can view in relation to
the level at which attributes are found within a MicroStrategy hierarchy.
For more information on allowing top range and bottom range attributes
in security filter placeholders see Allow security filters with Top and
Bottom levels to be evaluated based on the select level of this report,
page 637. The two attribute range options are as follows:
Top range attribute: specifies the highest level of detail that the
security filter allows the user to view.
Bottom range attribute: specifies the lowest level of detail that the
security filter allows the user to view.
Because the SQL statement is static, a security filter placeholder string
(WHERE Security Filter or and Security Filter) needs to
be manually embedded into the statement, such as the following:
The string WHERE Security Filter would be replaced by WHERE
Store_ID = 1 when the report is executed for a user who has a security
filter (Store@ID = 1) similar to the following syntax:
Select Year_ID, Store_ID, M1
From Store_Fact
WHERE Store_ID = 1
For more information on embedding security filter placeholder strings,
see Replacement string, page 636.
For more information on security filters in general, refer to the Setting Up
User Security chapter in the System Administration Guide.
Create security filter placeholders
Security filter placeholders are created in the Freeform SQL Security Filter
Dialog, which can be accessed by selecting the Insert Security Filter option
from the Edit menu in the Freeform SQL Editor.
When you close the editor, the security filter placeholder string is
automatically inserted into the SQL statement at the current cursor location.
Custom SQL Queries: Freeform SQL and Query Builder Advanced Reporting Guide 12
636 Customize your SQL statements: Freeform SQL 2011 MicroStrategy, Inc.
The string is displayed in an uneditable mode, just like a prompt, and is bold
and underlined in green, for example:
You can edit the security filter placeholder after it is inserted into the SQL
statement by double-clicking the statement.
Within the Freeform SQL Security Filter Dialog that opens, you can create a
security filter placeholder using the following options:
Replacement string
The Replacement String field is located at the bottom of the Freeform
SQL Security Filter Dialog. The default value for the replacement string is
Security Filter, which is replaced by the security filter
qualification when the report is generated.
To complete the string, add WHERE or and in front of Security
Filter. If there is no valid security filter, then the whole string (WHERE
Security Filter or and Security Filter) does not appear in
the generated report SQL. For example, when using the replacement
string WHERE Security Filter as mentioned above, if a user
without a security filter runs the same report, the SQL looks like the
following:
Select Year_ID, Store_ID, M1
From Store_Fact
The whole replacement string is dropped from the generated SQL
statement and no security filter is used.
If you write WHERE or and directly into the SQL statement in the
Freeform SQL Editor, instead of in the Replacement String field in the
Freeform SQL Security Filter Dialog, the following will happen:
For a user without a project security filter: The report will fail due
to invalid SQL statement.
Attribute Mappings
The Attribute Mapping pane is located on the upper-right side of the
Freeform SQL Security Filter Dialog. This is where you map attributes to
columns in the SQL statement. For every attribute qualification to be
applied in a security filter, you need to provide the form and string for the
Advanced Reporting Guide Custom SQL Queries: Freeform SQL and Query Builder 12
2011 MicroStrategy, Inc. Customize your SQL statements: Freeform SQL 637
column mapped to that attribute in the SQL statement. The column
mapped in the SQL statement must also be a column (attribute form) that
is used in security filters. For example,
Ignored Attributes
The Ignored Attributes pane is located below the Attribute Mapping pane
in the Freeform SQL Security Filter Dialog. This is where you specify
attributes that may be ignored by the Engine when the report is being
generated, even if they appear in a security filter qualification. This
option can be useful if your Freeform SQL report does not include
attributes that are included in security filters. By ignoring attributes that
are not included in the Freeform SQL report, it allows security filters to
apply qualifications for mapped attributes without creating any security
holes. For example, if you define the following:
Content-Type is the Internet media type to use for the web form
accessed by the request for data.
Payload is the request for data from the web service. For the example
above, this requests data on the state of Virginia.
Web Services Security (WS-Security) provides web services
authentication, as defined in the WS-Security standard. MicroStrategy
utilizes the mstr-soap:post() external function to make SOAP web
services calls. This function uses Axis2/C to invoke web services and uses
Rampart/C to support WS-Security authentication. Using these
XML-based assertions, you can enforce authentication and ensure the
confidentiality and integrity of the message. If the web service uses
WS-Security authentication, HTTP authentication must be defined as
anonymous for the web service.
Custom SQL Queries: Freeform SQL and Query Builder Advanced Reporting Guide 12
646 Reporting on third-party web services with XQuery 2011 MicroStrategy, Inc.
With WS-Security you can support security features such as:
You must save the report before you can run it, otherwise a
message is displayed.
10 Enter a name for the report and click Save.
11 Run the Freeform SQL report.
Retrieving web folder resources with XQuery
MicroStrategy provides web folder content integration, which means that
content that is shared using the WebDAV protocol can be integrated into the
MicroStrategy environment. This integration allows the content within web
folders, such as documents or videos, to be accessed with the Multimedia
widget in MicroStrategy Mobile.
You must use XQuery and XQuery reports to integrate the web folder content
with the Multimedia widget. First you must define a database instance to
access and authenticate the web folder content, then you can create XQuery
reports to retrieve each web folder resource.
To configure a database instance to retrieve web folder resources,
page 660
To create XQuery reports to retrieve web folder resources, page 664
To configure a database instance to retrieve web folder resources
1 In Desktop, log in to a project source, using a user account with
administrative privileges.
2 In the Folder List, expand the project source, expand Administration,
expand Configuration Managers, and then select Database Instances.
3 From the File menu, point to New, and then select Database Instance.
The Database Instances Editor opens.
Advanced Reporting Guide Custom SQL Queries: Freeform SQL and Query Builder 12
2011 MicroStrategy, Inc. Retrieving web folder resources with XQuery 661
4 On the General tab, in the Database instance name field, type a
descriptive name for the database instance.
5 From the Database connection type drop-down list, select XQuery.
6 In the Database connection area, click New. The Database Connections
dialog box opens.
7 In the Database connection name field, type a descriptive name for the
database connection.
8 In the Default database login name area, click New. The Database
Logins dialog box opens.
9 In the Database login field, type a descriptive name for the database
login.
10 Type a valid user name and password in the Login ID and Password
fields, respectively. The login information that you provide is used to
authenticate a connection to the web folder and its contents if you choose
to disable warehouse pass-through authentication for the database
instance, or if you are using an authentication scheme other than LDAP.
For instructions to enable warehouse passthrough authentication for a
project, see To configure the project to use the WebDAV database
instance below.
11 Click OK. You are returned to the Database Connections dialog box.
12 In the Default database login name area, select the new database login
that you created, and then click OK. You are returned to the Database
Instances Editor.
13 In the Database connection area, select the new database connection
that you created, and then click OK. The database instance is created.
14 Right-click the new database instance and select Properties. The
Properties dialog box opens. In the General category, copy down or
otherwise make note of the ID value of the database instance. This ID
value is required later when creating the XQuery report (see To create
XQuery reports to retrieve web folder resources, page 664).
Custom SQL Queries: Freeform SQL and Query Builder Advanced Reporting Guide 12
662 Retrieving web folder resources with XQuery 2011 MicroStrategy, Inc.
To configure the project to use the WebDAV database instance
15 To make the database instance available for Freeform SQL reports,
right-click a project and select Project Configuration. The Project
Configuration Editor opens.
16 Expand Database Instances, and select SQL Data Warehouses.
17 From the list of available database instances, select the check box for the
database instance that you created in the previous steps. If you are
prompted to configure data mart optimization, click No.
18 Under Database Instances, expand Authentication, and select
Warehouse.
19 Depending on which credentials you want to use to access the WebDAV
folder, do one of the following:
To use the credentials that you defined in the database instance above,
ensure the following, as applicable:
The Use warehouse pass-through credentials for execution
check box is cleared.
If the Use warehouse pass-through credentials for execution
check box is selected, ensure that the For selected database
instances option is selected, and the check box for the WebDAV
database instance you created above is cleared.
To use the logged-in users credentials:
Select the Use warehouse pass-through credentials for
execution check box, and select For selected database
instances. Select the check box for the WebDAV database
instance you created.
Use an LDAP authentication scheme. If you are using any other
authentication scheme, the credentials you defined in the database
instance are used. For instructions to enable an LDAP
authentication scheme, see the System Administration Guide.
Configure Intelligence Server to update pass-through credentials,
which is described in To update pass-through credentials in
Intelligence Server below.
For information on choosing whether to use passthrough authentication
for database instances, see the Controlling access to data chapter in the
MicroStrategy System Administration Guide.
Advanced Reporting Guide Custom SQL Queries: Freeform SQL and Query Builder 12
2011 MicroStrategy, Inc. Retrieving web folder resources with XQuery 663
20 Click OK to save your changes and close the Project Configuration Editor.
To update pass-through credentials in Intelligence Server
If you selected to authenticate access to web folders and their contents
with a users LDAP credentials, it is recommended that you configure
your Intelligence Servers security settings to update the credentials every
time a user logs in successfully. If instead the database login is to be used
to authenticate users, you can skip these steps and begin to create XQuery
reports, as described in To create XQuery reports to retrieve web folder
resources, page 664.
21 In Desktop, from the Administration menu, point to Server, and then
select Configure MicroStrategy Intelligence Server. The MicroStrategy
Intelligence Server Configuration dialog box opens.
22 Expand the Server Definition category, and then select Security.
23 Within the Authentication Policy area, ensure that the Update
pass-through credentials when a successful login occurs check box
is selected, and select the LDAP Authentication option. This ensures
that users warehouse pass-through credentials are updated every time
they log in.
24 Click OK to save your changes and close the MicroStrategy Intelligence
Server Configuration dialog box. The next step to integrate web folder
content into the Multimedia widget is to create XQuery reports to retrieve
each resource, as described in To create XQuery reports to retrieve web
folder resources, page 664.
Prerequisites
Freeform SQL reports can be created in Desktop only. However, these
reports can be manipulated and executed from both Desktop and Web.
Access to the Freeform SQL Editor is available only to Desktop Designers
with the Define Freeform SQL Report privilege and those with the Create
Schema Objects Common privilege.
You need the ID value of the database instance used to access the web
folder. This value is retrieved as part of the steps To configure a database
instance to retrieve web folder resources, page 660.
Custom SQL Queries: Freeform SQL and Query Builder Advanced Reporting Guide 12
664 Retrieving web folder resources with XQuery 2011 MicroStrategy, Inc.
To create XQuery reports to retrieve web folder resources
1 In Desktop, from the File menu, point to New, and then select Report.
The New Grid dialog box opens.
2 On the Freeform Sources tab, select Create Freeform XQuery report.
3 In the Source area, select the database instance created to access web
folder resources, as described in To configure a database instance to
retrieve web folder resources, page 660.
You must save the report before you can run it, otherwise a
message is displayed.
10 Enter a name for the report and click Save. Once the XQuery report to
retrieve the web folder resources is created, you must connect this report
to a Multimedia widget. For information on configuring a Multimedia
widget, see the MicroStrategy Web Help.
Advanced Reporting Guide Custom SQL Queries: Freeform SQL and Query Builder 12
2011 MicroStrategy, Inc. Updating data with Transaction Services 669
Updating data with Transaction Services
MicroStrategy Transaction Services lets you embed write-back functionality
into documents and dashboards for the purposes of decision-making or
initiating a transaction. These transactions can include one-click approvals
and denials, notes for tracking and directing business activity, and
write-back to data sources in real time.
To embed this write-back functionality, you must create a Transaction
Services report that defines what data can be updated. Transaction Services
reports can be created using the Freeform SQL Editor.
Creating a Transaction Services report
When using the Freeform SQL Editor to create a Transaction Services report,
you can use SQL or XQuery to define the data that needs to be updated:
SQL is used to update the data stored in databases. Creating SQL as part
of a Freeform SQL report is described in Customize your SQL
statements: Freeform SQL, page 608.
XQuery is used to report on third-party web services. Creating XQuery as
part of a Freeform SQL report is described in Reporting on third-party
web services with XQuery, page 638.
In addition to writing the SQL or XQuery statement, you must also define
which parts of the statement are used to update values in the data source.
The steps below show you how to create a Transaction Services report using
the Freeform SQL Editor.
Prerequisites
A license for Transaction Services is required to create a Transaction
Services report.
Access to the Freeform SQL Editor to create a Transaction Services report
is available only to Desktop Designers with the Define Freeform SQL
Report, Create Transaction Report, and Create Schema Objects Common
privileges.
Custom SQL Queries: Freeform SQL and Query Builder Advanced Reporting Guide 12
670 Updating data with Transaction Services 2011 MicroStrategy, Inc.
To create a Transaction Services report
1 In Desktop, from the File menu, select New, and then choose Report.
The New Grid dialog box opens.
2 On the Freeform Sources tab, in the Source area, select Create
Transaction report.
3 In the Source area, select the database instance for the data source to be
updated using Transaction Services.
4 Click OK. The Freeform SQL Editor opens.
5 If you are using XQuery to connect to and update data, in the SQL
Statement pane (the top pane on the right), type the XQuery statement
required to connect to the third-party web service or data source.
Creating this part of an XQuery is described as part of the Connecting to a
web service and requesting data step within Using XQuery to retrieve
data from a web service, page 642.
If you are using SQL to connect to and update data, this step is not
required.
6 Right-click within the SQL Statement pane (the top pane on the right),
and select Insert Transaction. If you included XQuery syntax as part of
the previous steps, you should place the cursor at the end of the XQuery
syntax when performing this action.
The Transaction Options dialog box opens.
7 To determine whether or not all records of the table that is updated by the
transaction are inserted, select or clear the Insert only distinct records
check box .
By default, this check box is cleared and all records are inserted when a
transaction triggers an update. This behavior is intended for using
Transaction Services to update fact tables that store fact data such as
revenue and profit.
If you select this check box, only distinct records are inserted. This
behavior is intended for using Transaction Services to update lookup
tables that store attribute information such as customer information.
Advanced Reporting Guide Custom SQL Queries: Freeform SQL and Query Builder 12
2011 MicroStrategy, Inc. Updating data with Transaction Services 671
8 Click OK. You are returned to the Freeform SQL Editor and Begin
Transaction End Transaction is displayed in the SQL Statement
pane.
9 Between the Begin Transaction and End Transaction
placeholders, type the statement to update values for your data source.
An input object must be defined for each column of data that is to be
updated or is used to distinguish each record. Defining input objects is
included as a task later in this procedure. While typing the statement, you
can leave the input objects for each column of data blank in the
statement.
For example, the SQL statement below updates the columns
TOT_DOLLAR_SALES, TOT_UNIT_SALES, and TOT_COST of the
CITY_CTR_SLS table. Blanks are left after each equals (=) sign.
The CUST_CITY_ID and CALL_CTR_ID columns are included in the
query so that each record in the table can be distinguished when updating
the values.
The statement below shows an example of an XQuery statement that
updates the records Amount, Date, and Comments of the Table1 table.
Blanks are left for each of the XML tags.
The ID record is included in the query so that each record in the table can
be distinguished when updating the values.
Custom SQL Queries: Freeform SQL and Query Builder Advanced Reporting Guide 12
672 Updating data with Transaction Services 2011 MicroStrategy, Inc.
To define the input objects for a transaction
10 You must define the input objects, which provide a link between the data
that is updated by a transaction and the object that users interact with to
update the data. To define the input objects:
a Within the statement, place the cursor where the input object needs to
be included so that it can define the data for a column. If you are using
a SQL statement, it is common to include the input object after an
equals sign (=) for a column. If you are using an XQuery statement, it
is common to include the input object within an XML tag for a given
record.
b Once the cursor is placed appropriately, right-click, point to Define
New Input, and then select one of the following:
Attribute form: Select this option to map the statement text and
its associated data to an attribute. For example, the
CUST_CITY_ID and CALL_CTR_ID columns of the example SQL
statement must be mapped to attribute forms. A new attribute
form is created in the Input Objects tab.
Metric: Select this option to map the statement text and its
associated data to a metric. For example, the
TOT_DOLLAR_SALES, TOT_UNIT_SALES, and TOT_COST
columns of the example SQL statement must be mapped to
metrics. A new metric is created in the Input Objects tab.
c You must map the new input object to an attribute form or metric:
To create a new attribute or metric for the input object, in the
Object column, type a name.
To select an existing attribute form or metric to map to the input
object, right-click the row for the input object and select Replace.
The Select an Object dialog box opens. Select the object that you
want to use and click OK.
If the input object is an attribute form, you can map it to the attribute
form of a project attribute. This provides a logical connection between
the input object and the attribute in your project.
If the input object is a metric, you must map it to a new or existing
managed object. Attribute form input objects can also be mapped to
managed objects.
Advanced Reporting Guide Custom SQL Queries: Freeform SQL and Query Builder 12
2011 MicroStrategy, Inc. Updating data with Transaction Services 673
Once a name is given to the input object, this name is reflected in the
statement. Each input object is enclosed with square brackets ([])
within the statement. For example, the SQL statement shown below
has input objects defined for each column of data that is to be updated
or is used to distinguish each record.
d If the input object is an attribute form, in the Form column, select the
attribute form for the input object. For each attribute that you define
as an input object, you must map the ID form to an input object.
Mapping additional attribute forms to input objects is optional.
e In the Required column, select one of the following:
No: Defines the input object as optional for a transaction. The
input object is only included in a transaction if a user selects to
update its value. If you define an input object as optional, make
sure that the syntax of your statement would be accurate if the
input object is not included in a transaction.
With the new input object selected in the Input Objects tab, select
the text of the statement that is dependent on the input object.
With the text selected, right-click and select Input-dependent
Text. For example, using the SQL statement example mentioned
previously, select TOT_DOLLAR_SALES=[Revenue], to define
the first input. Examples of how to create valid statement syntax
with optional input objects are provided in Defining
input-dependent SQL or XQuery syntax, page 674.
Yes: Defines the input object as required for a transaction. You
must define any input object that is used to distinguish the record
updated using a transaction as required. For the example SQL
statement provided, the input objects for CUST_CITY_ID and
CALL_CTR_ID must be defined as required for the transaction.
Repeat the steps To define the input objects for a transaction, page 672
to create input objects for each column of data that is to be updated or is
used to distinguish each record in your transaction statement.
Custom SQL Queries: Freeform SQL and Query Builder Advanced Reporting Guide 12
674 Updating data with Transaction Services 2011 MicroStrategy, Inc.
To create an output object
11 On the Output Objects tab, right-click and select Add New Metric. A
new output object is created. This output object does not display any
values, but it is required to create a Transaction Services report.
12 Type a name for the metric.
To complete and save the Transaction Services report
13 Click OK. If any dialog boxes are displayed which require you to
determine which object to use for an attribute or metric, select the
appropriate object. Remember that attributes can be mapped to either
project or managed objects, but metrics can only be mapped to managed
objects.
The Freeform SQL Editor closes and you are returned to the Report
Editor.
14 From the toolbar, click Save and Close. The Save Report As dialog box
opens.
15 Type a name for the report and click Save. The Transaction Services
report is saved.
Once you have created a Transaction Services report, use MicroStrategy Web
to create Report Services documents, which can use the Transaction Services
report to allow users to update values. This can include interactive
documents and dashboards, which can be viewed using MicroStrategy Web
as well as MicroStrategy Mobile. For details on how to create a document
that can use a Transaction Services report, see the MicroStrategy Web Help.
Defining input-dependent SQL or XQuery syntax
While creating a SQL or XQuery statement for a Transaction Services report,
you must define which parts of the statement are dependent on an input.
When a transaction is requested, the inputs are included in the SQL or
XQuery statement to update the values in the data source.
When creating a Transaction Services report, you can make some of the
inputs optional. This supports the scenario that a user only wants to update
values for certain metrics or attributes, while leaving the other objects with
their current data.
Advanced Reporting Guide Custom SQL Queries: Freeform SQL and Query Builder 12
2011 MicroStrategy, Inc. Updating data with Transaction Services 675
You can define parts of the SQL or XQuery syntax as input dependent as
described below:
When using SQL, this can mean including commas and other SQL
syntax as dependent on an input. For example, the following SQL
statement can be used to update three columns of data:
Update CITY_CTR_SLS
set TOT_DOLLAR_SALES=[Revenue],
TOT_UNIT_SALES=[Units Sold], TOT_COST=[Cost]
where CUST_CITY_ID=[Customer City@ID] and
CALL_CTR_ID=[Call Center@ID]
The columns TOT_DOLLAR_SALES, TOT_UNIT_SALES, and
TOT_COST can all be defined as optional. However, to ensure that the
SQL statement can be valid, at least one of the columns must be
required. For this example, the TOT_COST column is mapped to a
required input. This means the following sections of syntax need to be
mapped to inputs:
TOT_DOLLAR_SALES=[Revenue],
The entire syntax listed above, including the comma, is mapped to
a Revenue metric as an input, which is defined as an optional
input.
TOT_UNIT_SALES=[Units Sold],
The entire syntax listed above, including the comma, is mapped to
a Units Sold metric as an input, which is defined as an optional
input.
TOT_COST=[Cost]
The entire syntax listed above is mapped to a Cost metric as an
input, which is defined as a required input.
Mapping the syntax in this way ensures that the syntax is removed
from the statement if the input objects associated with
TOT_DOLLAR_SALES and TOT_UNIT_SALES are not included in the
transaction.
Custom SQL Queries: Freeform SQL and Query Builder Advanced Reporting Guide 12
676 Updating data with Transaction Services 2011 MicroStrategy, Inc.
When using XQuery, this can mean including the entire line that
requests a certain record as dependent on an input. For example, the
following XQuery statement can be used to update three columns of
data:
<Update>
<table name="Table1">
<ID>[ID@ID]</ID>
<Amount>[Amount]</Amount>
<Date>[Date@ID]</Date>
<Comments>[Comments@DESC]</Comments>
</table>
</Update>
The records Amount, Date, and Comments can all be defined as
optional. This means the following sections of syntax need to be
mapped to inputs:
<Amount>[Amount]</Amount>
The entire syntax listed above, including the Amount tags, is
mapped to an Amount metric as an input, which is defined as an
optional input.
<Date>[Date@ID]</Date>
The entire syntax listed above, including the Date tags, is mapped
to a Date attribute as an input, which is defined as an optional
input.
<Comments>[Comments@DESC]</Comments>
The entire syntax listed above, including the Comments tags, is
mapped to a Comments attribute as an input, which is defined as
an optional input.
Mapping the syntax in this way ensures that the associated syntax is
removed from the statement if the input objects associated with
Amount, Date, and Comments are not included in the transaction.
If the input is required, you can define just the input parameter of the
syntax that is used to update the required input. This is done
automatically when defining a new input object. For example, the
following SQL statement can be used to update three columns of data:
Update CITY_CTR_SLS
set TOT_DOLLAR_SALES=[Revenue],
TOT_UNIT_SALES=[Units Sold], TOT_COST=[Cost]
where CUST_CITY_ID=[Customer City@ID] and
CALL_CTR_ID=[Call Center@ID]
Advanced Reporting Guide Custom SQL Queries: Freeform SQL and Query Builder 12
2011 MicroStrategy, Inc. Customize your SQL queries: Query Builder 677
The columns CUST_CITY_ID and CALL_CTR_ID are required to make
sure the proper record is updated with the transaction. This means the
following sections of syntax need to be mapped to inputs:
[Customer City@ID]
The entire syntax listed above is mapped to a Customer City attribute
as an input, which is defined as a required input.
[Call Center@ID]
The entire syntax listed above is mapped to a Call Center attribute as
an input, which is defined as a required input.
Since the inputs are required, a value is always provided for
CUST_CITY_ID= and CALL_CTR_ID=, which ensures that the syntax is
valid.
For an example of a required input for an XQuery statement, the
following XQuery statement can be used to update three columns of data:
<Update>
<table name="Table1">
<ID>[ID@ID]</ID>
<Amount>[Amount]</Amount>
<Date>[Date@ID]</Date>
<Comments>[Comments@DESC]</Comments>
</table>
</Update>
The record ID is required to make sure the proper record is updated with
the transaction. This means this record must be mapped to required
input objects, using the following syntax:
[ID@ID]
The entire syntax listed above is mapped to an ID attribute as an input,
which is defined as a required input.
Customize your SQL queries: Query Builder
Query Builder provides an easy way to quickly access your ODBC data
sources without having to write any SQL. You can create queries to be run
against imported database tables, which allows you to begin reporting and
analyzing with MicroStrategy without performing the project creation step of
modeling attribute and fact schemas. This step is necessary for the ROLAP
Custom SQL Queries: Freeform SQL and Query Builder Advanced Reporting Guide 12
678 Customize your SQL queries: Query Builder 2011 MicroStrategy, Inc.
Engine to define attribute and fact schemas. You can also import tables into a
projects Warehouse Catalog using the Query Builder feature.
Query Builder allows you more control over the SQL generated against your
database systems, without the need for extensive knowledge on how to create
SQL statements. A basic knowledge of how SQL statements use tables,
columns, and joins to build queries is essential. You should also be familiar
with the names of the tables and columns in your data warehouse or ODBC
data sources, as well as what information they store.
In addition to simplifying the process of data access, Query Builder provides
the majority of MicroStrategys wealth of reporting and analysis capabilities.
For more information on the MicroStrategy features that apply to reports
created with Query Builder, see Query Builder reports vs. standard reports,
page 680.
Reports that are built using the Query Builder feature are referred to
as Query Builder reports in this chapter.
The following image shows the Query Builder Editor, where you choose the
tables, columns, and joins to define the database queries for a report.
Advanced Reporting Guide Custom SQL Queries: Freeform SQL and Query Builder 12
2011 MicroStrategy, Inc. Customize your SQL queries: Query Builder 679
The individual panes of the Query Builder Editor shown above provide the
following features:
Object Browser pane: This pane is located on the left side of the Query
Builder Editor. Here you can browse the Warehouse Catalog or your data
warehouse directly for tables to include in your queries. You can also
browse the project folders for objects such as attributes that can also be
used to build your queries.
Tables and Joins pane: This is the top pane on the right side of the
Query Builder Editor. Tables and joins can be added to the definition of
your queries here, which hold the columns that provide the data from
which your report results are drawn. For more information on how Query
Builder uses tables and joins to build queries, see Access and analyze
multiple data sources with Query Builder, page 683.
Conditions pane: This is the middle pane on the right side of the Query
Builder Editor. Here you can define qualifications and insert security
filters that will be included in the WHERE or HAVING clause of your SQL
queries, which filter the data that appears on the resulting report. For
more information on defining qualifications for Query Builder reports,
see Filters, page 700.
Selections pane: This is the bottom pane on the right side of the Query
Builder Editor. Columns added to this pane are included in the SELECT
clause of your SQL queries and become the attributes and metrics on the
resulting report. For more information on selecting columns in Query
Builder, see Select columns of data to return, page 695.
Usage scenarios
Query Builder allows more control over the queries against your database
tables than normal MicroStrategy reports allow, without having to write any
SQL statements by hand with the Freeform SQL feature. It allows you to
create queries by dragging database tables from the warehouse catalog or
directly from the data warehouse into the Query Builder Editor, defining the
joins between tables, and selecting the columns of data to be returned. These
queries create reports that can be displayed in MicroStrategy Desktop or
Web. This functionality can be useful in the following scenarios.
When should I use the Query Builder feature?
You can use Query Builder to run queries against a set of database tables that
are not easily modeled to an attribute and fact schema. This includes
Custom SQL Queries: Freeform SQL and Query Builder Advanced Reporting Guide 12
680 Customize your SQL queries: Query Builder 2011 MicroStrategy, Inc.
databases that are a collection of flat tables rather than being defined into
fact and lookup tables, or other operational data stores. It can also save time
when setting up your project since Query Builder only requires that database
tables are imported to a projects Warehouse Catalog. Query Builder does not
require you to create an attribute and fact schema for your project. You can
even import tables into a projects Warehouse Catalog within the Query
Builder Editor. For more information on importing tables with the Query
Builder Editor, see Select and add tables, page 689.
Query Builder allows you to pick the tables, columns, and joins used in your
queries. This can be helpful if you are more accustomed to creating queries at
this level. Query Builder allows you more control over the SQL generated
against your database without the need for extensive knowledge on how to
create SQL statements.
Query Builder also provides a robust system when moving from one data
warehouse to another. Unlike Freeform SQL, which uses static SQL
statements that you provide, Query Builder creates the SQL statements
based on tables and columns you select and map to MicroStrategy objects.
Because of this functionality, Query Builder SQL statements can
automatically change to reflect the syntax of a data warehouse.
For example, if you move from a development Oracle data warehouse to a
production SQL Server data warehouse, the SQL statements for your Query
Builder reports automatically change to reflect SQL Server syntax. For Query
Builder reports, this seamless move from a development to a production data
warehouse requires that both data warehouses have the same exact table
structures, relationships, and column naming conventions.
Query Builder reports vs. standard reports
A Query Builder report is simply a standard report, which has been built
using the Query Builder feature. Due to some variations in how standard
reports and Query Builder reports are built, there are also some varying
functionalities between the two.
You can create Query Builder reports by building your own queries against
imported database tables. Although Query Builder reports can only be
created on MicroStrategy Desktop, once created, they can be executed from
both Desktop and Web like any other MicroStrategy standard reports.
Advanced Reporting Guide Custom SQL Queries: Freeform SQL and Query Builder 12
2011 MicroStrategy, Inc. Customize your SQL queries: Query Builder 681
Functions that you can perform on MicroStrategy standard reports can also
be performed on Query Builder reports, including the following:
Formatting
Exporting
Thresholds
Filtering
Value prompts
Graphing
Shortcut-to-a-report qualification, see Using Query Builder reports to
filter other reports, page 709
Narrowcast Server subscriptions and report execution
Object security
OLAP services
Prioritization
Report Services documents
Drilling within a personal Intelligent Cube
Scheduling
Subtotals
The following features are available for use with Query Builder reports if an
attribute and fact schema is used to model the data returned from your
queries:
Element list prompts
Security filters
The following features are not available for use with Query Builder reports:
Custom groups
Consolidations
Transformations
Existing filters
Custom SQL Queries: Freeform SQL and Query Builder Advanced Reporting Guide 12
682 Customize your SQL queries: Query Builder 2011 MicroStrategy, Inc.
Save as template/filter
Data marting
Query Builder reports in Report Services documents
Once created, Query Builder reports can be included in Report Services
documents in the same way as standard reports. The same document can
also contain reports from other data sources, such as MDX cube reports. For
information regarding MDX cube reports, refer to the MicroStrategy MDX
Cube Reporting Guide.
In order for data to be joined across different data sources in a document, a
common attribute is needed across the datasets. In the following diagram,
the common attribute which appears on each of the three reports is named
A1.
You can establish a common attribute by mapping objects, such as attributes
and prompts, retrieved from different data sources to existing objects in the
MicroStrategy environment. For more information on mapping columns for
Query Builder reports, see Select columns of data to return, page 695.
For example, in a Report Services document, you have three datasets from
three reports: one standard MicroStrategy report, one Query Builder report,
and one MDX cube report using SAP BI as the MDX cube source. All three
reports use the same attribute, Product. This means that Product is used in
the standard report as a project attribute, the Query Builder report has one
object mapped to Product, and the MDX cube report uses Product to map
one of its characteristics from the imported SAP BI query cube. Because data
Advanced Reporting Guide Custom SQL Queries: Freeform SQL and Query Builder 12
2011 MicroStrategy, Inc. Customize your SQL queries: Query Builder 683
is joined by the common attribute Product, the document is generated
successfully.
You must save the report first before you can run it.
12 Run the report. The image below shows the report in grid view:
Advanced Reporting Guide Custom SQL Queries: Freeform SQL and Query Builder 12
2011 MicroStrategy, Inc. Customize your SQL queries: Query Builder 687
Notice that revenue data is displayed with a general format by default. You
can format the Revenue metrics values to apply a currency format to the
revenue data.
Create a Query Builder report to access Excel files
The Query Builder feature enables you to create reports that use data from
Excel files. Follow the steps below to create a Query Builder report which
retrieves data from an Excel file.
Prerequisites
Query Builder reports can be created in Desktop only. However, these
reports can be manipulated and executed from both Desktop and the
Web. Access to the Query Builder Editor is available only to Desktop
designers with the Define Query Builder Report privilege and those with
the Create schema objects Common Privilege.
You must connect Query Builder to an Excel file, which is described in
Connect to Excel files, page 716.
To create a Query Builder report from an Excel file
1 In Desktop, from the File menu select New, and then Report. The New
Grid dialog box opens.
2 On the Freeform Sources tab, in the Source area, select the database
instance for your Excel file. For steps to connect to and create a database
instance for an Excel file, see Connect to Excel files, page 716.
3 Select Create Query Builder report and click OK. The Query Builder
Editor opens.
You can now use the tables created by the Excel file to build your Query
Builder report using the methods described in the sections listed below:
Select and add tables, page 689
Define joins, page 690
Automatically join columns, page 692
Select columns of data to return, page 695
Custom SQL Queries: Freeform SQL and Query Builder Advanced Reporting Guide 12
688 Customize your SQL queries: Query Builder 2011 MicroStrategy, Inc.
Create a Query Builder report to access text files
The Query Builder feature enables you to create reports using data from text
files. Follow the steps below to create a Query Builder report which retrieves
data from a text file.
Prerequisites
Query Builder reports can be created in Desktop only. However, these
reports can be manipulated and executed from both Desktop and the
Web. Access to the Query Builder Editor is available only to Desktop
designers with the Define Query Builder Report privilege and those with
the Create schema objects Common Privilege.
You must connect Query Builder to a text file, which is described in
Connect to text files, page 717.
To create a Query Builder report from a text file
1 In Desktop, from the File menu select New, and then Report. The New
Grid dialog box opens.
2 On the Freeform Sources tab, in the Source area, select the database
instance for your text file. For steps to connect to and create a database
instance for a text file, see Connect to text files, page 717.
3 Select Create Query Builder report and click OK. The Query Builder
Editor opens.
You can now use the tables created by the text file to build your Query
Builder report using the methods described in the sections listed below:
Select and add tables, page 689
Define joins, page 690
Automatically join columns, page 692
Select columns of data to return, page 695
Advanced Reporting Guide Custom SQL Queries: Freeform SQL and Query Builder 12
2011 MicroStrategy, Inc. Customize your SQL queries: Query Builder 689
Select and add tables
Unlike a standard MicroStrategy report that queries against logical tables in
the MicroStrategy metadata, Query Builder builds queries using a
combination of imported database tables, columns, and joins.
Within the Query Builder Editor, you can browse both imported tables and
all tables that exist for the database instance.
Tables that have been imported into the projects Warehouse Catalog are
listed within the Warehouse Catalog folder in the Object Browser. These
tables can be added directly to your Query Builder reports. To add tables to
your Query Builder report, drag a table from the Object Browser on the left to
the Tables and Joins pane (the top pane on the right), as illustrated in the
image below.
Access non-imported tables
The All Available Tables feature displays every table for the selected database
instance. To run queries on non-imported tables, Query Builder can import
tables from the data warehouse into the Warehouse Catalog. This allows you
Custom SQL Queries: Freeform SQL and Query Builder Advanced Reporting Guide 12
690 Customize your SQL queries: Query Builder 2011 MicroStrategy, Inc.
to import tables directly through Query Builder rather than using the
Warehouse Catalog itself. You can import a table using the same method as
adding a table to your Query Builder report.
You can modify this default mapping in the Query Builder Editor by
browsing to the Freeform Objects folder and dragging either <Add
New Attribute Form> or <Add New Metric> onto the column in the
Selections pane.
Query Builder supports history mapping of column expressions to simplify
and improve the process of mapping column expressions to attributes or
metrics. When you map a column expression to an attribute or metric in a
Query Builder report, a connection between the column expression and the
attribute or metric is saved. If you build another report with Query Builder
and select the same column expression, the column expression is
automatically mapped to the same metadata object you used in your previous
Query Builder report.
For example, in the MicroStrategy Tutorial you can select the column
REGION_ID from the LU_REGION table in Query Builder. If you map this
column expression in Query Builder to the attribute Region, the REGION_ID
column expression is automatically mapped to the attribute Region the next
time you use the Query Builder feature and select the REGION_ID column.
Automatically mapping column expressions to attributes and metrics have
the following behaviors:
Each column expression can have multiple history mappings to choose
from. For example, you can map a fact column TOT_DOLLAR_SALES
from the YR_CATEGORY_SLS table to two different metrics, Revenue and
Sales. The next time you select the TOT_DOLLAR_SALES column, the
drop-down list includes the metrics Revenue and Sales to choose from.
Attributes and metrics can have only one column expression saved as a
history mapping. Only the most recent column expression mapped to the
Custom SQL Queries: Freeform SQL and Query Builder Advanced Reporting Guide 12
698 Customize your SQL queries: Query Builder 2011 MicroStrategy, Inc.
attribute or metric is saved and used to automatically map attributes and
metrics.
For example, consider the fact column TOT_COST from the
DAY_CTR_SLS table. For the first Query Builder report, you map the
expression as Sum(DAY_CTR_SLS.TOT_COST) to the metric Cost. The
next time you build a report with Query Builder, you map the expression
Sum(DAY_CTR_SLS.TOT_COST*1.06) to the metric Cost. This updates
the Cost history mapping to be associated with the new expression. The
next time you map the expression Sum(DAY_CTR_SLS.TOT_COST), the
metric Cost is not automatically mapped. However, if you change the
expression to Sum(DAY_CTR_SLS.TOT_COST*1.06) the metric Cost is
automatically mapped.
You can choose to map a column to a different metadata object than is
chosen by the automatic mapping.
If you previously defined a ROLAP schema by modeling attributes and
metrics for your project, columns can be manually mapped to existing
project attributes. For example, within the MicroStrategy Tutorial project,
the YEAR_ID column from the LU_YEAR table can be mapped to the existing
Year attribute. Mapping columns to attributes that are part of a ROLAP
schema allows Query Builder reports to use the following MicroStrategy
features:
Security filters
Element list prompts
Shortcut-to-a-report qualification, see Using Query Builder reports to
filter other reports, page 709
Columns in your Query Builder reports that are mapped to metrics can be
mapped only to managed object metrics. Query Builder reports cannot use
metrics previously created within your project that are built from an
attribute and fact schema. However, managed object metrics can be mapped
to columns in multiple Freeform SQL reports.
If a column is not mapped to an existing attribute or it is mapped to a metric,
a managed object is created with the name you enter into the Object field.
Once a managed object is created, you can map it to columns in other Query
Builder reports by specifying the name of the managed object in the Object
field. For example, if there is a managed object named Year, you can map the
YEAR_ID column from the LU_YEAR table to this existing object by typing
Year into the Object field. A new managed object is created if you do not
enter the exact name in the Object field, such as Years. For more
Advanced Reporting Guide Custom SQL Queries: Freeform SQL and Query Builder 12
2011 MicroStrategy, Inc. Customize your SQL queries: Query Builder 699
information on managed objects related to Query Builder, see Map data to
non-project objects: Managed objects, page 718.
Define attribute forms
Each column expression which is mapped to an attribute must be mapped to
an attribute form. The Form drop-down list includes the following options:
ID
DESC
Any other forms that have been defined for the attribute
The user who creates the new attributes and metrics in Query Builder
is automatically given the Full Control permission of the new objects.
In the Properties[XDA Objects] dialog box, you can change the settings of the
default ACL for different groups of users.
The changed settings will only affect the new attributes and metrics
created subsequently in Query Builder reports, but not those objects
created prior to the change.
Security filters in Query Builder
In MicroStrategy, a security filter is a filter object that is used to narrow
down the result set that users or groups can view when they execute reports
or browse elements. Usually assigned by administrators, security filters
control what warehouse data users can see within MicroStrategy.
Once a security filter is created for users or groups, it is automatically applied
when those users or groups view report data or browse attribute elements.
However, you must perform some additional configuration to apply security
filters to a Query Builder report. You configure your Query Builder report to
apply security filter qualifications by inserting and configuring a placeholder
for a user or groups security filter. Placeholders of this type created in Query
Builder reports are referred to as security filter placeholders in this section.
Query Builder works with project security filters in the following ways:
By default, Query Builder reports ignore security filters. The Report
Designer has to insert a security filter placeholder as a qualification in the
Conditions pane (the middle pane on the right) of a Query Builder report
and configure it; otherwise, any user can run the Query Builder report
without being limited in the data they see. For more information on
creating security filter placeholders, see Create security filter
placeholders, page 712.
User Children
Administrator Full Control
Everyone View
Public/Guest View
Custom SQL Queries: Freeform SQL and Query Builder Advanced Reporting Guide 12
712 Customize your SQL queries: Query Builder 2011 MicroStrategy, Inc.
Security filter qualifications are performed on Query Builder reports only
if the attribute in the qualification is mapped to a column in the Query
Builder report using a security filter placeholder. For more information
on mapping attributes in security filter placeholders, see Attribute
Mappings, page 713.
Security filter qualifications are ignored in Query Builder reports if the
attributes in the qualifications are explicitly ignored in a security filter
placeholder. For more information on ignoring security filter attributes in
security filter placeholders, see Ignored Attributes, page 713.
Security filters which qualify on multiple attributes can be used with
Query Builder reports only if every attribute in the security filter is either
mapped to a column or ignored in a security filter placeholder. Query
Builder reports fail for users with security filters containing multiple
attribute qualifications that are not mapped or set to be ignored by a
security filter placeholder.
A security filter can restrict the attributes a user can view in relation to
the level at which attributes are found within a MicroStrategy hierarchy.
For more information on allowing top range and bottom range attributes
in security filter placeholders see Allow security filters with Top and
Bottom levels to be evaluated based on the select level of this report,
page 714. The two attribute range options are as follows:
Top range attribute: specifies the highest level of detail that the
security filter allows the user to view.
Bottom range attribute: specifies the lowest level of detail that the
security filter allows the user to view.
For more information on security filters in general, refer to the Setting Up
User Security chapter in the System Administration Guide.
Create security filter placeholders
Security filter placeholders allow security filter qualifications to be included
or ignored in the Query Builder report. You can create a Security filter
placeholder as a qualification by right-clicking the Conditions pane (the
middle pane on the right) and selecting Insert Security Filter. Within the
Advanced Reporting Guide Custom SQL Queries: Freeform SQL and Query Builder 12
2011 MicroStrategy, Inc. Customize your SQL queries: Query Builder 713
Query Builder Security Filter Dialog that opens, you can create a security
filter placeholder using the following options:
Attribute Mappings
The Attribute Mapping pane is located on the upper right side of the
Query Builder Security Filter Dialog. This is where you map attributes to
columns in the query to connect to security filter qualifications. For every
attribute qualification to be recognized in security filters, you need to
provide the form, table, and column mapped to that attribute in the
query. For example,
Ignored Attributes
The Ignored Attributes pane is located below the Attribute Mapping pane
in the Query Builder Security Filter Dialog. This is where you specify
attributes that may be ignored by the Engine when the report is being
generated, even if they appear in a security filter qualification. This
option can be useful if your Query Builder report does not include
attributes that are included in security filters. By ignoring attributes that
are not included in the Query Builder report, it allows security filters to
apply qualifications for mapped attributes without creating any security
holes. For example, if you define the following:
Managed objects are also created when integrating MDX cube sources
into MicroStrategy. MDX cube sources include SAP BI, Microsoft
Analysis Services 2000, 2005, and 2008, and Hyperion Essbase. For
information on integrating MDX cube sources into MicroStrategy, see
the MicroStrategy MDX Cube Reporting Guide.
Column selections in your Freeform SQL or Query Builder reports that are
mapped to metrics can be mapped only to managed object metrics. Freeform
SQL and Query Builder reports cannot use metrics previously created within
your project that are built from an attribute and fact schema. However,
managed object metrics can be mapped to column selections in multiple
Freeform SQL and Query Builder reports.
You can find out whether a given attribute or metric is a managed object or
not by using the Properties dialog box. If it is a managed object, the Location
Advanced Reporting Guide Custom SQL Queries: Freeform SQL and Query Builder 12
2011 MicroStrategy, Inc. Map data to non-project objects: Managed objects 719
field on the General tab indicates Managed by the system as shown in the
image below.
For every managed object (attribute or metric) created in Freeform SQL or
Query Builder reports, you can perform the following tasks by using the
right-mouse click function:
From the Search for Objects dialog box, you can:
Edit
Rename
Delete
Rename
Edit
Custom SQL Queries: Freeform SQL and Query Builder Advanced Reporting Guide 12
720 Map data to non-project objects: Managed objects 2011 MicroStrategy, Inc.
To access web services using the Freeform SQL Editor, see Allowing
connections to web services in a project, page 640.
The table name that you enter in this tab is not validated by the
system. Ensure that the table name follows the naming convention
rules for your database platform. If you do not use a valid table
name, an error message is displayed.
For this example, name the table AGG_REG_REV.
6 To use a placeholder in the table name, select the This table name
contains placeholders check box.
Accessing Subsets of Data: Data Marts Advanced Reporting Guide 13
732 Creating data marts 2011 MicroStrategy, Inc.
Placeholders allow you to modify table names dynamically according to
your needs. The available placeholders for data mart table names are
listed in the following table:
If you use a placeholder character other than those listed in the table, the
placeholder is deleted from the table name.
For this example, disable the This table name contains
placeholders check box.
7 Select whether to Create a new table or Append to existing table,
described below:
Create a new table: Select this option to replace the existing table
each time the data mart report is run. The SQL statements drop and
create the table each time the report is run.
Append to existing table: Select this option to add the data mart
report results to an existing table.
For this example, select Create a new table.
8 If you need to specify governors, table creation properties, and custom
SQL for table creation, see Specifying governors, table creation options,
and custom SQL statements, page 741
9 Click OK.
Placeholder Replacement Options
!u User name
!d Date on which the table was created
!o Report name
!j Job ID
!r Report GUID
!t Timestamp
!p Project Name
!z Project GUID
!s User session GUID
Advanced Reporting Guide Accessing Subsets of Data: Data Marts 13
2011 MicroStrategy, Inc. Using a data mart table as a source table 733
Create the data mart table
10 Execute the data mart report. MicroStrategy creates the data mart table
in the database you selected.
When the data mart table is created, the system displays a message that
includes the data mart table name and a notification that the data mart
table creation was successful, as shown in the example message below:
Using a data mart table as a source table
Do not use data mart optimization unless you are sure that the
database instance for the data mart points to the same data
warehouse as the projects primary database instance.
To enable data mart optimization
1 In MicroStrategy Desktop, log in to your project source with
administrative privileges.
2 In the Folder List, expand Administration, then expand Configuration
Managers, and select Database Instances.
3 Double-click the database instance for which you want to enable data
mart optimization. The database instance opens for editing.
4 Click the Advanced tab.
Accessing Subsets of Data: Data Marts Advanced Reporting Guide 13
740 Using a data mart table as a source table 2011 MicroStrategy, Inc.
5 Under Data mart optimization, select This database instance is
located in the same warehouse as, and from the drop-down list, select
the primary database instance for your project.
Running a standard report against a data mart
To run a standard report against the data mart
1 Create a new report with the same definition as the data mart report.
For this example, create a new report with Customer Region as the
attribute and Revenue as the metric.
2 Execute the report.
3 In the Report Viewer, from the View menu, select SQL View.
In the SQL view of the report, the from clause should show that the
aggregated data is directly obtained from the recently created data mart
table.
Advanced Reporting Guide Accessing Subsets of Data: Data Marts 13
2011 MicroStrategy, Inc. Specifying governors, table creation options, and custom SQL statements 741
For this example, the SQL view of the report shows that the SQL is
accessing the data mart table AGG_REG_REV for data, as shown
below:
4 Click Save and Close.
Specifying governors, table creation options,
and custom SQL statements
You can use the information in this section to configure specialized or
custom options when creating data mart tables. These advanced options can
be modified at any time. If you change these options after the data mart
report is initially saved and executed, you must save and re-execute the data
mart report to re-create the data mart table with the new options.
Accessing Subsets of Data: Data Marts Advanced Reporting Guide 13
742 Specifying governors, table creation options, and custom SQL statements 2011 MicroStrategy, Inc.
Specifying governors and table creation options
The Advanced tab of the Report Data Mart Setup dialog box allows you to
customize settings for data mart report creation. Here you can specify data
mart governors and data mart table creation properties. These settings apply
to the CREATE statement for the data mart table.
The settings for a data mart report override any settings at the project level.
To access the Advanced tab, open the data mart report in the Report Editor.
From the Data menu, select Configure Data Mart. In the Report Data Mart
Setup dialog box, select the Advanced tab.
If a field is left empty, the value for that property is taken from the
database instance you selected on the General tab.
The values entered on this tab are not validated by the system. Be sure
you adhere to the syntax for your database.
Advanced Reporting Guide Accessing Subsets of Data: Data Marts 13
2011 MicroStrategy, Inc. Specifying governors, table creation options, and custom SQL statements 743
Specifying performance parameters: Governing settings
These performance parameters include the maximum execution time and the
number of rows to be sent to the Analytical Engine:
Maximum Execution Time: Sets a time limit on report execution (in
seconds). By default the Maximum execution time is set to 0 (zero), which
means that the project level settings will be used.
Maximum Number of Rows (Analytical Engine): This setting governs the
maximum number of rows to send to the Analytical Engine at one time
when the table is created. The default value is set to 65536.
Data mart VLDB properties: Table creation properties
These properties collectively are the VLDB properties for data marts. VLDB
properties offer specialized configurations to support or optimize your
reporting and analysis requirements. For background information on VLDB
properties, see the MicroStrategy Supplemental Reference for System
Administration.
The SQL Statements tab is only visible if you have the Use SQL
Statements tab in Datamart/Bulk Export editors privilege in the
Desktop Designer privileges.
To access the SQL Statements tab, open the data mart report in the Report
Editor. From the Data menu, select Configure Data Mart. In the Report
Data Mart Setup dialog box, select the SQL Statements tab.
The technical definition of best fit is the model with the lowest Root
Mean Square Error (RMSE). The RMSE is calculated by taking the
square root of the average difference between the actual data and the
forecast at each time period.
In all three models, the averages have the effect of smoothing the data by
diminishing the peaks and valleys. The simple 12-month average is a
constant and therefore completely smooth. On the other hand, the moving
three-month averages still have some ups and downs, but not as strongly as
the original target data. The challenge for finding the best model is
determining the proper time horizon to forecast over. This is especially true
when the data is not stationary but has a significant trend, since older values
can hide more recent changes.
A common solution is a technique is called exponential smoothing. In order
to understand how exponential smoothing works, it is helpful to see how the
Advanced Reporting Guide Data Mining Services 14
2011 MicroStrategy, Inc. Creating a predictive model 785
technique is derived from moving averages. The generic formula for
calculating averages is:
One way of thinking of an average is that it is the sum of each value weighted
by 1/n. Our simple 12-month average gave equal weight (one twelfth) to
each month. The three-month moving averages gave each month a weight of
one-third.
Exponential smoothing gives more recent values greater influence on the
result. Older values are given exponentially decreasing weight. The generic
exponential smoothing formula is:
Where:
S
i
= Smoothed Observation
= A smoothing constant, determines how quickly or slowly weights
decrease as observations get older
1
n
---
\ .
| |
y
1
1
n
---
\ .
| |
y
2
.
1
n
---
\ .
| |
y
n
+ + + = =
S
t
oy
t 1
1 o ( )S
t 1
+ =
o
o
Data Mining Services Advanced Reporting Guide 14
786 Creating a predictive model 2011 MicroStrategy, Inc.
Trend is the dominant direction that the data is heading towards, as a
function of time. Exponential Smoothing includes the following trend types:
None: This is the simplest case, in which there is no trend. This means
that the data is not dominated by either an upward or a downward
progression, as shown in the example below:
The following equation describes this trend line:
Where is the value being forecast, and is a constant representing
the level of the data.
Additive: An additive trend is evident when the time series data changes
an equal amount per time period, as shown in the example below:
The following equation describes this trend line:
Where is the value being forecast, is the level, is slope or
constant trend, and t is the number of periods ahead of the last known
data point in the time series.
Damped additive: With this trend, the amount of change decreases each
successive time period. This can help to reflect most real world systems
y
t
b
0
=
y
t
b
0
y
t
b
0
b
1
t + =
y
t
b
0
b
1
Advanced Reporting Guide Data Mining Services 14
2011 MicroStrategy, Inc. Creating a predictive model 787
and processes, in which a trend is constrained from progressing
indefinitely without change.
The rate of this damping is governed by the damping parameter (phi).
The value of phi can vary from zero to one, with the damping effect
becoming smaller as phi approaches one.
=
Data Mining Services Advanced Reporting Guide 14
788 Creating a predictive model 2011 MicroStrategy, Inc.
The following equation describes this trend line:
Where is the value being forecast, is the level, is slope or
constant trend, and t is the number of periods ahead of the last known
data point in the time series.
Damped multiplicative: This trend is one where the rate of change in the
trend decreases over time, subject to the damping parameter , as shown
in the example below:
The following equation describes this trend line:
Where is the value being forecast, is the level, is the rate at which
the undamped trend changes, and t is the number of periods ahead of the
last known data point in the time series. The damping is calculated using
the following formula:
Triple exponential: This trend is evident when the time series data
follows a parabolic profile, as shown in the example below:
y
t
b
0
b
1
( )
t
=
y
t
b
0
b
1
o
y
t
b
0
b
1
( )
Damping t o , ( )
=
y
t
b
0
b
1
Damping t o , ( ) o
k
k 1 =
t
=
Advanced Reporting Guide Data Mining Services 14
2011 MicroStrategy, Inc. Creating a predictive model 789
The following equation describes this trend line:
Where is the value being forecast, is the level, is the slope or
constant trend, is the rate of acceleration of the trend, and t is the
number of periods ahead of the last known data point in the time series.
The other aspect that describes the time series profile is seasonality.
Seasonality accounts for seasonal differences that appear in the time series
data. When creating models with MicroStrategy using the Training Metric
Wizard, the user defines the number of time periods in the seasonal cycle.
For example, with monthly data you could define each month as its own
season by using 12 as the value for the seasonality. Similarly, with quarterly
data you could define each quarter as its own season by using four as the
value for the seasonality.
Exponential Smoothing includes the following seasonality types:
None: There are no seasonal factors in the time series, as shown in the
example below:
To use this type of seasonality, in the Training Metric Wizard, specify zero
as the number of time periods for the seasonal cycle.
Additive: Seasonal factors are added to the trend result. This means that
each season's effect on the profile is constant, as shown in the example
below:
y
t
b
0
b
1
t b
2
t
2
+ + =
y
t
b
0
b
1
b
2
Data Mining Services Advanced Reporting Guide 14
790 Creating a predictive model 2011 MicroStrategy, Inc.
This profile is considered only when the number of time periods in the
seasonal cycle, specified in the Training Metric Wizard, is two or more.
Multiplicative: Seasonal factors are multiplied by the trend result. This
means that seasonal effects increase as the trend of the data increases, as
shown in the example below:
This profile is considered only when the number of time periods in the
seasonal cycle, specified in the Training Metric Wizard, is two or more.
Advanced Reporting Guide Data Mining Services 14
2011 MicroStrategy, Inc. Creating a predictive model 791
By combining trend and seasonality, the following are all of the possible time
series profiles:
Data Mining Services Advanced Reporting Guide 14
792 Creating a predictive model 2011 MicroStrategy, Inc.
Predictive model workflow
To create a predictive model, you must do the following, in order:
1 Create the training metrics using the Training Metric Wizard. For
information, see Creating a training metric with the Training Metric
Wizard, page 792.
2 Create a training report containing the training metric. This training
report will generate the dataset used to train the predictive models.
3 Create the predictive metric from the training metric by executing the
training report. For information, see Create predictive metrics from
training metrics, page 802.
Since Exponential Smoothing gives greater weight to more recent
data, time series models should be updated whenever new data is
available. While this can be said for other types of model as well, this
is particularly true for time series models since recent results can
significantly influence the model. Therefore, for time series models, it
is common to deploy the training metrics instead of the predictive
metrics. This guarantees the time series forecast results reflect the
most recent data.
If the option to automatically create predictive metrics is selected
when the training metric is created, simply execute the training
report. The predictive metric is generated according to the parameters
of the training metric. You can now use the predictive metric on
reports or other MicroStrategy objects. For information, see Using the
predictive metric, page 808.
If the option to automatically create predictive metrics is not selected
when the training metric is created, execute the training report and
then use the Create Predictive Metrics option. For instructions, see To
use the Create Predictive Metrics option in the Report Editor,
page 804. You can then use the predictive metric, as discussed in
Using the predictive metric, page 808.
Creating a training metric with the Training Metric Wizard
Recall that the Data Mining Services workflow develops a predictive model
based on a dataset. When you use MicroStrategy, this dataset is generated in
Advanced Reporting Guide Data Mining Services 14
2011 MicroStrategy, Inc. Creating a predictive model 793
the form of a MicroStrategy report with the basic format shown in the
following report sample:
The dataset shown above can be used to develop a predictive model to
forecast on-line sales per quarter. The process of developing this predictive
model is called training the model. Data Mining Services uses a particular
type of metric called a training metric to develop the predictive model. When
the training metric is added to the dataset report, it analyzes the data and
generates a forecast, as shown below.
This training metric uses a powerful function that forecasts the results shown
in the previous report, given the proper parameters. It also generates a
Data Mining Services Advanced Reporting Guide 14
794 Creating a predictive model 2011 MicroStrategy, Inc.
predictive model that can be used to forecast future outcomes. The
MicroStrategy Training Metric Wizard allows you to easily create training
metrics.
Prerequisites
You must have Architect privileges to access the Training Metric Wizard.
If you are creating a derived training metric, you must also have a license
for MicroStrategy OLAP Services.
To create a training metric
1 In Desktop, you can create two types of training metrics:
Stand-alone training metric: Stand-alone training metrics exist in
metadata and are the standard type of training metric that can be used
on any report. You can use metrics and attributes within the project as
inputs to create stand-alone training metrics.
To create a stand-alone training metric, select Training Metric
Wizard from the Tools menu.
Derived training metric: Derived training metrics are training metrics
that are created using the derived metrics feature. You must have the
MicroStrategy OLAP Services product to create derived metrics.
Derived training metrics also have the same requirements and
restrictions as derived metrics (see the OLAP Services Guide). This
capability is particularly useful during the exploratory phase of the
data mining process, during which many different variables are tried
in a variety of modeling configurations.
Navigate to a report, right-click the report, and select Run. The
Report Editor opens. From the Insert menu, select New Training
Metric.
The Welcome page of the Training Metric Wizard opens.
2 Click Next to open the Select Type of Analysis page.
3 Select a type of analysis from the following:
Linear regression: The function attempts to calculate the coefficients
of a straight line that best fits the input data. The calculated formula
has the following format:
y b
0
b
1
X
1
( ) b
2
X
2
( ) . b
n
X
n
( ) + + + + =
Advanced Reporting Guide Data Mining Services 14
2011 MicroStrategy, Inc. Creating a predictive model 795
where y is the target variable and X
1
X
n
are the independent
variables.
Exponential regression: The function attempts to calculate the
coefficients of an exponential curve that best fits the input data. The
natural log (ln) of the input target variables is calculated and then the
same calculations used for linear regression are performed. Once the
straight-line coefficients are calculated, exponential regression uses
the natural exponential of the values, which results in the coefficients
for the formula of an exponential curve. The calculated formula has
the following format:
where y is the target variable and X
1
X
n
are the independent
variables.
Logistic regression: The function is used to determine the most
likely outcome of a set of finite values. The technique uses a
chi-square test to determine the probability of each possible value and
provide a predicted outcome based on the highest likelihood.
Cluster: This function offers a method of grouping data values based
on similarities within the data. A specified or determined number of
groups, or clusters, is formed allowing each data value to be
mathematically categorized into the appropriate cluster.
Decision tree: The function generates a series of conditions based on
independent input to determine a predicted outcome. The result is a
hierarchical structure with the ability to lead a set of input to the most
likely outcome.
Time Series: This function attempts to make forecasts based on a
series of time-related input data. It consists of numerous techniques
that can be applied to either seasonal or non-seasonal data.
Association: This function looks for relationships between items.
The most common example of this is market basket analysis.
y b
0
b
1
X
1
b
2
X
2
. b
n
X
n
=
Data Mining Services Advanced Reporting Guide 14
796 Creating a predictive model 2011 MicroStrategy, Inc.
4 Set specialized parameters based on the Type of Analysis selected:
Analysis Type Parameters
Cluster Do one of the following:
Specify the exact number of clusters to be generated from the set of
data.
Allow MicroStrategy Data Mining Services to determine the optimal
number of clusters based on the training data. The algorithm creates
multiple models, starting with two clusters, and continues to add
more clusters one at a time. With each additional cluster, the quality
of the model is assessed. The quality of the current model is
measured by calculating the total distance of all records to the
centers of their assigned clusters (DCurr). This result is compared
to the same result for the previously generated model (DPrev).
This process continues until the amount of improvement, (DPrev
DCurr) / DPrev, is less than the amount specified by the percent
improvement parameter, or the maximum number of clusters is
reached. Upon completion of this process, the model with the best
quality is used in the predictive metric.
Decision tree When MicroStrategy trains a decision tree model, the decision tree
algorithm splits the training data into two sets; one set is used to
develop the tree and the other set is used to validate it. Prior to
MicroStrategy 9.0, one fifth of the training data was always reserved for
validating the model built on the remaining four fifths of the data. The
quality of this model (referred to as the holdout method) can vary
depending on how the data is split, especially if there is an unintended
bias between the training set and the validation set.
Introduced in MicroStrategy 9.0, K-folds cross-validation is an
improvement over the holdout method. The training data is divided into
k subsets, and the holdout method is repeated k times. Each time, one
of the k subsets is used as the test set and the other k-1 subsets are
used to build a model. Then the result across all k trials is computed,
typically resulting in a better model. Since every data point is in the
validation set only once, and in the training dataset k-1 times, the model
is much less sensitive to how the partition is made.
A downside is that training time tends to increase proportionally with k,
so MicroStrategy allows the user to control the k parameter, limiting it to
a maximum value of 10.
Advanced Reporting Guide Data Mining Services 14
2011 MicroStrategy, Inc. Creating a predictive model 797
5 Click Next to open the Select Metrics page.
6 Select the metrics and attributes from your project to be used in the
training metric. To locate and select the metrics and attributes to be used,
you can use the following:
Object Browser: This option is available for all types of training
metrics. Use the Object Browser to browse your project for metrics
and attributes to be used in the training metric.
Report Objects: This option is available if you are creating derived
training metrics only. Use the Report Objects to select attributes and
metrics from the report to be used in the training metric.
Time series Number of time periods in the seasonal cycle: This value allows for
the specification of seasonality inherent to the training data, and may be
defined as follows:
Zero (default) or 1: This indicates that no attempt is made during
analysis to find seasonality in the training data. In this case, two
types of analysis are performed: double (linear) and triple (quadratic)
exponential smoothing. Once the analyses are complete, the model
which best fits the training data is created.
> 1: This indicates that the training data has seasonality, consisting
of the specified number of time periods. In this case, two types of
Winters exponential smoothing (additive and multiplicative) are
performed. Once the analyses are complete, the model which best
fits the training data is created.
Association Maximum number of items per set: This setting dictates the
maximum number of items that can appear in either the antecedent
or consequent item sets. For example, if set to three, items will be
grouped into itemsets containing one, two, or three items.
The default value for this setting is two. Increasing this number may
lead to the generation of more rules and, as a consequence, long
execution time for training reports.
Minimum confidence: The minimum probability that qualifying rules
should have. For example, if set to 10%, then an association rule
must have a confidence of 10% or more to appear in the model.
The default value for this setting is 10%. Increasing this value may
lead to the generation of fewer rules.
Minimum support: The minimum number of transactions an itemset
must occur in to be considered for an association rule. For example,
if set to 1%, then itemsets must appear, on average, in one
transaction out of 100.
The default value for this setting is 10%. Increasing this value may
lead to the generation of fewer rules.
Analysis Type Parameters
Data Mining Services Advanced Reporting Guide 14
798 Creating a predictive model 2011 MicroStrategy, Inc.
7 To add a metric or attribute to use in the training metric click the right
arrow next to the type of metric. For example, to add a dependent metric,
select the metric in the Object Browser, then click the right arrow next to
Dependent Metric.
If an attribute is selected as a input, the Training Metric Wizard
automatically creates a metric expression to be used as input to the
training metric. By default, this expression uses the following format:
Max(AttributeName){~}
The ID form of the attribute is used as an input to the training metric. If a
different attribute form should be used as an input, a metric must be
manually created prior to creating the training metric. For steps on how
to create this metric, see Creating metrics to use additional attribute
forms as inputs for predictive metrics, page 761.
The different metrics that make up the training metric are described
below.
Dependent Metric is the metric or attribute representing the field
value to be predicted by the model. All types of analysis except cluster
analysis require a dependent metric.
You can select only one dependent metric or attribute.
Independent Metrics are the metrics and attributes for each of the
independent variables to be considered while generating the
predictive model. All types of analysis require independent metrics or
attributes.
Select at least one independent metric or attribute.
Segmentation Metrics are optional selections that apply only to
linear, exponential, and logistic regression analyses. The Training
Metric Wizard can generate either regression models or tree
regression models.
In a tree regression model, the leaves of the tree contain a
regression model trained on the records associated with that leaf
of the tree. For example, if a metric or attribute representing a
geographic region is used as a Segmentation Metric, each region
will have its own unique forecast. Thus, multiple regression
models can be included in a single predictive metric.
Add one metric or attribute to represent each level within the tree
of the model.
Advanced Reporting Guide Data Mining Services 14
2011 MicroStrategy, Inc. Creating a predictive model 799
If no Segmentation Metrics are specified, a standard regression
model is generated.
8 You can use the default options for the algorithm and variable settings by
clearing the Show advanced options check box. To specify more
options for these settings, do the following:
a Select the Show advanced options check box.
b Click Next to open the Advanced Options page.
c You can define variable reduction for linear and exponential
regression. Refer to the MicroStrategy online help for more
information on this setting.
d To specify options for independent and dependent inputs, click
Advanced Variable Settings. See the online help for more
information on these settings. To save your changes and return to the
Advanced Options page, click OK.
9 Click Next to open the Select Output page.
10 Select the destination of where each predictive metric is saved. Your
options depend on the type of training metric being created:
Folder: This option is available if you are creating stand-alone
training metrics or derived training metrics. Click ... (browse button)
to define the location in your MicroStrategy project to save the
predictive metrics created by the training metric. If you select this
option, predictive metrics are saved as stand-alone predictive metrics.
If you are using derived training metrics, you should select this option
when a predictive model worthy of deployment is found. Selecting this
option saves the predictive model as stand-alone predictive metrics.
Report Objects: This option is available if you are creating derived
training metrics only. Select this option to create the predictive
metrics as derived predictive metrics. A derived predictive metric
exists only within the report used to create the predictive metric. This
capability is particularly useful during the exploratory phase of the
data mining process, during which you can test many variables and
create a large variety of models.
When the report is executed to create predictive metrics (see Create
predictive metrics from training metrics, page 802), the following
occurs:
The derived training metrics are moved off the reports template;
the template determines what is displayed for the report. The
Data Mining Services Advanced Reporting Guide 14
800 Creating a predictive model 2011 MicroStrategy, Inc.
derived training metrics are still available in the Report Objects of
the report, which supplies the definition of the report. If you
update the derived training metrics and need to re-create their
associated derived predictive metrics, you must add the derived
training metrics back to the template of the report. When the
derived predictive metrics are re-created, new versions are created
to keep a history of the predictive modeling.
Any derived training metrics that are moved off the report's
template during report execution are replaced with the first
predictive metric selected to be generated for the derived training
metric. When the derived training metric is initially replaced with
the derived predictive metric, the values are not automatically
updated to reflect the predictive metric analysis. Re-execute the
report to update the values for the derived predictive metric.
All other predictive metrics selected to be generated are added to
the Report Objects and are not on the report grid by default. This
makes the predictive model available for viewing only. To execute
the derived predictive metric, you must add the derived predictive
metric to the grid of the report.
11 To automatically create the predictive metric each time a report that
contains the training metric is executed, select the Automatically create
on report execution check box. This option automatically overwrites any
predictive metrics saved with the same name in the specified location. If
you do not want to overwrite the predictive metric, clear this check box.
For more information, see Create predictive metrics from training
metrics, page 802.
12 To include verification records within the model, specify the number of
records to include.
The derived training metrics are moved off the reports template; the
template determines what is displayed for the report. The derived
training metrics are still available in the Report Objects of the report,
which supplies the definition of the report. If you update the derived
training metrics and need to re-create their associated derived
predictive metrics, you must add the derived training metrics back to
the template of the report. When the derived predictive metrics are
re-created, new versions are created to keep a history of the predictive
modeling.
Any derived training metrics that are moved off the report's template
during report execution are replaced with the first predictive metric
selected to be generated for the derived training metric. When the
derived training metric is initially replaced with the derived predictive
metric, the values are not automatically updated to reflect the
predictive metric analysis. Re-execute the report to update the values
for the derived predictive metric.
The new name is generated when you click OK, but the changes are
not saved when the report is closed.
6 You can change the options and associated aggregation function for
producing the predictive metric in the Aggregation function area.
The new options are applied when you click OK, but the changes
are not saved when the report is closed.
7 You can save the PMML from the generated model. To do so, click
Generate PMML File and then select a location in which to save the
PMML file.
8 Click OK to return to the report.
The predictive metric is created in the location specified by the training
metric. It is generated according to the parameters of the training metric.
Advanced Reporting Guide Data Mining Services 14
2011 MicroStrategy, Inc. Importing the predictive model 805
Using third-party data mining applications
Many companies offer data mining applications and workbenches. These
tools are specialized for the data mining workflow and are usually rich in
data mining features and options. MicroStrategy Data Mining Services
integrates seamlessly with these applications in the following ways:
MicroStrategy is used as the source of data mining dataset.
After the third-party application develops the PMML-based predictive
model based on the dataset, the model is imported into MicroStrategy
and used to generate reports.
You can use any of the following options to provide the MicroStrategy dataset
to third-party applications:
Save the dataset as a data mart in MicroStrategy. For more information
on data marts, see Chapter 13, Accessing Subsets of Data: Data Marts.
Export to a particular file format. See the MicroStrategy online help for
more information on exporting reports from MicroStrategy.
Importing the predictive model
After you have created a predictive model and generated PMML to represent
that model, the next step is to import the PMML file into your MicroStrategy
project. The import function creates predictive metrics from the PMML file.
Prerequisites
You have created a dataset report, which is the first step in creating a
predictive model. For information on this process, see Creating a dataset
report, page 755.
You have created and trained a predictive model from the dataset, using
MicroStrategy or a third-party application. For information on this
process, see Creating a predictive model, page 769.
To import a predictive model into MicroStrategy
Before you can access the Import Data Mining Model option, you
must have the Create Application Objects and Use Metric Editor
privileges. For information on viewing or changing your privileges,
Data Mining Services Advanced Reporting Guide 14
806 Importing the predictive model 2011 MicroStrategy, Inc.
see the MicroStrategy Supplemental Reference for System
Administration.
1 In Desktop, from the Tools menu, select Import Data Mining Model.
2 Select the PMML file to import by clicking (the Browse button), and
then click Open.
3 You can make the following changes for the predictive metrics:
Select the Predictive Metric Type: The columns in this table are
automatically populated when a predictive model is selected. You can
change the information in this table as follows:
Predictor Type: By default, predictive metrics for all outputs
defined within the model selected above will be created and
displayed in this column. Clear any outputs for which you do not
want to create predictive metrics.
Name: Displays the default names provided for each predictive
metric, which can be changed.
Aggregation function: Displays the default aggregation functions
for the selected predictive metric types. You can change these
functions to determine how the output of the model should be
aggregated. For more details, see Aggregating predictive metrics,
page 807.
4 Click OK to import the model or models.
5 Select the folder in which to save all the predictive metrics.
The import feature reads the PMML automatically and creates the predictive
metrics in the folder specified. During the importing process, several key
model characteristics are determined from the PMML, including the
following:
The type of data mining algorithm: Based on this, the appropriate
MicroStrategy data mining function is used in the expression of the
metric.
The inputs to the data mining function: This is where setting the
column alias of the prediction input metric to match its name is
important. Since Data Mining applications use this name to identify each
variable, you can use the name of each variable in the PMML to identify
Advanced Reporting Guide Data Mining Services 14
2011 MicroStrategy, Inc. Importing the predictive model 807
which MicroStrategy metric should be used. The import feature robustly
handles all potential circumstances in this area as follows:
Only one MicroStrategy metric with that name exists: That metric is
used automatically as an input to the function.
For more information on VLDB properties set at other levels and the
VLDB Properties Editor, refer to the MicroStrategy Supplemental
Reference for System Administration.
VLDB Properties Advanced Reporting Guide 15
826 Levels of VLDB properties 2011 MicroStrategy, Inc.
Levels of VLDB properties
VLDB properties are available at multiple levels, so that SQL generated for
one report can be manipulated separately from the SQL generated for
another, similar report. This flexibility is an important benefit of VLDB
properties.
The hierarchy, or order of precedence, for VLDB properties is outlined in the
following figure.
The arrows depict the override authority of the levels, with the report level
having the greatest authority. For example, if a VLDB property is set one way
for a report, and the same property is set differently for a metric included on
the report, the report property takes precedence.
Conversely, if the VLDB property at the report level is set to use the default
inherited value, the project level setting is used. If that level is also set to the
default or if the VLDB property is not set at the project level, the setting at
the database instance is used. This information is available for each property
in the VLDB Properties dialog box at each level. The Use default inherited
value option indicates the level that is active, while the SQL preview box
displays a description of the selected setting.
The VLDB properties at the different levels work together to affect report
results. However, you set the properties of each level in a different interface,
so the sections of this chapter are grouped at the different levels.
Advanced Reporting Guide VLDB Properties 15
2011 MicroStrategy, Inc. VLDB properties at the metric level 827
VLDB properties at the metric level
Although there are other VLDB properties that pertain specifically to
metrics, only six metric VLDB properties are available at the individual
metric level. They are the following:
Integer Constant In Metric, page 827
Metric Join Type, page 828
Null Check, page 828
Zero Check, page 829
Null checking for Analytical Engine, page 829
Subtotal Dimensionality Aware, page 829
This property can also be set at the report level, which overwrites the
setting at the metric level.
Advanced Reporting Guide VLDB Properties 15
2011 MicroStrategy, Inc. VLDB properties at the metric level 829
Zero Check
The Zero Check property indicates how to handle division by zero and when
to check for zeros in the denominator during division. When a zero check is
performed, a zero in the denominator of a division calculation is changed to a
null value.
The options for this property are as follows:
Do nothing, which means that the database rather than the Analytical
Engine handles division by a zero
Check in all queries
Check in temporary table join only
Use default inherited value
This property can also be set at the report level, which overwrites the
setting at the metric level.
Null checking for Analytical Engine
This setting determines whether a null value is interpreted as zero when the
Analytical Engine performs calculations. It is found in the Analytical Engine
folder of the VLDB Properties (Metric) dialog box.
The options for this property are as follows:
False, which means that null values are not altered
True, which means the Analytical Engine converts null values to zeros
Use default inherited value
You can set replacement text for null values at the report level. For
more information, see the Report Formatting chapter in the
MicroStrategy Basic Reporting Guide.
Subtotal Dimensionality Aware
The Subtotal Dimensionality Aware setting enables subtotaling based on the
dimensionality of a metric, also known as its level. How it works depends on
another VLDB property, Query Population Dimensionality Aware, which
VLDB Properties Advanced Reporting Guide 15
830 VLDB properties at the metric level 2011 MicroStrategy, Inc.
handles backwards compatibility with MicroStrategy 7.1. These settings work
together as illustrated in the following table:
The default setting for the Subtotal Dimensionality Aware property is TRUE,
so subtotals depend on the metrics level. If you must subtotal without using
the level of the metric, set this property to FALSE.
This property is found in the Analytical Engine folder of the VLDB Properties
(Metric) dialog box. The options for this property are:
FALSE, which means that subtotals do not take into account the
level/dimensionality of the metric
TRUE, which means that subtotaling is aware of metric
level/dimensionality
Use default inherited value
For example, the Quarterly Revenue metric is defined as Sum(Revenue)
Dimensionality = Quarter, and the Yearly Revenue metric is defined
as Sum(Revenue) Dimensionality = Year.
If Subtotal Dimensionality Aware is set to FALSE, the quarterly subtotal is
calculated as $600, that is, the total of the Quarterly Revenue values. The
yearly subtotal is calculated as $2400, the total of the Yearly Revenue values.
This is how MicroStrategy 7.1 calculated the subtotal.
If Subtotal Dimensionality Aware is set to TRUE, the quarterly subtotal is
still $600. MicroStrategy is aware of the level of the Yearly Revenue metric,
so rather than simply adding the column values, it calculates the total as
$600.
If Query Population Is: Then Subtotal Is:
TRUE TRUE or FALSE
FALSE Ignored, meaning that subtotals are
never aware of dimensionality
Year Quarter Quarterly Revenue Yearly Revenue
1 1 $100 $600
1 2 $200 $600
1 3 $100 $600
1 4 $200 $600
Advanced Reporting Guide VLDB Properties 15
2011 MicroStrategy, Inc. VLDB properties at the report level 831
VLDB properties at the report level
The report level contains numerous VLDB properties. The most commonly
used are listed below. The top level of the list indicates the folder in the
VLDB Properties dialog box in which the property is found.
Joins:
Null Check
Zero Check
These metric properties can also be set at the metric level, although
the setting at the report level overwrites it. These properties are
described in VLDB properties at the metric level, page 827.
Pre/Post Statements:
Some Cartesian joins are not a direct table-to-table join. If one join
Cartesian joins to another join, and one of the joins contains a
warehouse table (not an intermediate table), then the execution is
either canceled or allowed depending on the option selected. For
example, when a Cartesian join is performed between the join of two
intermediate tables (TT_A join TT_B) and the join of an intermediate
table and a warehouse table (TT_C join WH_D), the following
happens:
Map widget, page 853, which allows users to search and view
information for locations on a map displayed on the iPhone
Time Series widget, page 857, which displays data for a specific
period of time in a line graph displayed on the iPhone
Using prompts specifically designed for use on an iPhone and iPad. Some
examples of these prompt types are listed below:
If you use the map widget in a document instead of a report, you can
create and format a custom Information Window for a Map widget.
For more information, see the Documents for iPhone and iPad
chapter of the MicroStrategy Report Services Document Creation
Guide.
You can use static images as map markers in the widget, or display the map
markers as dynamic bubbles. The size of each dynamic bubble is
automatically determined based on the value of the metric on the columns of
the widget, with the largest bubbles being displayed for the largest metric
values.
You can display a report as a Map widget or add a Map widget to a document.
The widget is displayed as a map when the report or document is viewed on
an iPhone with MicroStrategy Mobile. The report must meet the following
requirements to display correctly:
One attribute on the rows. The elements of this attribute are displayed as
items on the Map widget. This attribute must provide the geographical
location of each map item in one of the following ways:
To use the geographical location features of the Map widget, you must
have location data stored in your data source. MicroStrategy requires
latitude and longitude data to recognize a geographical location. You
can use various methods to develop a list of geographical locations.
For a description of one of these methods, see the MicroStrategy
Project Design Guide.
Filtering locations
You can filter the locations displayed on a map to view only those locations
that meet certain criteria. For example, if store locations are displayed on a
map, you can use a Geo Location prompt to use the current location of the
iPhone or iPad, to display only those stores within the current city, state, or
zip code.
You can also create a filter or prompt to display data only for locations within
a specific distance from the current location of the iPhone or iPad. For steps,
see the MicroStrategy Document Creation Guide or the Desktop Help.
You can filter the locations displayed on a Map widget to view only those
locations that meet certain criteria. For example, if store locations are
displayed on a map, you can limit the map display to include only those
stores that have free wireless service. For examples of filtering by
geographical location, see Using the Geo Location prompt in a Map widget,
page 855.
Using the Geo Location prompt in a Map widget
The Geo Location prompt lets users answer an iPhone prompt by using the
iPhone's current geographical location. In a Map widget, a Geo Location
prompt is typically used to filter data in the widget. For example, a Map
Reports for the iPhone and iPad Advanced Reporting Guide 16
856 Displaying reports on the iPhone as widgets 2011 MicroStrategy, Inc.
widget displays several locations as markers on the map display. You can
choose to display only those location markers that are in the iPhone's current
location, such as the same state or zip code.
You can:
Define value prompts with the display style set to Geo Location to
automatically use the iPhone's current longitude and latitude to filter the
widgets results. You must define two value prompts, one for latitude and
one for longitude. The prompts are then automatically answered and do
not require an answer from the user.
Define an attribute element prompt with the display style set to Geo
Location to filter an attribute element list by having the iPhone user enter
the current geographical location.
The location name that is returned by a Geo Location prompt is based on
Googles geocoding. The prompt determines your longitude and latitude
using your iPhones GPS receiver, and passes this information to Google
Maps to return information about your location.
Geo Location prompts are created in MicroStrategy Web. For instructions,
see the MicroStrategy Web Help.
Interactive Grid widget
The Interactive Grid widget allows you to display data in a compact tabular
layout on an iPhone with MicroStrategy Mobile. Attributes and metric values
are displayed in columns in the widget's grid, as shown below. If a column
Advanced Reporting Guide Reports for the iPhone and iPad 16
2011 MicroStrategy, Inc. Displaying reports on the iPhone as widgets 857
contains more than one metric, users can toggle the metric displayed in the
column to customize their display.
You can display a report as an Interactive Grid widget or add an Interactive
Grid widget to a document. The widget is displayed when the report or
document is viewed on an iPhone with MicroStrategy Mobile. The report
must meet the following requirements to display correctly:
At least one attribute on the rows. The elements of this attribute are
displayed in the first column of the widget.
At least one metric on the columns. The metric values are displayed in
additional columns in the widget.
For instructions to define a report to display as an Interactive Grid widget,
see the MicroStrategy Web Help.
When you use these operators on a description for a date, the results
can appear to be incorrect. For example, assume the date description
is formatted as Jan 2003. Create a filter on the description attribute
Logical and Mathematical Operators for Filtering Advanced Reporting Guide A
870 What is an operator? 2011 MicroStrategy, Inc.
using the Between operator to return the months between January
2003 and June 2003. The results are Jan 2003, Jul 2003, and Jul
2003, not the first six months of the year as expected. This occurs
because the description attribute is formatted as text, not as numbers
or dates, and therefore the SQL sorts the data alphabetically. To
obtain results of January 2003, February 2003, March 2003, April
2003, May 2003, and June 2003, filter on the ID rather than the
description or use the in list operator.
Rank and percent operators
Rank and percent operators are only applicable to metrics. The following
operators are visible when you qualify on the Rank or Percent function:
Between: Identifies values in a range that has 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.
Bottom: Identifies the lowest set of values in a range. For example,
bottom 40 returns the 40 lowest values within a given range selected.
If you have created your own customized HTML page to use in the
project, locate the file using Browse button. Otherwise, the project
uses the default homepage designed by MicroStrategy.
5 Click OK.
6 Select the project within the project source. A project homepage is
displayed. For example, in the MicroStrategy Tutorial you will see the
HTML homepage which looks like the following:
If you cannot see the HTML project homepage even after you have
enabled the homepage option from the My Preferences dialog box, this is
because the project homepage option is not enabled in the Desktop
Preferences dialog box. To do this, complete the following procedure.
To enable a project homepage in Desktop preferences
7 From the Tools menu, select Desktop Preferences. The Desktop
Preferences dialog box opens.
8 In the dialog box, select the Enable project home page functionality
option.
Desktop Commands Advanced Reporting Guide C
880 Viewing the Desktop commands 2011 MicroStrategy, Inc.
9 Click OK.
To work with the homepage functionality, the Enable project home
page functionality option should always be enabled in both My
Preferences and Desktop Preferences dialog boxes.
Viewing the Desktop commands
In the homepage, Desktop commands exist embedded in the HTML
document. When you view the source code of the HTML page, you can view
the desktop commands.
To see where in the HTML the Desktop commands are embedded, right-click
the HTML page and from the shortcut menu, select View Source. The
HTML code is displayed in your default text editor. Search the code for
anchor elements that have syntax that matches the following statement:
<A hRef=dss://Command Parameters></A>
Many Desktop commands use a unique object ID to refer to objects in a
project. To view an objects ID, in Desktop right-click the object and select
Properties. The ID is displayed in the dialog box.
Commands
Desktop supports the following commands:
ChangeView, page 881: updates the Desktop view style
Editor, page 882: loads a Desktop editor
Execute, page 883: executes a report or document definition
ExecuteDocument, page 883: executes a document definition
ExecuteReport, page 884: executes a report definition
Open, page 885: opens a connection to a project source or a session to a
project
Reset, page 886: closes a connection to a project source or a session to a
project
Advanced Reporting Guide Desktop Commands C
2011 MicroStrategy, Inc. Commands 881
Shortcut, page 886: finds and selects a node in the folder list pane of the
object browser
The description of each of these commands is in the following sections.
ChangeView
The ChangeView command shows or hides the shortcut and folder list panes
in the object browser.
dss://ChangeView View1\View2\...\Viewn
Remarks
The ChangeView command can take a list of operations in a single command.
For example, to show shortcuts and hide the folder list use the following
command:
ChangeView ShowShortcutView\HideFolderView
Examples
<A hRef="dss://changeview showshortcutview">
Show Shortcuts</A>
<A hRef="dss://changeview showfolderview">
Show Folders</A>
<A hRef="dss://changeview hideshortcutview">
Hide Shortcuts</A>
<A hRef="dss://changeview hidefolderview">
Parameter Description
View The view parameter indicates what operation should be executed.
The following operations are supported:
ShowShortcutView
ShowFolderView
HideShortcutView
HideFolderView
Desktop Commands Advanced Reporting Guide C
882 Commands 2011 MicroStrategy, Inc.
Hide Folders</A>
<A hRef="dss://changeview
hidefolderview\showshortcutview"> Hide Folders
and Show Shortcuts</A>
<A hRef="dss://changeview
showfolderview\hideshortcutview"> Show Folders
and Hide Shortcuts</A>
Editor
The Editor command loads a new instance of a specified Desktop editor in
the currently selected project.
dss://editor EditorName
Example
<A hRef="dss://editor search">Open Search
Editor</A>
Parameter Description
EditorName Indicates the name of the editor to load. The command supports the following editors:
Search
ReportDefinition
DocumentDefinition
Prompt
Filter
Template
Metric
CustomGroup
Consolidation
Attribute
Fact
Hierarchy
Transformation
Partition
Advanced Reporting Guide Desktop Commands C
2011 MicroStrategy, Inc. Commands 883
Execute
The Execute command executes one or more reports or documents. The
reports or documents are identified by their object type and object ID.
dss://Execute ObjID1.ObjType1\ObjID2.ObjType2
\\ObjIDn.ObTypen
Example
<A hRef="dss://execute B5C67DFC11D60B5610008C
B3D1CEE6A4.3\48CAD4644AB189F763E0EAA22BC0E6D
C.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.
This appendix assumes that you have basic object and report
creation skills. For detailed information on creating basic objects
and reports, see the MicroStrategy Basic Reporting Guide.
The following steps cover the creation of only those objects used in
the reports that are part of the Customer Explorer dashboard. The
objects that are part of the report creation steps below often
depend on the existence of other objects in your data model. For
example, the Customer Income Range attribute is only useful in a
data model that also includes the Customer attribute.
Attributes
The following attributes are required to create all of the necessary reports for
the dashboard. All of these attributes are located in \Customer Analysis
Module\Schema Objects\Attributes.
Quarter
Year
Customer
Customer Gender
Customer Income Range
Customer Lifetime Value Score
Customer Acquisition Date
Current Customer Status
Product Group
Filters
The following table lists all of the required filters, and their definitions, to
create the necessary reports. The Current Year filter is located in
\Customer Analysis Module\Public Objects\Reports\
Dashboards and Scorecards\Datasets\Customer Explorer. The
Learning to design a document Advanced Reporting Guide D
894 Customer Explorer dashboard 2010 MicroStrategy, Inc.
Active Customer filter is located in \Customer Analysis
Module\Public Objects\Filters\Customer Status\Current.
Metrics
The following table lists all of the required metrics, and their definitions, to
create the necessary reports. These metrics are located in
\Customer Analysis Module\Public Objects\Metrics.
While formatting is not discussed here, you may want to format your
reports so that they are visually appealing, as well as to highlight
analytical data that is important to you. It can be helpful to format
your graphs now in the Report Editor rather than formatting them
later within the Report Services Document Editor.
Reports Report Objects and Filters
List of Customers
This grid report presents a list of customers along with
their acquisition date and the amount of revenue they
have generated for the current year. There are several
attributes in the page-by which allow you to narrow down
the displayed results by customer gender, income range,
lifetime value score, and marital status.
Customer (attribute)
Customer Acquisition Date (attribute)
Customer Gender (attribute)
Customer Income Range (attribute)
Customer Lifetime Value Score (attribute)
Customer Marital Status (attribute)
Revenue (metric)
Current Year (filter)
Active Customer (filter)
Learning to design a document Advanced Reporting Guide D
896 Customer Explorer dashboard 2010 MicroStrategy, Inc.
Average Revenue per Transaction
This gauge graph lets you see the amount of revenue
generated per transaction. There are several attributes in
the page-by which allow you to narrow down the
displayed results by customer gender, income range,
lifetime value score, and marital status.
Customer Gender (attribute)
Customer Income Range (attribute)
Customer Lifetime Value Score (attribute)
Customer Marital Status (attribute)
Year (attribute)
Revenue per Transaction (metric)
Current Year (filter)
Active Customer (filter)
Reports Report Objects and Filters
Advanced Reporting Guide Learning to design a document D
2010 MicroStrategy, Inc. Customer Explorer dashboard 897
Average Transactions per Customer
This gauge graph displays the number of transactions
per customer in the current year. There are several
attributes in the page-by which allow you to narrow down
the displayed results by customer gender, income range,
lifetime value score, and marital status.
Customer Gender (attribute)
Customer Income Range (attribute)
Customer Lifetime Value Score (attribute)
Customer Marital Status (attribute)
Transactions per Customer (metric)
Current Year (filter)
Active Customer (filter)
Reports Report Objects and Filters
Learning to design a document Advanced Reporting Guide D
898 Customer Explorer dashboard 2010 MicroStrategy, Inc.
Number of Customers
This horizontal bar graph displays the number of
customers whose data is currently being displayed,
depending on the selected set of page-bys. There are
several attributes in the page-by which allow you to
narrow down the displayed results by customer gender,
income range, lifetime value score, and marital status.
Customer Gender (attribute)
Customer Income Range (attribute)
Customer Lifetime Value Score (attribute)
Customer Marital Status (attribute)
Current Customer Status (attribute)
Active Customers (metric)
Revenue Profit and Margins
This vertical bar graph displays the profit and revenue for
each quarter of the current year. The graph highlights the
profit margin by grouping the two metrics together by
quarter. There are several attributes in the page-by which
allow you to narrow down the displayed results by
customer gender, income range, lifetime value score,
and marital status.
Quarter (attribute)
Customer Gender (attribute)
Customer Income Range (attribute)
Customer Lifetime Value Score (attribute)
Customer Marital Status (attribute)
Profit (metric)
Revenue (metric)
Current Year (filter)
Active Customer (filter)
Reports Report Objects and Filters
Advanced Reporting Guide Learning to design a document D
2010 MicroStrategy, Inc. Customer Explorer dashboard 899
Creating the dashboard
You can now enhance the analytical power of each report by integrating them
into one dashboard. Customizing the dashboard formatting can improve
your dashboard by better reflecting your business standards.
Dataset objects
You have already created or located all of the reports that will be added as
datasets to your dashboard. These required reports are located in
\Customer Analysis Module\Public Objects\Reports\
Dashboards and Scorecards\Datasets\Customer Explorer.
Average Revenue per Transaction
Average Transactions per Customer
List of Customers
Number of Customers
Revenue Profit and Margins
Top Categories
Top Categories
This horizontal graph displays the top categories for
generated revenue. There are several attributes in the
page-by which allow you to narrow down the displayed
results by customer gender, income range, lifetime value
score, and marital status.
Customer Gender (attribute)
Customer Income Range (attribute)
Customer Lifetime Value Score (attribute)
Customer Marital Status (attribute)
Product Group (attribute)
Revenue (metric)
Current Year (filter)
Reports Report Objects and Filters
Learning to design a document Advanced Reporting Guide D
900 Customer Explorer dashboard 2010 MicroStrategy, Inc.
Create a new dashboard
Now that you are familiar with the location of the datasets, you can create a
new dashboard to display them.
Create a new dashboard
From MicroStrategy Desktop:
1 From the New Object drop-down menu, select Document.
2 Click the Dashboards tab, and select 01 Blank Dashboard.
3 Navigate to the report location displayed in the Dataset objects section
above, and choose all of the dataset reports.
4 Ensure that the List of Customers report is the primary dataset by
verifying that it is displayed in bold in the Dataset Objects area. If this
report is not displayed in bold, right-click it and select Set as Grouping
and Sorting Dataset.
From MicroStrategy Web:
1 From the Home menu, select Create Document.
2 In the Dashboard Templates area, select 01 Blank Dashboard.
3 Click the Add Dataset button in the Dataset Objects area, and add the
dataset reports from the Dataset objects section above.
4 Ensure that the List of Customers report is the primary dataset by
verifying that it is displayed in bold in the Dataset Objects area. If this
report is not displayed in bold, right-click it and select Set as Grouping
and Sorting Dataset.
Dashboard details
Now that you have added all of the required datasets to your dashboard, you
can begin designing a layout scheme that will attract attention to key
statistics, and make efficient use of screen area.
Advanced Reporting Guide Learning to design a document D
2010 MicroStrategy, Inc. Customer Explorer dashboard 901
Add a descriptive title to your document
5 To draw attention to the title, create a dark blue rectangle, and position it
at the top of your dashboards panel. To do this, open the Insert menu,
point to Shape, and select Rectangle.
6 Create a text box, and type the dashboards name in white. To do this,
open the Insert menu, and select Text.
7 Insert the Year attribute into the text box as dynamic text. This will
ensure that the documents title is updated automatically each year. To do
this, drag the Year attribute from the Dataset Objects area to the text
box.
Group your data and selectors into different subdivisions
8 Create five rectangles and place them strategically on the panel. These
subdivisions will increase the dashboards readability by grouping similar
features together while separating distinct features.
Learning to design a document Advanced Reporting Guide D
902 Customer Explorer dashboard 2010 MicroStrategy, Inc.
Each subdivision will display a distinct feature for the user. The first
subdivision will encapsulate all of the selectors. The second, third, and fourth
subdivisions will contain the following graphs and grid:
Top Categories
Revenue and Profit
Customer List
The final subdivision, encompassing the right-hand side of the screen, will
store the following three smaller graphs:
Number of Customers
Average Number of Transactions
Average Revenue per Transaction
Create text boxes for each subdivision
9 To give structure to your dashboard, label each subdivision with text
boxes. Include a title text box in the selector subdivision and name it
Demographics Selectors to indicate its functionality. For all other
subdivisions, insert text boxes to indicate the name of each graph.
10 In the selector subdivision at the top left, create four text boxes to denote
the attributes which the selectors are associated with. Use the following
names for these text boxes:
Gender
Marital Status
Lifetime
Income Range
11 Ensure that end users are aware of the dashboards interactive selectors
by including an instructional text box in the selector subdivision. A brief
message should appear here to encourage end users to experiment with
the selectors. Type the following message into the text box: *Select
attribute elements to segment customer base.
Advanced Reporting Guide Learning to design a document D
2010 MicroStrategy, Inc. Customer Explorer dashboard 903
Insert grids and graphs into each subdivision
12 Ensure that the Customer List report is in grid view, and insert it into the
dashboard by dragging it from the Dataset Objects area to the desired
subdivision. Be sure that you drag the Customer List graph into the
subdivision that you previously labeled with the Customer List text box.
13 Insert the following five reports into the document as graphs. It can be
helpful to format your graph reports in the Report Editor before
including them in the document as datasets. Ensure that the following
reports are in graph view, and insert them into the appropriate position
by dragging them to their corresponding subdivisions:
Top Categories
Revenue and Profit
Number of Customers
Average Number of Transactions
Average Revenue per Transaction
Incorporate interactive selectors
Selectors enable you to create an interactive experience and provide detailed
information by allowing user input. Users have the ability to specify their
desired attribute values, which are then automatically reflected in the grids
and graphs on the dashboard.
The following steps cover the creation of only those objects used in
the reports that are part of the Operational Performance
dashboard. The objects that are part of the report creation steps
below depend on the existence of other objects in your data model.
For example, the Fixed year selection filter requires the Year
attribute to function.
This appendix assumes that you have basic object and report
creation skills. For detailed information on creating basic objects
and reports, see the MicroStrategy Basic Reporting Guide.
Attributes
The following attributes are required to create the necessary reports. These
attributes are located in \MicroStrategy Tutorial\
Schema Objects\Attributes.
Category
Month
Region
Learning to design a document Advanced Reporting Guide D
914 Operational Performance dashboard 2010 MicroStrategy, Inc.
Filters
The following table lists the filter, and its definition, required to create the
necessary reports. This filter is located in \MicroStrategy Tutorial\
Public Objects\Filters.
Transformations
Transformations are schema objects, and therefore only a project designer
with schema object privileges can create them. A transformation lets you
directly analyze data over different time periods. The following
transformation is required to create the necessary reports, and is located in
\MicroStrategy Tutorial\Schema Objects\Transformations.
Last Months
The six % vs. Forecast metrics are derived metrics, which must be
created within the dashboard. These metrics do not exist as
standalone metrics in any folders within the project.
The KPI List graph report contains additional metrics that are not
listed in the table above. The table lists only the required metrics that
are used in the Operational Performance dashboard.
KPI List (continued) Med Avgorder
Med Avgrevcust
Med Margin
Med Profit
Med Rev.
Med Units
Order Count Forecast
Profit
Profit Forecast
Profit margin
Profit vs. Target
Revenue
Revenue Forecast
Revenue vs. Target
Trend - % Diff from LM - Avg per Customer
Trend - % Diff from LM - Avg per Order
Trend - % Diff from LM - Customer Count
Trend - % Diff from LM - Order Count
Trend - % Diff from LM - Profit
Trend - % Diff from LM - Profit Margin
Trend - % Diff from LM - Revenue
Trend - % Diff from LM - Units Sold
Units Sold
Units Sold Forecast
Units Sold Forecast Factor
Units Sold Forecast Percentage
Units Sold Rand Metric
Unit Sold vs. Target
KPI List - Region and Category
This simple grid report aggregates a few key
metrics at the month and region levels.
Category (Attribute)
Month (Attribute)
Region (Attribute)
Fixed year selection - Most recent year with
data in demo DB (Filter)
Avg Revenue per Customer
Order Count
Profit Margin
Revenue
Reports Report Objects
Learning to design a document Advanced Reporting Guide D
920 Operational Performance dashboard 2010 MicroStrategy, Inc.
Creating the dashboard
You can now enhance the analytical power of each report by integrating them
into a single dashboard. Customizing the dashboard formatting can improve
your document by better reflecting your business standards.
Dataset objects
You have already seen the two reports that will be added as datasets to your
dashboard. The reports listed are located in
\MicroStrategy Tutorial\Public Objects\Reports\
MicroStrategy Platform Capabilities\
MicroStrategy Report Services\
MicroStrategy Widget Library\Datasets.
KPI List
KPI List - Region and Category
Create a new dashboard
Now that you are familiar with the location of the datasets, you can create a
new dashboard to display them. This can be accomplished from either
MicroStrategy Desktop or MicroStrategy Web.
Create a new dashboard in MicroStrategy Desktop
1 In MicroStrategy Desktop, from the New Object drop-down menu, select
Document.
2 Click the Dashboards tab, and select 01 Blank Dashboard.
3 Delete the blank panel stack.
4 Navigate to the report location displayed in the Dataset objects section
above, and select the dataset reports.
5 Ensure that the KPI List report is the primary dataset by verifying that it
is displayed in bold in the Dataset Objects area. If this report is not
displayed in bold, right-click it and select Set as Grouping and Sorting
Dataset.
Advanced Reporting Guide Learning to design a document D
2010 MicroStrategy, Inc. Operational Performance dashboard 921
Create a new dashboard in MicroStrategy Web
1 In MicroStrategy Web, from the Home menu, select Create Document.
2 In the Dashboard Templates area, select 01 Blank Dashboard.
3 Delete the blank panel stack.
4 Click Add Dataset in the Dataset Objects area, and add the dataset
reports from the Dataset objects section above.
5 Ensure that the KPI List report is the primary dataset by verifying that it
is displayed in bold in the Dataset Objects area. If this report is not
displayed in bold, right-click it and select Set as Grouping and Sorting
Dataset.
Dashboard details
Add a title to your dashboard
1 To add a descriptive title that will appear at the beginning of your
document, open the Insert menu and select Text.
2 Type the following title into the text box, and format it to Bold by using
the format tool bar: OPERATIONAL PERFORMANCE DASHBOARD.
Replace Revenue with each of the six KPI names to get all 60 metric
names.
Revenue
Average Revenue (12 TM)
Revenue vs. Target
Max Revenue
Low Revenue
Med Revenue
Revenue Forecast
Last Months Revenue
Advanced Reporting Guide Learning to design a document D
2010 MicroStrategy, Inc. Operational Performance dashboard 923
% Diff from LM - Revenue
% vs. Forecast (Rev)
The Project Sorting property indicates how the projects are sorted.
The options are:
Default: Projects are sorted in the order in which the projects are
returned from Intelligent Server.
By Name: (Default) The projects are sorted by project name, in
ascending alphabetical order.
By Description: The projects are sorted by project description, in
ascending alphabetical order.
Both the Server Sorting and Project Sorting properties are found in the
Default Server Properties section on the Web Administrator page.
You can also define a custom sort order for displaying projects, by
typing a number in the Project Sort Index field in the Project Display
page in the Project Defaults level of the Preferences. Any projects with
a custom sort index are sorted before all other projects, regardless of
how the Server Sorting and Project Sorting properties are defined.
If two projects have the same sort order index, then they are listed in
the order specified by the Project Sorting property described above.
2011 MicroStrategy, Inc. Glossary: aggregate function 937
GLOSSARY
aggregate function A numeric function that acts on a column of data and
produces a single result. Examples include SUM, COUNT,
MAX, MIN, and AVG.
aggregate table A fact table that stores data that has been aggregated along
one or more dimensions.
See pre-aggregation.
aggregation The combining of numeric data at a specific attribute level.
The most common function is sum, which creates an additive
total.
See also pre-aggregation.
allocation An optional aspect of a fact extension that allows distribution
of values according to a user-defined calculation expression.
Compare degradation.
application-level
partition
In application-level partitioning, the application rather than
the database server manages the partition tables.
MicroStrategy supports two methods of application-level
partitioning: metadata partition mapping and warehouse
partition mapping.
Compare database-level partition.
Glossary Advanced Reporting Guide
938 Glossary: application object 2011 MicroStrategy, Inc.
application object MicroStrategy object used to provide analysis of and insight
into relevant data. Application objects are developed in
MicroStrategy Desktop and they are the building blocks for
reports and documents. Application objects include these
object types: report, document, template, filter, metric,
custom group, consolidation, prompt.
Apply function A function that allows you to insert custom SQL into an
expression.
See also pass-through expression.
atomic The lowest level of granularity. Cannot be decomposed into
smaller parts.
attribute A data level defined by the system architect and associated
with one or more columns in a data warehouse lookup table.
Attributes include data classifications like Region, Order,
Customer, Age, Item, City, and Year. They provide a means
for aggregating and filtering at a given level.
See also:
attribute element
attribute form
child attribute
constant attribute
derived attribute
parent attribute
attribute element A value of any of the attribute forms of an attribute. For
example, New York and Dallas are elements of the attribute
City; January, February, and March are elements of the
attribute Month.
Advanced Reporting Guide Glossary
2011 MicroStrategy, Inc. Glossary: attribute form 939
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 relationship See relationship.
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.
banding A method of organizing values according to a set of
descriptive or meaningful data ranges called buckets. For
example, customers in the age ranges of 1020, 2130, and
3140, where each set of ages is a band. Banding is also used
for display purposes, where every other row is a different
color and the two colors alternate.
Compare consolidation.
base table A fact table that stores data at the lowest level of
dimensionality.
cache A special data store holding recently accessed information for
quick future access. This is normally done for frequently
requested reports, whose execution is faster because they
need not run against the database. Results from the data
warehouse are stored separately and can be used by new job
requests that require the same data. In the MicroStrategy
environment, when a user runs a report for the first time, the
job is submitted to the database for processing. However, if
the results of that report are cached, the results can be
returned immediately without having to wait for the database
to process the job the next time the report is run.
category In a graph, the set of data along the X-axis. Categories
generally correspond to the rows of a grid report. An example
of a category is a bar in a bar graph.
Glossary Advanced Reporting Guide
940 Glossary: child attribute 2011 MicroStrategy, Inc.
child attribute The lower-level attribute in an attribute relationship.
See also:
parent attribute
relationship
compound attribute An attribute that has more than one key (ID) form.
compound key In a relational database, a primary key consisting of more
than one database column.
compound metric A type of metric defined by a formula based on arithmetic
operators and non-group functions. Arithmetic operators are
+, -, *, and /; non-group functions are OLAP and scalar
functions such as running sum or rank. The operators and
functions can be applied to facts, attributes, or metrics.
Examples are RunningAvg(Cost_Metric) and
Sum(Cost_Metric) + Sum(Profit_Metric).
compression ratio The average number of child records combined to calculate
one parent record. For example, the compression ratio
between monthly data and yearly data is 12:1. This is used to
determine where aggregate tables would have the greatest
impact. The larger the compression ratio between two
attributes, the more you stand to gain by creating an
aggregate table that pre-calculates the higher-level data.
configuration object A MicroStrategy object appearing in the system layer and
usable across multiple projects. Configuration objects include
these object types: users, database instances, database login
IDs, schedules.
consolidation An object that can be placed on a template and is made up of
an ordered collection of elements called consolidation
elements. Each element is a grouping of attribute elements
that accommodates inter-row arithmetic operations.
Compare custom group.
Advanced Reporting Guide Glossary
2011 MicroStrategy, Inc. Glossary: consolidation element 941
consolidation element A line item in a consolidation based on attribute elements.
For example, Year=2002 / Year=2003.
constant attribute See implicit attribute.
custom group An object that can be placed on a template and is made up of
an ordered collection of elements called custom group
elements. Each element contains its own set of filtering
qualifications.
dashboard A popular means of displaying and distributing data from
business intelligence projects. Dashboards provide key
metrics as well as summary information.
data definition Report execution steps that establish how the data is accessed
and manipulated in the data warehouse.
data mining A technique that is generally used to find hidden predictive
information from a large amount of data. This process
involves using existing information to gain new insights into
business activities by applying predictive models, using
analysis techniques such as regression, classification,
clustering, and association.
Data Explorer A portion of the interface used to browse through data
contained in the warehouse. Users can navigate through
hierarchies of attributes that are defined by the administrator
to find the data they need.
Glossary Advanced Reporting Guide
942 Glossary: database-level partition 2011 MicroStrategy, Inc.
database-level partition In database-level partitioning (sometimes called server-level
partitioning), the database server rather than MicroStrategy
manages the partitioned tables. The original 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.
Compare application-level partitioning.
data mart 1) A database, usually smaller than a data warehouse,
designed to help managers make strategic decisions about
their business by focusing on a specific subject or
department.
2) A database instance used to store result sets saved to data
mart tables.
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.
data warehouse 1) A database, typically very large, containing the historical
data of an enterprise. Used for decision support or business
intelligence, it organizes data and allows coordinated updates
and loads.
2) A copy of transaction data specifically structured for query,
reporting, and analysis.
degradation A type of fact extension in which values at one level of
aggregation are reported at a second, lower attribute level.
Compare allocation.
Advanced Reporting Guide Glossary
2011 MicroStrategy, Inc. Glossary: derived attribute 943
derived attribute An attribute calculated from a mathematical operation on
columns in a warehouse table. For example, Age can be
calculated from the expression [Current DateBirth Date].
See also:
attribute
implicit attribute
derived metric A metric based on data already available on the report. It is
calculated on the Intelligence Server, not in the database. Use
a derived metric to perform column math, that is,
calculations on other metrics, on report data after it has been
returned from the database.
dimensionality See level.
drill A method of obtaining supplementary information after a
report has been executed. The new data is retrieved by
requerying the Intelligent Cube or database at a different
attribute or fact level.
See also:
page-by
pivot
sort
subtotal
dynamic aggregation Rollup of metric values that occurs when an attribute is
moved from the report grid to the Report Objects. Whenever
the attributes in the Report Objects are not the same as the
attributes on the grid, dynamic aggregation has occurred.
Dynamic aggregation happens on-the-fly, in memory.
Glossary Advanced Reporting Guide
944 Glossary: dynamic relationship 2011 MicroStrategy, Inc.
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.
extraction,
transformation, and
loading (ETL)
1) The process used to populate a data warehouse from
disparate existing database systems.
2) Third-party software used to facilitate such a process.
fact 1) A measurement value, often numeric and typically
aggregatable, stored in a data warehouse.
2) A schema object representing a column in a data
warehouse table and containing basic or aggregated
numbersusually prices, or sales in dollars, or inventory
quantities in counts.
See also metric.
fact table A database table containing numeric data that can be
aggregated along one or more dimensions. Fact tables can
contain atomic or summarized data.
Compare:
aggregate table
base table
Advanced Reporting Guide Glossary
2011 MicroStrategy, Inc. Glossary: filter 945
filter A MicroStrategy object that specifies the conditions that the
data must meet to be included in the report results. Using a
filter on a report narrows the data to consider only the
information that is relevant to answer your business
question, since a report queries the database against all the
data stored in the data warehouse.
A filter is composed of at least one qualification, which is the
actual condition that must be met for the data to be included
on a report. Multiple qualifications in a single filter are
combined using logical operators. Examples include Region
= Northeast or Revenue > $1 million.
A filter is normally implemented in the SQL WHERE clause.
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.
formatting zone Determines what formatting is applied to any data or object
located in the zone. When an object on a report is moved
from one formatting zone to another (as a result of pivoting,
for example), the formatting of the object changes based on
the new zone.
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.
grid unit The individual attributes, metrics, consolidations, and
custom groups that can be placed on a report grid.
hierarchy A set of attributes defining a meaningful path for element
browsing or drilling. The order of the attributes is
typicallythough not alwaysdefined such that a higher
attribute has a one-to-many relationship with its child
attributes.
Glossary Advanced Reporting Guide
946 Glossary: HTML document 2011 MicroStrategy, Inc.
HTML document 1) A compound report displaying multiple grids and graphs.
2) The MicroStrategy object that supports such a report.
For information about HTML documents, such as procedures
to create and format them, see the Desktop Help.