Beruflich Dokumente
Kultur Dokumente
Course Guide
Version: ADVRPT-921-Oct11-CG
U.S. Government Restricted Rights. It is acknowledged that the Course and Software were developed at private
expense, that no part is public domain, and that the Course and Software are Commercial Computer Software and/or
Commercial Computer Software Documentation provided with RESTRICTED RIGHTS under Federal Acquisition
Regulations and agency supplements to them. Use, duplication, or disclosure by the U.S. Government is subject to
restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in Technical Data and Computer Software clause at
DFAR 252.227-7013 et. seq. or subparagraphs (c)(1) and (2) of the Commercial Computer SoftwareRestricted Rights
at FAR 52.227-19, as applicable. The Contractor is MicroStrategy, 1850 Towers Crescent Plaza, Vienna, Virginia 22182.
Rights are reserved under copyright laws of the United States with respect to unpublished portions of the Software.
Copyright Information
Trademark Information
MicroStrategy Support, MicroStrategy Telecaster, MicroStrategy Transactor, MicroStrategy Web, MicroStrategy Web
Business Analyzer, MicroStrategy World, Application Development and Sophisticated Analysis, Best In Business
Intelligence, Centralized Application Management, Information Like Water, Intelligence Through Every Phone,
Intelligence To Every Decision Maker, Intelligent E-Business, Personalized Intelligence Portal, Query Tone, Rapid
Application Development, MicroStrategy Intelligent Cubes, The Foundation For Intelligent E-Business, The Integrated
Business Intelligence Platform Built For The Enterprise, The Platform For Intelligent E-Business, The Scalable
Business Intelligence Platform Built For The Internet, Industrial-Strength Business Intelligence, Office Intelligence,
MicroStrategy Office, MicroStrategy Report Services, MicroStrategy Web MMT, MicroStrategy Web Services, Pixel
Perfect, Pixel-Perfect, MicroStrategy Mobile, MicroStrategy Integrity Manager and MicroStrategy Data Mining
Services are all registered trademarks or trademarks of MicroStrategy Incorporated.
All other company and product names may be trademarks of the respective companies with which they are associated.
Specifications subject to change without notice. MicroStrategy is not responsible for errors or omissions.
MicroStrategy makes no warranties or commitments concerning the availability of future products or versions that
may be planned or under development.
Patent Information
This product is patented. One or more of the following patents may apply to the product sold herein: U.S. Patent Nos.
6,154,766, 6,173,310, 6,260,050, 6,263,051, 6,269,393, 6,279,033, 6,567,796, 6,587,547, 6,606,596, 6,658,093,
6,658,432, 6,662,195, 6,671,715, 6,691,100, 6,694,316, 6,697,808, 6,704,723, 6,741,980, 6,765,997, 6,768,788,
6,772,137, 6,788,768, 6,798,867, 6,801,910, 6,820,073, 6,829,334, 6,836,537, 6,850,603, 6,859,798, 6,873,693,
6,885,734, 6,940,953, 6,964,012, 6,977,992, 6,996,568, 6,996,569, 7,003,512, 7,010,518, 7,016,480, 7,020,251,
7,039,165, 7,082,422, 7,113,993, 7,127,403, 7,174,349, 7,181,417, 7,194,457, 7,197,461, 7,228,303, 7,260,577, 7,266,181,
7,272,212, 7,302,639, 7,324,942, 7,330,847, 7,340,040, 7,356,758, 7,356,840, 7,415,438, 7,428,302, 7,430,562,
7,440,898, 7,486,780, 7,509,671, 7,516,181, 7,559,048, 7,574,376, 7,617,201, 7,725,811, 7,801,967, 7,836,178, 7,861,161,
7,861,253, 7,881,443, 7,925,616, 7,945,584 and 7,970,782. Other patent applications are pending.
How to Contact Us
MicroStrategy Education Services
1850 Towers Crescent Plaza
Tysons Corner, VA 22182
Phone: 877.232.7168
Fax: 703.848.8602
E-mail: education@microstrategy.com
http://www.microstrategy.com/education
MicroStrategy Incorporated
1850 Towers Crescent Plaza
Tysons Corner, VA 22182
Phone: 703.848.8600
Fax: 703.848.8610
E-mail: info@microstrategy.com
http://www.microstrategy.com
TABLE OF CONTENTS
Preface
Course Description.................................................................... 13
Who Should Take This Course .............................................. 14
Course Objectives ................................................................. 15
About the Course Materials ......................................................... 16
Content Descriptions ............................................................. 16
Learning Objectives ............................................................... 16
Lessons ................................................................................. 17
Opportunities for Practice ...................................................... 17
Typographical Standards ....................................................... 17
Core Courses......................................................................... 20
1. Introduction to
Advanced Reporting
Table of Contents
2. Advanced Metrics
Table of Contents
3. Advanced Filters
Table of Contents
4. Consolidations and
Custom Groups
5. Advanced OLAP
Services
Table of Contents
6. Derived Elements
Table of Contents
8. Drill Maps
9. Report Developer
Tools
10
Table of Contents
B. Additional Topics
11
Table of Contents
12
PREFACE
Course Description
This 3-day course explores advanced topics in MicroStrategy Desktop. The
course assumes and builds on an understanding of basic report creation from
the 2-day MicroStrategy Desktop: Reporting Essentials class. Desktop has a
wealth of sophisticated reporting features designed to enable you to create
almost any type of report. This course explores some of these options with the
goal of equipping you to take advantage of them in your own projects.
You will learn about creating advanced metrics, such as level, transformation,
and conditional metrics. You will also learn about creating and using advanced
filters, such as relationship, metric-to-metric, and joint element list filters. You
will also learn about custom groups and consolidations. You will learn about
advanced MicroStrategy OLAP Services features and custom drill maps.
Finally, will learn about using Report Data Options features to customize
reports and working with other useful tools such as the Project Documentation
Wizard.
At the end of this course, you will have an understanding of the important
concepts required to build sophisticated reports using Desktop.
13
Preface
Report developers
Course Prerequisites
Before starting this course, you should be familiar with:
Follow-Up Courses
After taking this course, you might consider taking the following courses:
Related Certifications
To validate your proficiency in the content of this course, you might consider
taking the following certification:
Preface
Course Objectives
After completing this course, you will be able to:
Create consolidations and custom groups and determine the appropriate use
of both objects. (Page 164)
Define all of the Report Data Options and understand how to enable
them. (Page 288)
Describe the purpose of drill maps in reporting. Create and edit drill
maps. (Page 334)
Course Objectives
15
Preface
Content Descriptions
Each major section of this course begins with a Description heading. The
Description introduces you to the content contained in that section.
Learning Objectives
Learning objectives enable you to focus on the key knowledge and skills you
should obtain by successfully completing this course. Objectives are provided
for you at the following three levels:
Lessons
Each lesson sequentially presents concepts and guides you with step-by-step
procedures. Illustrations, screen examples, bulleted text, notes, and definition
tables help you to achieve the learning objectives.
Preface
Review
Case Study
Business Scenario
Exercises
Typographical Standards
The following sections explain the font style changes, icons, and different types
of notes that you see in this course.
Actions
References to screen elements and keys that are the focus of actions are in bold
Arial font style. The following example shows this style:
Click Select Warehouse.
Code
References to code, formulas, or calculations within paragraphs are formatted
in regular Courier.New font style. The following example shows this style:
Sum(Sales)/Number of Months
17
Preface
Data Entry
References to literal data you must type in an exercise or procedure are in bold
Arial font style. References to data you type that could vary from user to user or
system to system are in bold italic Arial font style. The following example
shows this style:
Type copy c:\filename d:\foldername\filename.
Keyboard Keys
References to a keyboard key or shortcut keys are in uppercase letters in bold
Arial font style. The following example shows this style:
Press CTRL+B.
New Terms
New terms to note are in regular italic font style. These terms are defined when
they are first encountered in the course. The following example shows this
style:
The aggregation level is the level of calculation for the metric.
Preface
Precedes Exercises
19
Preface
MicroStrategy Courses
Core Courses
1
INTRODUCTION TO ADVANCED
REPORTING
Lesson Description
This lesson covers two major topics related to creating and deploying
MicroStrategy reports in a business intelligence system.
First, you will learn about the components of a business intelligence system so
that you have a better understanding of the entire architecture that makes
business intelligence reporting possible.
Second, you will learn about the basic concepts of report execution of which
you should be aware, especially when creating reports for a large end-user
audience. This lesson covers three main concepts related to reporting:
21
Lesson Objectives
After completing this lesson, you will be able to:
Describe the MicroStrategy business intelligence architecture that serves as
the foundation for creating reports. Explain report execution concepts.
After completing the topics in this lesson, you will be able to:
Describe the basic concepts related to report execution that are useful to a
report designer when devising a strategy to deploy advanced reports to end
users. (Page 27)
22 Lesson Objectives
23
Source Systems
A source system refers to any system or file that captures or records
transactions, such as sales, inventory, withdrawals, or deposits. Source
systems are often described as online transaction processing (OLTP)
systems.
Data Warehouse
A well-designed and robust data warehouse lies at the heart of the business
intelligence system. The data warehouse provides the foundation for a robust
online analytical processing (OLAP) system, which involves manipulating
transaction records to calculate sales trends, growth patterns,
percent-to-total contributions, trend reporting, profit analysis, and so forth.
While source systems are generally designed and optimized for transactional
processing, data warehouses are generally designed and optimized for
analytical processing. You populate a data warehouse with data from the
existing operational systems using an extraction, transformation, and
loading (ETL) process.
MicroStrategy Desktop
MicroStrategy Architect
MicroStrategy Web
MicroStrategy Office
MicroStrategy SDK
MicroStrategy Mobile
Metadata Database
The metadata database stores MicroStrategy object definitions and
information about the data warehouse and maps MicroStrategy objects to the
data warehouse structures and content.
MicroStrategy applications use the metadata database to translate user
requests into SQL queries and then translate the results of those queries back
into MicroStrategy objects like reports and documents.
The MicroStrategy metadata stores a variety of data. The following object
types in the MicroStrategy environment describe these various types of data:
25
Basics of Reporting
After completing this topic, you will be able to:
Describe the basic concepts related to report execution that are useful to a
report designer when devising a strategy to deploy advanced reports to end
users.
26 Basics of Reporting
Basics of Reporting
27
There is no difference between running a report in three tier and running the
same report in four tier. In both instances, almost all of the tasks involved in
report generation are completed by the Intelligence Server. The Intelligence
Server generates and executes the SQL, performs advanced analytics on the
data, manages report caches, and enforces security.
The only part of the report generation process that the client performs is to
format the data for display purposes. Desktop gets the result set from
Intelligence Server and then formats it for display in the Desktop interface.
Similarly, MicroStrategy Web retrieves the result set from Intelligence Server
and formats it for display in a Web browser.
28 Basics of Reporting
Process
The Kernel first checks the cache to see whether the report
results are already there. The report results will already be in
cache if another user or a schedule previously ran the report. If a
valid cache exists, Intelligence Server skips directly to Step 10.
Basics of Reporting
29
Process
If no valid cache exists for the report, the Kernel obtains the
report definition and application objects from the metadata using
the Metadata Server.
The Kernel sends this information to the SQL Engine. The SQL
Engine generates the SQL optimized for the specific database
being used. The SQL passes are then returned to the Kernel.
The Kernel sends the SQL to the Query Engine. The Query
Engine runs the SQL against the data warehouse and the report
results are returned to the Kernel.
The Query Engine sends the SQL to run against the data
warehouse and the report results are returned to the Kernel.
30 Basics of Reporting
Prompt answers to the report, including system prompt answers (if any)
You can also associate the following keys with a report cache, depending on
how cache properties are configured:
User ID
Database Connection ID
Database Login ID
The administrator can use these options to ensure that caches are not
shared
between users.
Each object in the MicroStrategy project is identified with a unique ID.
Examples of these unique object IDs are the Report ID, Template ID, and so
forth. These IDs remain the same as long as the objects exist and are not
deleted. However, every time you edit an object, it is given a new version ID
so that the tool can determine whether it has been modified.
If any of these keys do not match between a report that you run and an
existing cache, then the cache is not used, and the report is executed against
the data warehouse.
In addition, if you modify any of the other user objects that comprise the
template or filter of a report, such as metrics, custom groups, and so forth,
the version ID of the object changes. Since the object is part of the report
definition, when you execute the report again, a new cache is created.
As mentioned earlier, the administrator of your Intelligence Server typically
manages caches for your MicroStrategy environment. Still, as a report
developer, you should be aware that the overall caching configuration can be
devised at the MicroStrategy project-level or at the individual report level. In
other words, caching can be enabled or disabled for the entire project or on a
report-by-report basis.
2011 MicroStrategy, Inc.
Basics of Reporting
31
Re-executing a Report
You can re-execute every report you run in Desktop by using the Re-execute
button. In general, re-executing a report means running the report against
the data warehouse, thus bypassing any valid cache that might exist for that
report. The following reporting scenarios explain the use of the Re-execute
button:
Object-Level Security
As a report developer, the object-level is the only level at which you can set
security properties.
32 Basics of Reporting
When you create any MicroStrategy object, you are given ownership (in other
words, Full Control permissions) of the object. As the owner of the object,
you can set its access control list. These access control list settings enable you
to set object permissions on a user-by-user (or user group-by-user group)
basis.
You can set the following permissions on an object:
Basics of Reporting
33
34 Basics of Reporting
Security Filters
Like report filters, security filters narrow down a result set according to
specified conditions. However, their purpose is to ensure that users see only
the data to which they have the appropriate access. For example, if a sales
manager for the UK is allowed to see data only for his own country, then the
administrator for the MicroStrategy environment can create a filter that
qualifies on the Country attribute to return only UK data. This filter can serve
as the UK Sales Manager's security filter, so the condition "Country = UK" is
automatically included in the WHERE clause of the SQL for all reports that
the UK sales manager executes.
As you can see, security filters are assigned on a per-user basis. Every report
the user runs uses both its security filter and the standard report filter.
Basics of Reporting
35
36 Basics of Reporting
Lesson Summary
In this lesson, you learned the following:
The report execution query flow is the process by which Desktop and
Intelligence Server generate reports in a three-tier architecture.
Intelligence Server can retain the definition and results of every report
that it runs to improve query response time the next time those same
reports are run. These stored result sets are called report caches.
Lesson Summary
37
38 Lesson Summary
2
ADVANCED METRICS
Lesson Description
In the MicroStrategy Desktop: Reporting Essentials course, you learned how to
create basic metrics. This lesson takes that knowledge to a deeper level.
In this lesson, you will learn to create various types of advanced metrics, such
as level, non-aggregatable, conditional, and transformation metrics. These
metrics empower you to answer questions like, What percentage of total
company revenue did my business unit generate?, Are inventory levels being
consistently replenished at the beginning of each week?, or What was the
profit margin last year at this time?.
39
Advanced Metrics
Lesson Objectives
After completing this lesson, you will be able to:
Create level, non-aggregatable, transformation, conditional, and nested
metrics. Describe the settings associated with these types of metrics. Execute
reports using advanced metrics.
After completing the topics in this lesson, you will be able to:
Save base formulas for reuse in creating other metrics. (Page 71)
Define custom subtotals to use different naming conventions for totals and
create user-defined subtotals that use nonstandard subtotal
functions. (Page 90)
40 Lesson Objectives
Advanced Metrics
Level Metrics
After completing this topic, you will be able to:
Create level metrics and explain their use in percent-to-total calculations.
Target
Grouping
Filtering
Level Metrics
41
Advanced Metrics
The following image shows the Level (Dimensionality) pane in the Metric
Editor:
Metric EditorLevel (Dimensionality Pane)
Target
The target is the attribute level at which the metric calculates. Any attribute or
hierarchy can be the target.
Grouping
Grouping determines how the metric aggregates. The option you choose for
the grouping of a metric affects the GROUP BY clause of the SQL pass that
calculates the metric. The following grouping options are available in the
Metric Editor for level metrics:
NoneExcludes the target (and its children) for the report grouping. This
setting calculates one total for the target attribute and any of its child
attributes that are included on the template.
42 Level Metrics
Advanced Metrics
Filtering
The filtering setting governs the relationship between the report filter and the
calculation of the metric. The following filtering options are available in the
Metric Editor:
filtering setting only applies to filtering criteria that are related to
The
the attribute that is specified as the target. A report filter is related to the
target if it qualifies on an attribute that belongs to the same hierarchy as
the target attribute.
Solution
To answer this question:
Level Metrics
43
Advanced Metrics
you include the totals for the Regional Revenue level metric, they are
Ifdimensionality
aware and display the correct figures.
44 Level Metrics
Advanced Metrics
Level Metrics
45
Advanced Metrics
The Regional Revenue level metric gets resolved in multiple passes of SQL. The
report filter is present in the WHERE clause of the first SQL pass. The
MicroStrategy Engine brings back only the target attribute elements (Region)
where the report filter elements (Call Center) exist within the target attribute
(Region). The SQL for this metric looks like the following:
insert into ZZTSX01009ESQ001
select distinct s21.[REGION_ID] AS REGION_ID
from [LU_CALL_CTR] s21
where s21.[CALL_CTR_ID] in (5, 11, 12)
46 Level Metrics
Advanced Metrics
Using the same business scenario, since the call centers are directly related to
the target attribute of Region, the entire report filter is ignored. However, if the
report filter contained other attribute elements, like years, those conditions
would not be ignored because they are not directly related to the target
attribute of Region. The following image shows the report with values for level
metric with Ignore filtering:
Regional RevenueFiltering Set to Ignore
Level Metrics
47
Advanced Metrics
How did the revenue for each of the three call centers (Boston, New York,
and Washington, D.C.) compare to the revenue of the entire company?
How did the revenue of each of the three call centers compare to the total of
only the three call centers?
The answers to these questions give you an insight into how the new
advertising campaign is being received in the targeted areas of your region.
They also give you a broader perspective on its effects on the company.
48 Level Metrics
Advanced Metrics
Using the same business scenario, this metric calculates the total revenue for
all call centers present in the report filter. The following image shows the
report with values for level metric with Standard filtering:
Regional RevenueFiltering Set to Standard
Level Metrics
49
Advanced Metrics
Using the same business scenario, this report lists only the regions that have
call centers present in the report filter. The Regional Revenue metric
calculation takes into account only these listed regions, but it includes the total
for all call centers in these regions, not just the call centers specified in the
report filter. The following image shows the report with values for level metric
with Absolute filtering:
Regional RevenueFiltering Set to Absolute
50 Level Metrics
Advanced Metrics
Level Metrics
51
Advanced Metrics
For example, using the same business scenario, if you want the MicroStrategy
Engine to use the ITEM_EMP_SLS fact table instead of the CITY_CTR_SLS
fact table (an aggregate fact table) to calculate the metric, you include the Item
attribute as a target of the level metric. Since the Item attribute is found in the
ITEM_EMP_SLS table and not the CITY_CTR_SLS table, including Item as a
target forces the MicroStrategy Engine to use the ITEM_EMP_SLS fact table.
If data is stored differently in the ITEM_EMP_SLS table, results could be
different. The following image shows the report with values for level metric
with None filtering:
Regional RevenueFiltering Set to None
The SQL statements for these metrics look like the following:
Regional Revenue (Target=Region, Filtering=Standard, Grouping=Standard)
52 Level Metrics
Advanced Metrics
a12.[CALL_CTR_ID] = a13.[CALL_CTR_ID]
and a12.[CALL_CTR_ID] in (5, 11, 12)
group by a13.[REGION_ID]
Level Metrics
53
Advanced Metrics
Solution
Earlier in this lesson, you learned how to use Ignore filtering and None
grouping to create an All Revenue" level metric. If you have multiple
hierarchies represented on the report template, this method requires you to
include multiple attribute targets in your level metric. However, another
option is to remove the default Report Level target and add any attribute as the
target with its grouping set to None.
The presence of the default Report Level target on a metric tells the
MicroStrategy Engine to group by all the attribute IDs found on the template.
By removing the Report Level target from the metric and selecting None for the
grouping of any other available target attribute, the MicroStrategy Engine
understands that there should not be a GROUP BY clause in the SQL pass that
calculates the metric. You can use any attribute for this purpose. You do not
need to add more than one attribute unless specific filtering behavior is
required for the metric.
specific filtering behavior is required, you need to add other target
Ifattributes,
but you should always select None grouping.
54 Level Metrics
Advanced Metrics
Removing the Report Level target is a quick and easy way to do something that
would otherwise involve multiple steps. It is helpful if you have many
hierarchies represented on the report template that need to be included in the
metric calculation to obtain the desired outcome. The following image shows
the report with values for a metric with removed Report Level:
All RevenueRemove Report Level
In this report, the All Revenue level metric has the following dimensionality:
All RevenueWithout Report Level
Level Metrics
55
Advanced Metrics
When you keep the Report Level target, you also need to include every
attribute that is on the template as a target 0f the level metric. You select None
grouping for each of these attributes. This level metric produces the same
result (a value of $35,023,708) as the previous example, but its definition has
more components due to the multiple target attributes.
56 Level Metrics
Advanced Metrics
_______________________________________
_______________________________________
_______________________________________
57
Advanced Metrics
_______________________________________
_______________________________________
_______________________________________
3
_______________________________________
_______________________________________
_______________________________________
Advanced Metrics
The following report displays nearly every type of level metric you learned
about in this lesson. If you assume that the target is Region, can you determine
the filtering and grouping for each level metric?
4
_______________________________________
_______________________________________
_______________________________________
59
Advanced Metrics
The following report shows the filtering and grouping settings for each level
metric in the previous report. For display purposes, the names of the metrics
are abbreviated as follows:
ABSAbsolute filtering
IGNIgnore filtering
NONENone grouping
Read the following level metric description and identify the target, filtering,
and grouping for the metric.
1 You would like to create a metric to calculate the sum of sales for the entire
region, while including only the call centers that are in the report filter. The
template contains the Region and Call Center attributes and the metric.
_______________________________________
_______________________________________
_______________________________________
2 You would like to create a metric to calculate the sum of units sold for each
region in Q4 2009, considering only the call centers that are included in the
report filter. The template contains the Region and Call Center attributes
and the metric.
_______________________________________
_______________________________________
_______________________________________
Advanced Metrics
3 You would like to create a metric to calculate the sum of profit for 2008
across all customer states regardless of the customer cities that are included
in the report filter. The template contains the Customer State and Customer
City attributes and the metric.
_______________________________________
_______________________________________
_______________________________________
61
Advanced Metrics
Review Solutions:
1 Target: Region
Filtering: Standard
Grouping: Standard
2 Target: Region
Filtering: Absolute or Ignore
Grouping: Standard
3 Target: Region
Filtering: Standard
Grouping: None
4
Solutions for IMage with Various Level Metrics
Metric
Filtering
Grouping
Absolute
None
Absolute or Ignore
Standard
Ignore
None
Absolute or Ignore
Standard
Standard
None
Standard
Standard
Advanced Metrics
Non-aggregatable Metrics
After completing this topic, you will be able to:
Describe and create non-aggregatable metrics.
Non-aggregatable Metrics
63
Advanced Metrics
64 Non-aggregatable Metrics
Advanced Metrics
The following image shows the lookup table and the fact table that can be used
when specifying a metric:
Beginning (Lookup) Versus Beginning (Fact)
For example, in the illustration above, the, the fact table does not store the
stock amount for the first week of the month (Week 1). The first stock value it
stores is for the second week of the month (Week 2). In this type of scenario, if
you define your non-aggregatable metric as beginning (lookup), the
MicroStrategy Engine uses the lookup table to identify the beginning week of
the month. Since the beginning week according to the lookup table is Week 1
and there is no stock value in the fact table for Week 1, the report result returns
a null value for the Beginning Stock (LU) metric for Month 1.
Alternatively, if you define your non-aggregatable metric with beginning
(fact), the MicroStrategy Engine looks to the Fact table to identify the
beginning week of the month. Since the beginning week is week 2 according to
the Fact table, the report result returns the value of 10 for Beginning Stock in
Month 1.
To create a non-aggregatable metric:
Non-aggregatable Metrics
65
Advanced Metrics
Transformation Metrics
After completing this topic, you will be able to:
Describe and create transformation metrics.
You can apply any transformation to the definition of a metric, and you can
apply multiple transformations to a single metric.
66 Transformation Metrics
Advanced Metrics
Types of Transformations
There are two types of transformations:
Expression-Based Transformations
You define expression-based transformations using mathematical expressions.
A transformation expression typically includes an attribute ID column, a
mathematical operator, and a constant.
For example, you might create a Last Quarter or Last Month transformation
using QUARTER_ID-1 or MONTH_ID-1, respectively.
method works only if you store your data in a format conducive to
This
the transformation expression. For example, if you store your month
IDs in the format YYYYMM, the MONTH_ID1 expression does not
always work. When you apply the expression to the month ID of 201101
(January 2011) with the intention of retrieving data for the previous
month of 201012 (December 2010),it returns the month ID of 201000.
So, instead of retrieving the data for the previous month, you retrieve no
data because the month ID of 201000 does not exist.
You can also create expression-based transformations using the date and time
functions available in MicroStrategy. For example, you can define an
expression-based transformation as follows:
AddMonths(Date_ID, -1)
This formula calculates a Last Month transformation using the AddMonths
function instead of a mathematical expression. The AddMonths function
returns a date or timestamp offset (+ or -) by the specified number of months
(in this example, - 1 month).
Transformation Metrics
67
Advanced Metrics
Table-Based Transformations
Table-based transformations reference a physical table in the data warehouse
that defines the transformation from one time period to another. The following
illustration shows examples of transformation tables:
Transformation Tables
68 Transformation Metrics
Advanced Metrics
Transformation Components
All transformations have the following components:
Member tablesThese tables store the data for the member attributes.
For expression-based transformations, the member tables are generally
lookup tables that correspond to the attribute being transformed.
For table-based transformations, the member tables are the
transformation tables that store the relationship.
The mapping type determines the way the transformation is created based
on the nature of the data. You can select one of the following mapping
types:
One-to-oneA typical one-to-one relationship is comparing this year to
last year. One day or month this year maps to exactly one day or month
last year.
Many-to-manyA typical many-to-many relationship is comparing a
given date to the year-to-date total. For a given date, there are many
other dates included in its year-to-date calculation.
Transformation Metrics
69
Advanced Metrics
1 In the Metric Editor, in the Definition pane, define the formula for the
metric.
2 In the upper pane, select Transformation.
3 In the Object Browser, drag the predefined transformation object you want
use to the Transformations pane.
4
The following image shows the transformation metric in the Metric Editor:
Metric EditorTransformation Pane
70 Transformation Metrics
Advanced Metrics
Normal displays unit figures for both the current values and the
corresponding values for the interval selected.
Variance displays the difference between the current values and the
corresponding values for the interval selected.
Transformation Metrics
71
Advanced Metrics
Base Formulas
After completing this topic, you will be able to:
Save base formulas for reuse in creating other metrics.
Reusing Formulas
You can save the formulas of simple metrics as separate objects that you can
then reuse to create other metrics. These formula objects are called base
formulas. Instead of redefining a formula you frequently use, you can save it as
a base formula. You can select base formulas from the Object Browser and drag
them to the Definition pane when you create a new metric.
expression to create a base formula cannot have more than one
The
dimensionality {~}. For instance SUM(FACT1){~}+SUM(FACT2){~})
is invalid, but (SUM(FACT1)+SUM(FACT2)){~} is valid.
Base formulas are useful for object maintenance. If the formula for a simple
metric changes, you only need to edit the definition once in the base formula
object. All metrics that use that base formula are automatically updated with
the new definition. Base formulas also help ensure that report designers define
their metrics using a consistent definition, which is helpful if the formula is
complex and likely to be entered incorrectly. Finally, base formulas help you
categorize and identify the metrics that use the same formula since you can
search for metrics that contain a particular base formula object.
To save a metric formula as a base formula:
1 In the Metric Editor, in the Definition pane, define the metric formula.
2 On the File menu, select Save As.
3 In the Save As window, browse to the location in which you want to save the
base formula.
4 In the Object name box, type a name for the base formula, and select Base
Formula in the Save as type drop down list.
5 Click Save.
6 In the message window, click Yes.
7 Close the Metric Editor.
72 Base Formulas
Advanced Metrics
Conditional Metrics
After completing this topic, you will be able to:
Create conditional metrics.
A conditional metric contains its own filter. The filter of a conditional metric is
completely separate and independent of any filtering criteria specified in a
report filter. For example, you may want to create a report that contains
multiple metrics on its template and apply a time filter to most of these
metrics. However, you also want one metric to calculate all 2009 revenue
regardless of the filter on the report. You can create a conditional metric that
ignores the report filter and calculates all 2009 revenue.
While you can only apply one filter to the definition of a metric, that single
filter can contain multiple filtering conditions.
Conditional Metrics
73
Advanced Metrics
74 Conditional Metrics
Advanced Metrics
To change how a metric condition interacts with related report filter elements:
Conditional Metrics
75
Advanced Metrics
Clearly, the metrics on the report on the left ignore the related report filter
element, Year = 2010. This behavior is the default for conditional metrics when
you select the Remove related report filter elements check box.
76 Conditional Metrics
Advanced Metrics
Nested Metrics
After completing this topic, you will be able to:
Create nested metrics that involve multiple formulas calculated at different
levels.
An example is the best way to describe the purpose and use of a nested metric
(sometimes also referred to as a nested aggregation metric).
Imagine a report that requires a metric to calculate the average employee
revenue for each region. The report resembles the following:
Nested MetricsAverage Employee Revenue
Nested Metrics
77
Advanced Metrics
If you were to take the formulas apart and calculate each formula separately,
you can see how nested metrics really work. Notice the report below, where the
Revenue metric is being summed for each employee in the Central region. Also,
notice the Average subtotal value across all employees in the Central region.
Average Revenue by Employee for the Central Region
78 Nested Metrics
Advanced Metrics
Nested metrics are basically a special type of simple metric in which one simple
metric calculation is performed to enable the calculation of another simple
metric. You only use them when the level at which data is stored in the data
warehouse precludes being able to calculate and analyze data at the desired
level. Nested metrics provide an alternative to modifying physical data
warehouse tables.
To create a nested metric:
Nested Metrics
79
Advanced Metrics
Advanced Functions
After completing this topic, you will be able to:
Use advanced functions to create metrics.
80 Advanced Functions
Advanced Metrics
1 In the Metric Editor, in the Object Browser, browse to the Functions and
Operators folder.
2 In the Functions and Operators folder, drag the desired function or
operator to the Definition pane.
syntax for a particular function or operator is displayed at the
The
bottom of the Metric Editor.
3 In the Object Browser, drag the desired fact or metric that you want to use
between the parentheses of the function or operator in the Definition pane.
4 In the Definition pane, select the entire function or operator.
Advanced Functions
81
Advanced Metrics
82 Advanced Functions
Advanced Metrics
Count Metrics
Count metrics are typically based on attributes and count the number of
attribute elements that meet your specified criteria.
In a retail business environment, you might want to count the number of items
available at any time in any store. On the other hand, you might want to count
only the number of items available in a certain catalog. You may also want to
count only the number of items that sold in a particular year.
To create a count metric:
1 In the Metric Editor, in the Object Browser, browse to the Basic Functions
folder.
2 In the Basic Functions folder, drag Count to the Definition pane.
3 In the Object Browser, drag the attribute between the parentheses of the
Count function in the Definition pane.
an alternative to selecting the Count function and then the
Asattribute,
you can just drag the desired attribute to the Definition
pane. The Count function is the default for attributes.
4 Define additional metric properties as necessary.
5 Click Save and Close.
By default, when you place a count metric on a report, it is calculated using the
lookup table of the attribute. For example, if you place a Count (Item) metric
on a report, the items are counted using the Lookup_Item table. This behavior
is the default because the MicroStrategy Engine always looks to the smallest
(and thus most efficient) table that contains enough data to resolve the report.
Advanced Functions
83
Advanced Metrics
However, you may want to change the default behavior and force the
MicroStrategy Engine to use a fact table instead of the lookup table. For
example, suppose you create a Count Item metric defined as Count(Item).
You then place the Month attribute and the Count Item metric on a report.
Based on the tables in the following illustration, the MicroStrategy Engine
retrieves the item count from the lookup table, which is the smaller of the two
tables.
Calculate Count Against Lookup Table Versus Fact Table
However, retrieving a count of items from the lookup table for this report
results in a count of every item for every month. To answer the question, How
many of my available items did I sell each month?, you need the
MicroStrategy Engine to count items using the fact table, not the lookup table.
Any time you are counting an attribute (Item) in relation to an unrelated
attribute (Month), you must use a fact table since fact tables establish the
relationships between unrelated attributes.
You can adjust the behavior of the MicroStrategy Engine by changing the
parameters that govern the behavior of the Count function. In this example,
you could specify that the count should be performed using a specific fact. This
configuration forces the MicroStrategy Engine to count only those items having
a value for that fact, thereby forcing it to count from the fact table.
84 Advanced Functions
Advanced Metrics
When using count metrics, the final count number you see in the result set
depends on the table against which the count is performed, especially when
your data warehouse includes aggregate fact tables. A Count Item metric
processed against a detail fact table, which tracks every item sold in every order
on every day and can list the same item multiple times, will likely return a
different number of items than the same metric processed against an aggregate
fact table, which tracks the items sold over all time by each employee and only
lists each item once. Also, the table against which a report is processed depends
on the attributes and filters in a report.
To change the table against which a count metric is processed:
1 In the Metric Editor, validate the syntax for the count metric formula.
2 In the Definition pane, select Count.
3 Right-click Count and click Count parameters.
4 In the Count parameters window, on the Parameters tab, in the Fact ID
drop-down list, select a fact that forces the MicroStrategy Engine to count
from a table that establishes a relationship between the attribute you are
counting and the selected fact.
5 Set additional parameters as necessary.
6 Click OK.
7 In the Metric Editor, click Save and Close.
Advanced Functions
85
Advanced Metrics
Rank
When using the Rank function (located in the Functions and
Operators/Functions/Rank and NTile Functions folder), you specify the metric
to be ranked and whether you want to rank it in ascending or descending order.
Another parameter enables you to specify a break-by attribute.
The level of a rank metric depends on the level of the simple metric that is
being ranked. A rank metric is always a compound metric that inherits the level
of the simple metric in its definition.
For example, Rank(Revenue)<Ascending=False> combined with the
Customer attribute on a report assigns the customer with the highest revenue a
ranking of 1. Adding a parameter to break by the Year attribute assigns the
customer with the highest revenue with a ranking of 1 for each year on the
report.
You can also create a rank metric by inserting a derived metric. As with all
derived metrics, a derived rank metric is local to the report. It is not a separate
metric object that can be reused on other reports. As such, if you think that you
will likely need to use the rank metric multiple times on several different
reports, your best choice is to create it as a metric object in the Metric Editor.
Round
The Round function (located in the Functions and Operators/Plug-In
Packages/Math Functions folder) is used to round real numbers up or down
based on their decimal values into integers.
86 Advanced Functions
Advanced Metrics
For example, suppose you need to round your revenue values up (or down) to
the nearest thousand dollars. You can use the Round function in the following
metric definition:
(Round((Revenue {~+} / 1000)) * 1000)
Dividing revenue by 1,000 converts revenue values into real numbers with only
the value in thousands to the left of the decimal point. Therefore, a number like
13,985 becomes 13.985. When rounded, a number like 13.985 becomes 14. By
multiplying the rounded value of 14 by 1,000, it becomes 14,000. This metric
definition also rounds down. For example, 13,121 rounds down to 13,000.
NTile
The NTile function (located in the Functions and Operators/Functions/Rank
and NTile Functions folder) categorizes the values for a metric into a certain
number of groups, or tiles. You can specify NTile parameters, such as the
number of groups and how these groups are assigned (ascending or
descending).
For example, you may want to see which customer cities are in the top 25%, the
next 25%, and so forth based on revenue. You can perform this analysis using
the NTile function in conjunction with the Revenue metric. Because you want
the results in quartiles, you define the number of tiles as four. If you want the
top 25% of your customer cities to be in the first quartile, you set the Ascending
parameter to False.
Advanced Functions
87
Advanced Metrics
You can also specify a break-by attribute for the NTile function. For example,
selecting Customer State as a break-by attribute is useful for categorizing the
customer cities in each customer state into quartiles.
NTile Function Example
88 Advanced Functions
Advanced Metrics
The following table lists some of the available date and time functions:
Date and Time Functions
Function
Description
AddDays
AddMonths
DayOfYear
DaysBetween
MonthEndDate
MonthsBetween
MonthStartDate
YearEndDate
YearStartDate
Advanced Functions
89
Advanced Metrics
This metric uses the CurrentDate function to identify the current date provided
by the database timer. It also uses an existing metric defined as MAX(Hire
Date) to identify the hire date for any employee. When you place this metric
on a report with Employee and Hire Date, result looks like the following:
Date and Time Function Example
90 Advanced Functions
Advanced Metrics
Advanced Subtotals
After completing this topic, you will be able to:
Define custom subtotals to use different naming conventions for totals and
create user-defined subtotals that use nonstandard subtotal functions.
Custom Subtotals
By default, when you add subtotals to a report, the same subtotal function is
used for all metrics on the report. The name of the subtotal also displays in the
subtotal line items on the report. For example, if you enable the Total subtotal
to show grand totals on a report, you see the following result:
Standard Subtotal Example
Advanced Subtotals
91
Advanced Metrics
Notice how the Total subtotal applies to all three metrics on the report and the
subtotal name Total displays in the subtotal line item. If you want more
control over the characteristics of a subtotal, you can define custom subtotals.
Custom subtotals enable you to define custom subtotal line items that display
on your reports. You create custom subtotals at the report level, and you
primarily use them for display purposes. Custom subtotals enable you to do the
following:
Customize the subtotal name that displays in the subtotal line item
You can make the subtotal name dynamic by typing special characters in the
subtotal name field. The following table lists wildcard characters you can use
when naming custom subtotals:
Custom Subtotal Wildcards
Character
Description
#A
#P
The name of the attribute to the left of or above the attribute under which
the subtotal displays
#0
#1
#2
#3
#4
92 Advanced Subtotals
Advanced Metrics
The subtotals for the Movies and Music categories and the Northwest and
Southwest Regions use a special definition, Total for the #0 #P, for their
names. The custom subtotal is enabled across the Subcategory and Category
attribute levels. The Grand Total is enabled across the Region attribute level,
and it displays in the Total line item.
To create a custom subtotal:
Advanced Subtotals
93
Advanced Metrics
4 In the Custom Subtotal Properties window, in the Provide a name for the
custom subtotal box, type a name for the subtotal. (In the above example,
the first custom subtotals name is Total for the #0 #P).
5 In the list, select the appropriate subtotals you would like to use for each
metric section, select the appropriate subtotal for each metric on the report.
6 If you want the subtotals of the metrics on the report to use one subtotal,
select the subtotal you want to apply to all listed metrics under Reset all
metric subtotals to, and click Reset.
7 Click OK.
8 In the Advanced Subtotals Options window, select the custom subtotal.
9 Under Applied levels, set the levels at which you want to display the custom
subtotal and click OK.
10 In the Subtotals window, on the Definition tab, in the Available subtotals
list, the check box for your new custom subtotal is selected.
icon for a custom subtotal is different from the icon used for
The
standard subtotals.
11 In the Subtotals window, click OK.
User-Defined Subtotals
As you already know, MicroStrategy provides standard, predefined subtotals
that are available for use with any metric or report. These predefined subtotals
use simple aggregation functions, such as Count, Average, Max, and so forth, to
address the most common subtotaling requirements. If these predefined
subtotals do not satisfy your subtotaling needs, you can create user-defined
subtotals. With user-defined subtotals, you control the definition of the
subtotal. For example, you may need a subtotal that always calculates at the
Year level regardless of the level of the report.
You can create your own subtotal using any combination of the following:
Multiple functions
94 Advanced Subtotals
Nested functions
Dimensional subtotals
Other metrics
Advanced Metrics
Advanced Subtotals
95
Advanced Metrics
In this example, the user-defined subtotal uses the Last function. Its Sort By
parameters list the Category and Quarter attributes, sorted in ascending order
by ID. The subtotal is enabled at the Quarter level.
To create a user-defined subtotal:
96 Advanced Subtotals
Advanced Metrics
16 Click Advanced.
17 In the Advanced Subtotals Options window, set the levels at which you want
to display the user-defined subtotal.
18 Click OK.
19 In the Subtotals window, click OK.
20 In the Report Editor, click Save and Close.
additional information on custom subtotals and user-defined
For
subtotals, see the Advanced Reporting Guide product manual.
Advanced Subtotals
97
Advanced Metrics
Lesson Summary
In this lesson, you learned the following:
Defining the level (or dimensionality) of a metric enables you to control the
attribute level at which the metric calculates.
By default, all metrics calculate at the lowest attribute level of the report
template. This is called report level.
When you define a level metric, you specify a target, Grouping of Standard
or None, and Filtering of Standard, Absolute, Ignore, or None.
The Grouping options dictate how the level metric aggregates. (That is,
whether or not the metric aggregates at the attribute level specified as the
target.)
The Filtering options dictate how the reports filter interacts with the level
metric calculation.
Base formulas are simple metric formulas that are saved as separate objects
that you can reuse to create new metrics.
You can control how conditional metrics interact with report filters with the
Remove related report filter elements option.
98 Lesson Summary
Advanced Metrics
MicroStrategy offers over 200 built-in functions that you can use to create
metrics.
When you create a count metric, you should carefully consider if the count
should take place against a lookup table or a fact table. You can specify this
in the Count parameters.
You can create custom subtotals to control the display of subtotals on your
reports. You define custom subtotals at the report level.
Lesson Summary
99
Advanced Metrics
99
From the Comedy subcategory: Ferris Buellers Day Off, The Wedding
Singer
However, you only want the items on this report to be included in the metric
calculations.
Solution:
1 Create two level metrics:
Category Sales
Definition: Sum(Revenue)
this metric, and all subsequent level metrics, be sure to use the
For
Revenue fact (not the Revenue metric) in the formula.
Level: Category
Filtering: Standard
Grouping: Standard
Subcategory Sales
Definition: Sum(Revenue)
Level: Subcategory
Filtering: Standard
Grouping: Standard
Apollo 13, Lethal Weapon 4, Ferris Buellers Day Off, The Wedding
Singer, Titanic
101
5 After viewing the results of your report, note what each metric is
calculating.
______________________________________
______________________________________
Solution:
1 Create two level metrics:
103
Solution:
1 Create a Subcategory & All Time Sales level metric:
Definition: Sum(Revenue)
Filtering:
Subcategory: Absolute
Day: Ignore
Grouping:
Subcategory: Standard
Day: None
Non-aggregatable Metrics
The report below shows the ending inventory for the last month of the most
recent year captured in the data warehouse. When you have achieved this
report, verify that the last month is being displayed by drilling to Month.
Solution:
1 Create an Inventory EOH non-aggregatable metric:
Level: Month
Filtering: Standard
Grouping: Ending(Fact)
105
3 To verify that the last month of the most recent year is the one shown on the
report and that the values for each month were not summed to get the year
inventory figure, select the first item on the report and drill across to
Month. The drilled result set displays all months and only the last month of
the year shows the same value as the year inventory in the original report.
Transformation Metrics
You want to compare this years revenue to last years revenue for various
items. Create the report shown below using a transformation metric:
Solution:
1 Create a Last Years Revenue transformation metric:
Definition: Sum(Revenue)
107
Solution:
1 Create a profit metric with conditionality based on the Western United
States Customers filter. This filter is located in the Public
Objects/Filters/Customer Analysis Filters folder. Be sure to use the Profit
fact in the metrics formula. Name this metric West US Customer Profit.
2 Create a second profit metric with conditionality based on the Eastern
United States Customers filter. This filter is also located in the Public
Objects/Filters/Customer Analysis Filters folder. Again, use the Profit fact
in the metrics formula. Name this metric East US Customer Profit.
3 Create a third metric called Ratio of West to East, defined as West US
Customer Profit / East US Customer Profit. Format the values for this
metric as percentages (displaying 2 decimals as shown above).
4 Create a report with Year, the three metrics you just created, and an
Electronics category report filter condition.
This report demonstrates the flexibility and usefulness of conditional metrics.
The East US Customer Profit metric and the West US Customer Profit metric
each apply their own specific filtering conditions, enabling you to display
figures for different geographical groups on the same report.
1 Does the Electronics category report filter apply to the East US Customer
Profit and West US Customer Profit conditional metrics? Why or why not?
_______________________________________
_______________________________________
109
Did the East US Customer Profit values change? Why or why not?
_______________________________________
_______________________________________
7 Use the Save As option to save the report as a new report to the My
Reports folder.
Count Metrics
Overview
Create a report that returns the number of items that were sold by Region and
Category for the year 2010. The first few rows of your report should resemble
the following:
Solution:
1 Create a Count Item metric:
Definition: Count(Item)
this metric, use the Item attribute (not the Item metric) in the
For
formula.
Count parameters:
Distinct = False
FactID = Item-level Units Sold
Null = False
UseLookupForAttributes = True
access the count parameters, highlight the Count function in the
Tometric
definition, right-click, and select Count parameters.
Alternately, you can access the parameters through the Insert
Function Wizard.
2 Create a report with Category, Region, Count Item, and a report filter for
the year 2010.
3 Run the report. Compare your results to the expected report in the
Overview section at the beginning of this exercise.
4 Now, change the FactID count parameter to Nothing. How does your report
change?
111
Solution:
1 Create a RunningSum of Revenue metric, defined as
RunningSum(Revenue).
113
Solution:
1 Open the RunningSum of Revenue metric with the Metric Editor and for
the of the RunningSum function, add Year as the Break By attribute.
2 Re-execute the report to see the change in the metric behavior.
Revenue by month
Percentage of revenue for each month to the total for all years (all time) in
the data warehouse
115
The first few rows of your final report should look as follows:
Advanced sorting
Report filter of Units Sold > 25,000 and Category=Books, Movies, or Music
117
In step 4, to analyze the same items and see how each item contributed to
the total sales, set the Target to Subcategory, Filtering to Ignore, and
Grouping to Standard.
In step 5, the East US Customer Profit value changes because the filter is
ignored when you remove the related filter elements.
Count Metrics
In step 4, when you change the FactID count parameter to nothing, the
Count Item metric displays a value of 90 for all regions
3
ADVANCED FILTERS
Lesson Description
This lesson builds on your knowledge of basic filters and introduces you to
several types of advanced filters that you can use to answer more complex
business questions. You will learn about attribute-to-attribute comparison
filters, joint element lists, pass-through functions in filters, metric-to-metric
comparison filters, relationship filters, and more. The exercises give you
hands-on practice in creating and employing advanced filters in reports.
117
Advanced Filters
Lesson Objectives
After completing this lesson, you will be able to:
Create several types of advanced filters.
After completing the topics in this lesson, you will be able to:
List and define the methods for metric qualification. Describe the concepts
of Output Level and Break By. Create metric comparison
filters. (Page 133)
Advanced Filters
Attribute-to-Attribute Filtering
After completing this topic, you will be able to:
Describe attribute-to-attribute filtering and create attribute-to-attribute
comparison filters.
Attribute-to-Attribute Filtering
119
Advanced Filters
Advanced Filters
121
Advanced Filters
4 Under Joint element list, select the desired attributes from the list of
Available attributes and click > to move them to the list of Selected
attributes.
5 Under Element list, click the Add button (the cube icon) to add element
lists of the selected attributes.
6 To modify element lists, click the Modify button under the Add button.
7 In the Select Element List window, under Available Elements, select the
attribute whose element you want to modify from the drop-down list. Add
the desired element to the Selected Elements list.
8 Click OK.
9 To add another element list, repeat steps 5 to 8.
Advanced Filters
123
Advanced Filters
Dynamic Dates
After completing this topic, you will be able to:
Use dynamic dates in filters.
Dynamic dates are a fixed set of dates or ranges of dates that change over
time. These dates are fixed offsets of the current date according to the system
clock of the Intelligence Server machine.
working in a 2-tier environment, dynamic dates are based
Ifonyouthearesystem
clock of the client machine that runs Desktop.
For example, a dynamic date enables you to run a report that always
examines sales from two months ago. This is represented as today minus 2
months. Dynamic date qualifications can be as specific as any of the following
examples:
Advanced Filters
The Date Editor offers the choice of a static date or various types of dynamic
dates:
Today
This Week
This Month
This Year
Each of these choices have several options for the starting point and enable
you to add or subtract days, weeks, months, or years.
At the bottom of the editor is a preview section that shows to which date a
dynamic date resolves based on the current system clock.
To create a filter with dynamic dates:
Dynamic Dates
125
Advanced Filters
7 Using the dynamic date options, specify the date criteria appropriate for
your report. The Preview box displays the results of the dynamic date. Use
this to confirm that the dynamic date resolves correctly.
Order of Evaluation
When evaluating a dynamic date such as first of this month minus 7 days,
the order in which these two parts of the filter are evaluated is important. The
addition or subtraction of days, weeks, months, or years is always done first,
before first of this month, this week, this year, and so on, is calculated.
For example:
If today is February 13th, then Today minus 7 days is February 6th, and
the first of the month of today minus 7 days is February 1st.
Advanced Filters
You can import filter elements into the Filter Editor from sources other than
MicroStrategy. In the MicroStrategy Desktop: Reporting Essentials course,
you learned that filters can be based on other existing filters and reports. The
import filter elements option adds even more flexibility to the Filter Editor by
enabling you to import lists of data from existing files into the filter
definition. Existing filter definitions can also be exported to an external file.
can use a prompt to enable users to select the file from which to
You
import at run-time.
At times, importing elements into a filter may be a quicker alternative to
selecting each individual element. Imagine a report where you need to filter
on hundreds of customer last names. Rather than having to add each last
name one-by-one, you can import a list of last names from a file in one, quick
and easy step.
To import elements into a filter, the elements need to be stored in a Microsoft
Excel or text file. The following rules apply when importing elements from
source files:
1 Microsoft Excel: Data can be stored in rows, columns, or both.
If it does not fall under either of the first two bullets, it is checked to
determine if it is a number. If so, it is imported as is.
If it does not fall under either of the first two bullets, it is checked to
determine if it is a date. If so, it is imported by adding single quotes at
the beginning and end to comply with the date format.
127
Advanced Filters
2 Text
Tab-delimited
Return-delimited
Advanced Filters
Pass-through Functions
After completing this topic, you will be able to:
Understand how pass-through functions can be used to take advantage of the
capabilities of the database server.
Pass-through Functions
Pass-through functions are intended to provide access to the special
functions or syntactic constructs that are not standard in MicroStrategy but
are provided by various RDBMS platforms.
A specialized Apply function represents each type of custom
subexpression/function call. There are five, predefined Apply functions used
to replace regular, predefined functions of the same type:
ApplyLogic: Uses logical operators (not, and, or, and so forth). This
function is used primarily for defining filters.
The purpose of all of the pass-through functions in Desktop is to give you the
flexibility to bypass the MicroStrategy parser and send database-specific
syntax to the database server. They can be used in many different capacities,
including to create or modify both schema and application objects. That said,
remember that MicroStrategy also provides many functions and operators
that serve the same purposes as pass-through functions. In a reporting
scenario where you can choose between using a pass-through function or
MicroStrategy function to achieve the same result, you might want to test
both methods to see which one returns the result set more efficiently.
Pass-through Functions
129
Advanced Filters
For example:
ApplyComparison(ComparisonFunction (#0, #1),
attribute1@ID, attribute2@ID)
placeholders in this example are represented by #0 and #1. The
The
placeholders reference the attributes when the expression is
processed. # is a reserved character in MicroStrategy, and n is the
number of the parameter outside the quotes, starting with 0 and
increasing in increments of 1.
Advanced Filters
ApplyComparison("#0=trunc(sysdate-1)",Day@ID)
OR
ApplySimple("Mid(#0,5,2)",Month@ID) = 12
example above assumes that the date is stored in a
The
YYYYMMDD format.
Filter Examples
You can use pass-through functions to define several types of MicroStrategy
objects, including filters, metrics, and attribute forms. Here are some
examples of how pass-through functions can aid in the creation of specialized
filters.
examples of pass-through functions in metrics and other objects,
For
refer to the Analytical Functions Reference product manual.
Example 1: Dynamic Date
As discussed earlier in this lesson, MicroStrategy enables you to create
dynamic date filters based on the system clock. You can also accomplish this
by using ApplySimple and allowing your database server to handle the
calculation.
To create a filter for current month using ApplySimple and a Microsoft SQL
Server databaseTM:
Pass-through Functions
131
Advanced Filters
The above expression uses ApplySimple to let Intelligence Server know that it
needs to pass the datepart function directly to the SQL Server database.
ApplySimple (like all Apply functions) takes two parameters:
ApplySimple(x,y). X is the function passed to the database server. Y
is a MicroStrategy object that you want to pass to the function, x.
Example 1, MicroStrategy objects are not used, so y is set to zero. In
InExample
2, starting on the next page, you will see an example of a
database function that uses a MicroStrategy object.
Example 2: Filtering on Null Values
Suppose you need to filter a result set to show only information associated
with null values. One method is to use the IsNull function, found in the
Functions and Operators folder. Another method is to use ApplyComparison
followed by the native database expression for checking for null values.
To create a filter that only returns rows with null values, using
ApplyComparison and a SQL Server database:
Advanced Filters
RankThe numeric rank of values. For example, rank top 40 returns the
40 highest values for the selected metric.
When you use a metric qualification filter in a report, you can choose to
qualify on any metric, not just the metrics on the report template.
Output Level
Metric qualifiers restrict the amount of data returned on a report by applying
some type of condition to a metric. The output level of the metric qualifier is
the set of attributes at which you want the metric to evaluate.
An example of a metric qualification with an output level of Month follows:
Revenue > 1000, Output Level: Month
The metric qualification limits the result set to the months that have sales
greater than $1,000. In other words, your filter qualification identifies the set
of months that have more than $1,000 in sales.
If an attribute other than Month, for example Day, is on the report, it shows
only those days in the months with $1,000 or more in sales. Note that this is
not the same as days that have $1,000 or more in sales.
133
Advanced Filters
When you define output level in a metric qualification filter, you can choose
from the following options:
None selected: This is the default setting. If this option is selected, the
results are calculated at the report level if the metric is a compound metric
or its dimensionality is set to report level or nothing. Otherwise, the
metric's dimensionality is used.
Set Output Level
Calculate the output at the Metric level: Metric level means that the
output level is defined by the level, or dimensionality, of the metric itself,
regardless of the level of the report. The qualification follows the metrics
level of calculation.
Calculate the output at the Report level: This setting looks to the lowest
level of the attributes that appear on the report template. Looking back to
one of the previous examples, if Year and Day are on a report, the filter
restricts the data to the set of days (because Day is at a lower level than
Year) with revenue greater than $1,000. As another example, if Item and
Day are on the report, the result set returns the items with revenue
greater than $1,000 on a given day (the intersection of the two unrelated
attributesItem and Day).
Advanced Filters
Calculate the output for the list of attributes: With this setting, you can
select the attribute (or attributes) at which the qualification should
evaluate.
Break By
Break By enables you to choose the attribute level at which to restart the rank
or percentage for a metric. This level must be greater than or equal to the
level of aggregation of the metric.
A metric qualification filter that ranks the top 2 items by Units Sold returns
only those two items, as shown below:
Without Break By Example
135
Advanced Filters
Notice how the break by Category forces the rank to restart for every
Category. Your result set returns the top 2 items by Units Sold for each
Category in the data warehouse, not just the top 2 items across all Categories.
Metric-to-Metric Comparison
Metric-to-metric comparison enables you to create reports that compare the
values of two metrics. For example, you can create a report that returns only
those records with Revenue greater than Last Year Revenue.
To create a metric-to-metric qualification filter:
Advanced Filters
137
Advanced Filters
Advanced Filters
Relationship Filter
As mentioned earlier, a relationship filter is a filter that can be used to define
a specific type of relationship between two or more attributes that are
otherwise not directly related.
a technical perspective, a relationship filter is nothing more than
From
a nested SQL subquery in the WHERE clause of a SQL pass. The
MicroStrategy Engine Essentials course teaches you about the SQL
behind relationship filters in detail.
139
Advanced Filters
The image below shows the Filter Editor as it displays when you create a
relationship filter. Notice that the Set Qualification Type is Relationship and
that there are additional options for specifying the Output Level, a Filter
Qualification, and a Relate By option.
Set Qualification - Relationship Filter
The relation (or Relate by) is defined through a fact, a table, or the system
default. When you select the Use System Default option, the
MicroStrategy Engine picks a table based on the project schema.
However, most often, you should select a specific fact or table that you
know establishes the relationship between the output level(s) and the
filter qualification. From a SQL perspective, the fact or table you define as
the relation impacts the FROM clause of the SQL query that
corresponds to the relationship filter.
Advanced Filters
141
Advanced Filters
Advanced Filters
Notice how the amount of revenue associated with each customer depicts
their overall revenue, not just for the two books that they purchased. In this
case, by clearing the advanced option in both relationship filters, you have
indicated that you do not want the filtering qualifications in the relationship
filters to be applied to the final report result.
143
Advanced Filters
If you edit the definition of one of the relationship filters (in the below case,
the To Kill a Mockingbird relationship filter) and select the advanced option,
you retrieve the following result set:
Relationship Filter - Advanced Option Selected for To Kill a Mockingbird
Notice that the report returns much smaller revenue numbers. The revenue
figures represent the sales for each customer for just that one book, To Kill a
Mockingbird. In this case, the filtering qualification in the To Kill a
Mockingbird relationship filter is also applied to the final report result.
A fact, then you can generally use either type of filter (As in the
example of items related to each other through the Revenue fact and
the customer who purchased those items).
Advanced Filters
145
Advanced Filters
Lesson Summary
In this lesson, you learned about the following:
A dynamic date filter is a fixed set of dates or ranges of dates that change
over time, based on the system clock of the Intelligence Server machine.
You can import filter elements into the Filter Editor from external
sources, like Microsoft Excel and text files.
When you define any type of set qualification filter (metric qualification
or relationship filter), you need to define the Output Level. The Output
Level determines the attribute level at which the set qualification applies.
Break By enables you to choose the attribute level at which to restart the
rank or percentage for a metric.
Solution:
1 Create a report that contains the attributes and metrics shown above.
2 Define the local report filter as Month = November 2010 and Category
= Books and (Ship Date_ID < [Day_ID + 4]).
147
Qualify on ID.
Select Custom.
Drag and drop the Day Attribute into the text box to the right of
Custom. Type + 4 after Day@ID. The filter definition should look like
the following:
1 Create this report with a single, simple filter with January, June, and
September AND Books, Movies, and Music. Explain why this does not
yield the result you want.
_______________________________________
_______________________________________
Click the Add button (cube icon) to the right of the element list
window three times. An attribute element from both attributes
displays in the Element list window three times.
Select the elements and click the Modify button, which is below the
Add button. Change the element pairs to Movies and June and Music
and September.
149
3 Create the following report by importing the filter elements from the
Promotions.txt file you just created.
Solution:
1 Create a filter called Import Customers. Begin the attribute qualification
by selecting Customer as the attribute on which to qualify.
Click the Import button. Browse to the text file created earlier in this
exercise. Select it and click Open. Click OK.
Use this filter on a report with Customer and Revenue on the template.
Dynamic Dates
Dynamic Dates: Month-to-date Sales
Create a report that gives the revenue of each Subcategory for the time period
between the first of this month two years ago and the current date minus two
years.
exercise requires you to subtract two years for each dynamic date
This
qualification because the Tutorial data warehouse only contains data
for the years 2008, 2009, 2010 and 2011. Your results for this exercise
will vary from the example report shown below since you will qualify
on a different current system date. The report below was executed
with a date of September 15, 2011 as the current system date.
.
Solution:
1 Create a filter called Dynamic Date with a definition of Day Between
First of this Month minus two years and today minus two years.
Begin the attribute qualification by selecting Day as the attribute on
which to qualify.
Qualify on ID.
151
Click the Date Editor button to the right of the beginning date box.
Select the following options: Dynamic Date, Today minus 24
months, Choose date adjustments based on the view point,
Monthly, and Day 1. Check that the Preview box lists the current days
date and the dynamic date is resolved to the first day of the current
month two years ago. Click OK.
Click the Date Editor button to the right of the ending date box. Select
the following options: Dynamic Date and Today minus 24 months.
Check that the Preview box lists the current date and the dynamic date
resolves to todays date two years ago. Click OK.
Pass-through Functions
ApplyComparison: Compare Attribute Elements
Most of your customers are not based in the same area as the call centers
from which they purchase their goods. You have recently begun a new
initiative to advertise locally to try to increase the customer base in the towns
where your call centers are located. Create a report that shows the number of
customers who reside in the same city as the call center from which they
purchase goods and those who reside in a different city from the call center
from which they purchase goods.
Solution:
1 Use the ApplyComparison function in a filter with the following syntax:
ApplyComparison ("#0 = #1", [Customer City]@DESC,
[Call Center]@DESC)
2 Use the ApplyComparison function in another filter with the following
syntax:
ApplyComparison ("#0 <>#1", [Customer City]@DESC,
[Call Center]@DESC)
3 Create a metric to count Customers and apply the filter created in step 1.
need to set certain parameters of the count metric to return
You
the desired results. First, make sure that the count function only
counts distinct customers. Also, since you need to count the
number of customers that actually generated revenue, you need to
specify Revenue as the FactID.
4 Create a second metric to count the customers and apply the filter created
in step 2.
this second metric with the same count parameters
Define
described in the note above.
5 Create a report with Customer Region and the two count metrics and save
it as Local Customer Campaign.
6 Based on the report results, would you conclude that the advertising
initiative is working?
_______________________________________
_______________________________________
153
1 Create a report that determines the top two sales without adjusting the
Output Level. Why doesnt this report result satisfy your requirements?
_______________________________________
_______________________________________
2 What should the Output Level be?
_______________________________________
_______________________________________
Solution:
1 Create a new report named Top 2 Categories with a template exactly like
the one shown at the beginning of this exercise.
2 Create a filter with a definition of Rank: Top 2 Categories by Revenue.
Begin the set qualification by selecting a Set Qualification type of Metric.
Select Value.
Set QualificationBreak by
You want to reward your top sales representatives in each Region. To do this,
you need a list of the top sales representative per Region, not the top sales
representatives in the company overall.
Solution:
1 Create a filter with a definition of Rank: Top Employee per Region.
Begin the set qualification by selecting a Set Qualification type of Metric.
Select Value.
155
2 Create a new report named Top Employee per Region with a template
exactly like the one shown at the beginning of this exercise. Add the filter
created in step 1.
Relationship Filter
You want to create a report to retrieve a list of customers who bought both
The Old Man and the Sea and To Kill a Mockingbird. You also want to see the
overall revenue for each of these customers.
Solution:
1 Create a relationship filter, called REL - The Old Man and the Sea,
defined as follows:
can create a new filter for the filter qualification directly within
You
the Set Qualification window. Simply click the Create button that
displays in the Filter Qualification section of the window and
follow the steps to define an attribute qualification filter for The
Old Man and the Sea item.
you can create the filter for this item directly within the
Again,
Filter Qualification section of the Set Qualification window.
3 Create a new report with a template exactly like the one shown at the
beginning of this exercise.
4 Drag and drop both relationship filters into the filter definition pane.
Leave the default set operator of AND.
5 Save the report to the My Reports folder as List of Customers Who
Purchased Specific Classics.
157
Demographic Analysis
The business analysts at your company want to study the sales patterns of
certain demographic groups but only for those groups who live in five, large
urban cities and only for 2 months of the year. You need to create a report
that displays a combination of customer ages with particular income ranges
and the profit that corresponds to each group. Only show the profit for these
groups in September and October and for those who live in the following five
cities: New York, Boston, Los Angeles, San Francisco, and Chicago.
Report Requirements:
Use a joint element list that groups Customer Age and Income Bracket
in the following combinations:
21:<$20K, 26:$40-50K, 36:$50-60K, 46:$60-70K, 56:$70-80K
Use set qualification on the Units Sold metric to return the bottom 5% of
Items within each Category (this requires manipulating the Break By)
Advanced sorting
Page-by
159
When you choose to view the Books category, your final report results
should look like the following:
Create a relationship filter that returns the orders in which a selected item
was sold. (This should be a prompted attribute qualification filter on
Item.)
Use the relationship filter for the final report, which contains Category,
Item, Revenue, and Units Sold.
If you select The Beatles Anthology item at report run-time, your final
report results should resemble the following result set:
161
In step 1, when you initially create a simple, single filter, the report data
set returns the incorrect months and categories. For example, it returns
Movies and Music in January, but you only want Books in January.
In step 3, when you create a joint element list you create requirements
that limit the data output solely to the data you want to see returned on
the report.
In step 6, based on the report results, you can conclude that the
advertising initiative is not working.
In step 1, without adjusting the Output Level, the results do not satisfy
your requirements because the results reflect the top 2 of all revenue
generating items at the Subcategory level.
4
CONSOLIDATIONS AND
CUSTOM GROUPS
Lesson Description
Consolidations and custom groups are two special reporting features that
enable you to surpass basic reporting functionality. With consolidations, you
can group attribute elements to define virtual attributes that enable you to
analyze data at levels that are not inherently available in the business model.
With custom groups, you can create reports that qualify on a row-by-row basis,
greatly enhancing the flexibility of report design and the capabilities of
report-level qualifications.
In this lesson, you will learn the significance of consolidations and custom
groups as well as how to create them. This lesson builds on your knowledge of
basic filter concepts and your understanding of attributes and attribute
elements.
163
Lesson Objectives
After completing this lesson, you will be able to:
Create consolidations and custom groups and determine the appropriate use
of both objects.
After completing the topics in this lesson, you will be able to:
Explain the significance of custom groups and use the Custom Group
Editor to create them. (Page 172)
Consolidations
After completing this topic, you will be able to:
Explain the significance of consolidations and use the Consolidation Editor to
create them.
Consolidations
165
What Is a Consolidation?
Consolidations enable you to group attribute elements together and place
these groupings on a template, just like an attribute. The elements of the
consolidation appear as rows in your report results.
For example, for the seasonal analysis business scenario, you want to see
each season as a separate row on a report, but Season does not exist as an
attribute in your project. A consolidation enables you to group together the
attribute elements of the Month of Year attribute to define the various
seasons, which you can then place on a template. This consolidation contains
four consolidation elements, one for each season.
You define the Summer consolidation element as June + July + August.
The Fall consolidation element is defined as September + October +
November, and so forth. You place the Seasons consolidation in the rows of
your template with any desired metrics in the columns. When you run the
report, the metric values for June, July, and August are added together to
yield the value for Summer. This occurs for each season.
166 Consolidations
Consolidations provide two powerful functions that can help satisfy unique
reporting needs. These two functions are:
Consolidations
167
In the above report, every row of data is a mathematical operation of its own.
The first four rows perform simple addition of the Month of Year attribute
elements. The final rows divide two consolidation elements. The Seasons
consolidation includes row-level math to make this report possible.
Consolidation Elements
Just as each attribute is made up of one or more attribute elements, each
consolidation is made up of one or more consolidation elements. One or
more attribute elements are often combined with mathematical operators to
define a consolidation element. Consolidation elements appear as rows in
your report results. Consolidation elements can contain any of the following:
Existing consolidation elements (such as the ratio of Fall and Spring sales
or Winter and Summer sales)
168 Consolidations
Consolidation Editor
Creating a consolidation involves using the Consolidation Editor to define the
various consolidation elements:
Consolidation Editor
The Consolidation Editor enables you to select attribute elements from any of
the hierarchies found in the Data Explorer.
Consolidations
169
170 Consolidations
Consolidations
171
Custom Groups
After completing this topic, you will be able to:
Explain the significance of custom groups and use the Custom Group Editor
to create them.
Custom Groups
173
Note how similar the Custom Group Editor is to the Filter Editor. This is not
surprising because custom groups are very closely related to filters. A custom
group enables you to apply different filter qualifications to each row of a
report.
A name (or header): This name is displayed as a row in the report results
and can be modified as desired. For example, you could create a custom
group with two custom group elements. The first custom group element
name could be Top 10 Customers and the second could be Bottom 5
Items.
Custom Group element header (used to name the custom group element)
The advanced qualification is not displayed by default. You can enable this
option by following the steps below:
To display the Advanced Qualification option in the Custom Group Editor:
Custom Groups
175
Show only the individual items within this element and also expand these
individual items if possible
Show the element names, individual items within this element and also,
expand these individual items if possible
The flexibility in display options enables you to show both summary and
detailed views of data on the same report.
To change the display option for a custom group element:
You can also specify how you want to display the custom group as a whole (in
hierarchical or flat display) and whether or not to show subtotals.
1 In the Custom Group Editor, on the Custom Groups menu, select
Options.
Custom Groups
177
Custom Groups
179
After selecting a metric on which to band, you can choose to perform the
banding according to metric value, rank, or percent. Banding options include
Band Size, Band Count, Banding Points, and Band for each distinct metric
value.
Custom Group Banding Definition
Band Count enables you to define a number of equal-sized bands that will
slice through a specified range of metric values.
Band for each distinct metric value enables you to create a separate band
for each value calculated by the metric. The bands appear as rows on a
report. This type of banding qualification directly uses the results of a
metric as bands. It is very useful when used 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. If you use this metric to define the custom group, the
elements are also sliced into three bands as shown below:
Example - Band for Each Distinct Metric Value
Custom Groups
181
The report could have been created using any of the banding options
described earlier. In this case, the band size method (Start at: $1, Stop at:
$4000, Step size: 400) was used:
Custom Group Editor - Band Size
To create the same report using the band count option, you would use the
same starting and stopping points with a band count of 10 (for the 10 bands
you see above). With the banding points option, the banding points would be
as follows: 1, 401, 801, 1201, 1601, 2001, 2401, 2801, 3201, 3601, 4000.
Custom Groups
183
Custom Groups
Differences
Usage
Examples
Keep in mind that custom groups offer added flexibility because you do not
have to know much about your data to create the filter qualifications that
define each custom group element of the custom group. You set up the Top 10
Customers custom group element like you would any filter. By contrast,
consolidations require that you know exactly which attribute elements to
group to define the consolidation elements of the consolidation.
Lesson Summary
In this lesson, you learned the following:
Custom groups are objects that you can place on a report template. They
are made up of custom group elements, each defined with its own set of
filter qualifications.
You can define a custom group element with any type of filter
qualification (attribute, set, shortcut-to-a-report, shortcut-to-a-filter,
custom group banding, and advanced).
You can control the formatting of each custom group element through the
Show Display Options window.
Custom group banding enables you to slice your data into multiple
ranges, or bands, based on metric values.
There are four custom group banding options: band size, band count,
banding points, and Band for each distinct metric value.
Lesson Summary
185
Solution:
1 Create a consolidation named US Customer Geography. Define the
following consolidation elements:
185
Solution:
1 Create a new consolidation. For the first four consolidation elements,
import the consolidation elements from the US Customer Geography
consolidation created in the previous exercise. Then, add the following
consolidation elements:
2 Create a report using the new consolidation and the Revenue, Units Sold,
and Profit metrics.
Custom GroupsTop 5
Suppose you are the business intelligence engineer at a large retail company.
The Director of Customer Sales submits a report request to identify the top
five customers, items, and employees in terms of Revenue. She would like to
see Revenue and Units Sold for these top five customers, products, and
employees. Instead of three separate reports, she asks for a single report with
all of the data.
The report should look like the one below:
Solution:
1 Create a custom group with three custom group elements that rank on
Revenue:
Top 5 Customers
Top 5 Items
Top 5 Employees
2 Set the display option for each custom group element to Show the
element names, individual items within this element and also,
expand these individual Items if possible.
3 Create a report using the custom group you just created, Revenue, and
Units Sold.
187
Customer Banding
You need to analyze the Revenue for Customers that fall into the following
groups: top 10 percent by Revenue, the next 40 percent, and the bottom 50
percent. You want to see the figures for all groups on the same report. The
finished report should look like the following:
Solution:
You can create this report by creating a custom group with four custom group
elements, each representing the four rows of the above report. However, the
Custom Group Editor enables you to create this more conveniently with
custom group banding.
1 In the Custom Group Editor, under Custom Group definition,
double-click Double-click here.
2 Name the custom group element All Customers.
3 Double-click Add Qualification.
4 Under Custom Group Options, select Add a Custom Group Banding
qualification and click OK.
5 Under Choose a metric, beside the Metric box, click Browse.
6 In the Open window, browse through the folders and select Revenue.
7 In the Band on drop-down list, select Percent.
8 In the Banding type drop-down list, select Banding Points
9 For Banding points, enter the following band names and their points.
10 Click Level.
11 In the Level window, select the Customer attribute and click OK.
12 Click OK.
13 Create a report with the custom group you created above and the Revenue
metric.
189
Brand Comparisons
The Marketing department of your company is looking to create a new
promotion for the Movie subcategory. Business analysts are curious to see
the past sales performance for a collection of movies grouped by Brand.
Specifically, they need to know what movies are selling morethose with
classic actors (like Gregory Peck and Paul Newman) or those with current
actors (like Tom Hanks and Tom Cruise). Create a report that displays
Revenue and Units Sold for these two Brand groups. This report should also
display the difference in Revenue and Units Sold between the two Brand
groups.
Report Requirements:
Current Actors include Tom Hanks, Tom Cruise, Nicolas Cage, Mike
Myers, Leonardo Di Caprio and Mel Gibson.
Current Actors - Classic Actors would provide you with the difference
between the two Brand groups.
191
5
ADVANCED OLAP SERVICES
Lesson Description
This lesson describes the functionality of MicroStrategy OLAP Services. As an
extension of Intelligence Server, OLAP Services uses Intelligent Cube
Technology, an in-memory version of report data that can be manipulated by
the MicroStrategy Analytical Engine. Desktop, MicroStrategy Web, and
MicroStrategy Office users can slice and dice data in reports within the
Intelligent Cubes without having to re-execute SQL against the data
warehouse.
193
Lesson Objectives
After completing this lesson, you will be able to:
Explain the concept of Intelligent Cubes. Create Intelligent Cube reports that
share Intelligent Cube caches. Understand how view filters and dynamic
aggregation work while adding and moving objects from the grid to the
Report Objects pane.
After completing the topics in this lesson, you will be able to:
Intelligent Cubes
After completing this topic, you will be able to:
Understand the concept of Intelligent Cubes.
Intelligent Cubes
195
The abstraction that Intelligent Cubes provide between your data warehouse
and reports can improve the performance of your business intelligence
application. Reports that connect to an Intelligent Cube can perform
reporting and analysis manipulations within the Intelligent Cube without
hitting the data warehouse. These manipulations are executed much faster
than running a new query against a data warehouse.
Intelligent Cubes help to limit the amount of processing done in the data
warehouse and improve performance. A user working on a report that
connects to an Intelligent Cube can be restricted to add attributes to the
report grid, only if the attributes are included in the Intelligent Cube.
can enable Relational Online Analytic Processing (ROLAP) by
You
drilling into the full set of data outside of the Intelligent Cube. For
more information see Enabling ROLAP Drilling for Reports
Accessing Intelligent Cubes starting on page 202.
197
Since Intelligent Cubes are used simply to share a set of data, no data or
report results are displayed when you execute an Intelligent Cube. However,
executing an Intelligent Cube publishes the Intelligent Cube, which can then
be accessed as a set of data for multiple reports.
Publish the Intelligent Cube
1 In Desktop, on the File menu select New, and then Intelligent Cube.
2 Select Empty Intelligent Cube and click OK.
3 In the Report Editor, add objects such as attributes, metrics, and so on for
the Intelligent Cube, the same way you would add report objects.
can also create an Intelligent Cube that contains data from an
You
MDX cube integrated into MicroStrategy from an MDX source,
such as SAP BI, Hyperion Essbase, or Microsoft Analysis Services.
For information on integrating MDX sources into MicroStrategy,
see the MDX Cube Reporting Guide.
4 Create a filter for the Intelligent Cube as needed.
you create a filter on an Intelligent Cube, any data that is
Ifrestricted
from the Intelligent Cube is not available for any reports
that connect to the Intelligent Cube. This helps reduce the size of
the Intelligent Cube.
199
5 Click Save and close to save the Intelligent Cube and close the Report
Editor.
6 In Desktop, right-click on the report and click Run.
The following list of objects and features cannot be included in the definition
of Intelligent Cubes as they can be for reports:
Throughput Level
Optimum (Recommended)
Acceptable
Sub-optimal (Not Recommended)
201
Reports that access an Intelligent Cube can be granted full ROLAP access to
the data warehouse through drilling. This means that you can enable drilling
outside of the Intelligent Cube to access the full set of data available in the
data warehouse.
While this extends the analysis and data access capabilities of reports that
access Intelligent Cubes, drilling outside of an Intelligent Cube can require an
additional load on the Intelligence Server and data warehouse. This is
because drilling outside of an Intelligent Cube requires a new report to be
executed against the data warehouse.
The decision to enable or disable drilling outside of an Intelligent Cube
depends on a few factors. You should consider the size and complexity of
your Intelligent Cubes when deciding whether to enable drilling outside of an
Intelligent Cube. While enabling drilling outside of relatively small
Intelligent Cubes can give the benefit of ROLAP analysis through drilling,
enabling this analysis on relatively large Intelligent Cubes has the potential to
cause increased load on your data warehouse and Intelligence Server.
By enabling drilling outside of an Intelligent Cube, reports that access the
Intelligent Cube have ROLAP access to data through drilling. For example, an
Intelligent Cube includes Year but not Quarter. A report accessing the
Intelligent Cube includes Year and drilling outside of the Intelligent Cube is
enabled. On the report, you drill down from Year to Quarter. This causes a
new report to be created and executed against the data warehouse. The
benefit of enabling this extra analysis can come with a performance cost.
203
When this drilled-to report is created, only objects that were on the report
layout of the report you drilled from are included in the drilled-to report. Any
objects that are only in the Report Objects pane of the report you drilled from
are not included in the drilled-to report. This can help reduce the size of the
drilled-to report. However, if you are drilling from a report that accesses a
large Intelligent Cube, it is possible that a user could include all objects of an
Intelligent Cube on a report. Drilling outside of the Intelligent Cube on such a
report could cause extra load on the data warehouse and the Intelligence
Server.
To enable or disable drilling outside of an Intelligent Cube for reports
accessing a specific Intelligent Cube:
205
5 Click OK.
6 You must re-publish the Intelligent Cubes, to make your changes
available for reports accessing the Intelligent Cubes.
You can publish Intelligent Cubes manually, or you can schedule the
publication of Intelligent Cubes.
207
After an Intelligent Cube is created and published, its data is made available
in the memory of the Intelligence Server. Multiple reports can be created to
access the Intelligent Cube.
Reporting on a shared Intelligent Cube provides quick access to data as the
data has been pre-aggregated. This returns report results much faster than
querying the data warehouse.
You can restrict reports that access an Intelligent Cube to only the data
available within the Intelligent Cube. This ensures that report results are
returned quickly, and it also prevents full ROLAP analysis. Report filters,
consolidations, and custom groups are not available for reports that access
Intelligent Cubes.
209
3 Browse to the new Intelligent Cube to which you want to link the report,
select it, and then click Open.
there are data mismatches between the report and the Intelligent
IfCube,
a warning message is displayed that lists the differences.
Attributes on the report that are not contained in the new
Intelligent Cube will have to be removed from the report to display
valid report results. Missing metrics are converted into derived
metrics and may be able to display correct data, but they should be
removed if no data is returned for their values.
4 If the differences are acceptable, click OK.
5 The report is updated to access the Intelligent Cube selected. You should
remove any attributes and metrics if they no longer return correct results.
211
The image above shows standard run-time reporting with prompts, while
using OLAP Services to execute against the Intelligent Cube rather than
against the data warehouse. The performance of your business intelligence
application is improved by reducing execution against your data warehouse
and maintaining only a single Intelligent Cube for multiple prompted
reports.
Prompts on reports that access Intelligent Cubes can only access data that is
available within the Intelligent Cube. These restrictions are applied
automatically when creating prompts. For example, the attributes Year and
Region and the metrics Cost and Revenue are included in the Intelligent
Cube shown in the image on the previous page. If you create an object prompt
in your report that accesses this Intelligent Cube, then you can only choose
from the four objects Year, Region, Cost, and Revenue.
prompts that include objects or data not included in an Intelligent
Any
Cube are not available for reports that are connected to the Intelligent
Cube. An error message is displayed if you attempt to include these
prompts in reports that cannot support their data requirements.
You can also enable full ROLAP analysis with prompts and OLAP Services by
using Intelligent Cubes. Prompts in reports that access Intelligent Cubes can
use the complete ROLAP schema of a project. However, if a prompt retrieves
data from outside the Intelligent Cube, re-execution against the data
warehouse is necessary.
The following prompts are supported in Intelligent Cube reporting:
Element prompt
Value prompt
Object prompt
These prompts can be added to the Intelligent Cube report only in design
mode. They can be part of the Intelligent Cube report template or view filter
expression.
Hierarchy prompts and level prompts are not supported in Intelligent Cube
reports.
213
Notice that Quarter is not on the report, but it is included in the Report
Objects pane as it is a part of the Intelligent Cube to which the report is
connected. As shown in the image on the previous page, you right-click the
2009 attribute element for Year and drill down to Quarter. The drilled-to
report is shown below:
ResultDrilling Within the Intelligent Cube
215
Notice in the report shown above that all the attributes in the Time hierarchy
are available drilling options even though they are not all included in the
Intelligent Cube. These attributes are available drilling options because the
Intelligent Cube is defined to enable drilling outside of the Intelligent Cube.
As shown in the report above, you right-click the 2009 attribute element for
Year and drill down to Quarter.
The drilled-to report is shown below:
ResultDrilling Outside the Intelligent Cube
This drilled-to report is executed against the data warehouse, and it enables
you to access data outside of the Intelligent Cube for further relational
analysis. Notice also that all report objects that were not on the report grid
are removed from the Report Objects pane. This is because the drilled-to
report is not connected to the Intelligent Cube to which the report you drilled
from is connected.
should consider the execution time requirements for a report
You
before drilling outside of an Intelligent Cube.
The Intelligent Cube is being published, but the publishing process is not
finished yet.
217
View filters are a feature of OLAP Services that enable you to further narrow
down a result set of a report using only the objects in the Report Objects
window. You build view filters with report objects regardless of whether they
are displayed in the report view. When you add or modify a view filter, the
original report filter stays intact, and the view filter criteria is applied to the
report view.
For example, you create a report with Year, Region, Category, Revenue, and
Profit on the report. You can use dynamic aggregation to drag and drop the
Category attribute from the report grid to the Report Objects pane. This
allows Category to affect the report level without being displayed on the grid
and data is aggregated dynamically at the Year and Region level.
ExampleDynamic Aggregation
You decide to analyze this report to show only the data that is within the top
10% of profit. The view filter and resulting report are shown below:
ExampleEvaluate View Filter at Grid Level
The metric qualification has been evaluated at the level of the report grid,
which is Year and Region. This gives you a view of data within the top 10% of
profit for the data displayed on the report grid.
219
However, this report also includes the Category attribute in the Report
Objects pane. Since this attribute is available on the report, you can also view
data within the top 10% of profit at the Category, Region, and Year level.
Evaluating the metric qualification at this level returns the report results
shown below:
ExampleEvaluate View Filter at Report Objects Level
Notice that there are many more rows of data that are within the top 10% of
profit. This is because Category is now included in the calculation of the
metric qualification.
To modify the evaluation level of metric qualifications in a view filter:
3 If the Auto-Apply Changes check box is cleared, click Apply to apply the
view filter to the report.
Lesson Summary
In this lesson, you learned about the following:
Reports that access an Intelligent Cube can be granted full ROLAP access
to the data warehouse through drilling.
Prompts on reports that access Intelligent Cubes can only access data that
is available within the Intelligent Cube.
You can drill on reports that access Intelligent Cubes to analyze data at
different levels within the Intelligent Cubes.
Lesson Summary
221
223
You should receive the following confirmation that your Intelligent Cube was
published successfully:
Published Intelligent Cube
You will then create a report accessing the Intelligent Cube My First
Intelligent Cube. The report you create should look like the image below:
Report Accessing Intelligent Cube
How do you know you are creating this report based off My First Intelligent
Cube intelligent Cube?
Solution:
1 Right-click in the Object Viewer, point to New, and select Intelligent
Cube.
2 Select Empty Intelligent Cube, and click OK.
3 In the Intelligent Cube Editor, using the Object Browser, browse to the
Year, Category, and Subcategory attributes and add them to the Report
objects window.
4 Browse to the Revenue and Cost metrics and add them to the Report
objects window.
a standard report, the objects in the Intelligent Cubes Report
Unlike
objects window automatically get added to the Intelligent Cube
template as well.
5 Add the Year 2009 and 2010 attribute elements to your report filter.
6 Click the Run Report icon to publish the Intelligent Cube.
7 A pop up window displays, requesting you to save the report before
executing it. Click Yes and name the Intelligent Cube My First Intelligent
Cube.
can also save and close the report after step 5, then double-click
You
the Intelligent Cube to run it.
8 After the Intelligent Cube is published a confirmation display message
displays.
9 Click Save and Close.
the Intelligent Cube is published, it will be displayed by the
After
following item in the Intelligent Cube monitor.
225
6 Save and Close the Intelligent Cube with the default name Cube
converted from OLAP Report and save it in My Reports folder.
227
Your intelligent cube report results should look like the following:
21 Click Save and Close, and name the report Intelligent Cube Report
with Object Prompt.
Your report should be saved as a prompted report.
Add an attribute prompt for Country to this Intelligent Cube report.
229
30 You should get the following error message because the Country attribute
is not part of the Intelligent Cube of which this Intelligent Cube report is
based:
What happens when you change the behavior of the view filter condition for
Revenue to the following options?
______________________________________
______________________________________
______________________________________
______________________________________
Detailed Instructions
1 Using the Object Browser, browse to My Personal Objects/My
Reports/Intelligent Cube Exercise folder, right-click My First Intelligent
Cube Report and select Edit.
2 On the File menu, select Save As, and save your report as My First
Intelligent Cube Report with View Filter.
3 On the Insert menu, select New Metric.
4 Define the new metric with the definition of Revenue - Cost. Name this
metric Profit.
5 Click OK.
231
Your view filters and results should look like the following:
11 In the View filter panel, right-click the Revenue metric and select Apply
Condition at the Level of the Report Objects, as shown below:
233
After the option is selected, the View filter panel looks like:
If the metric has other view filter conditions on it, the following
submenu items are available:
235
6
DERIVED ELEMENTS
Lesson Description
This lesson describes a functionality provided by MicroStrategy OLAP Services
called Derived Elements. Similar to derived metrics that define metrics on the
fly, derived elements define attribute elements on the fly using the Report
Editor. This lesson also describes how to create a derived element using the
Derived Element Editor to format each individual derived element.
237
Derived Elements
Lesson Objective
After completing this lesson, you will be able to:
Explain derived elements feature, the different types of derived elements,
and how they can be created in Desktop.
After completing the topics in this lesson, you will be able to:
Derived Elements
In the report on the right, the Region attribute elements are grouped into
four different derived element groups.
239
Derived Elements
East Coast: Combines the data for the Mid-Atlantic, Northeast, and
Southeast regions
West Coast: Combines the data for the Northwest and Southwest regions
South and Central: Combines the data for the South and Central regions
Web: Displays the data for the Web attribute element, which is not
included in any of the derived elements listed above
You can do more than just simple combinations of attribute elements with
derived elements. For example, after you have defined the East Coast derived
element, you can determine the East Coast regions percent contribution to
profit, as shown below:
Example - Derived Elements
Derived Elements
The different types of derived elements provide a wide range of reporting and
analysis features.
241
Derived Elements
Derived Elements
The report shown below includes the following derived elements defined with
filters of Region attribute elements:
Southern Regions: Returns attribute elements that begin with the word
South.
Northern Regions: Returns attribute elements that begin with the word
North.
Example - Filter Derived Elements
243
Derived Elements
Using lists of attribute elements. This includes using the In list and Not in
List operators.
In List: A filter qualification using In list returns data for all the
attribute elements you select. An In list filter qualification that returns
all the southern regions is shown below:
Derived Elements Editor - Attribute Element List Qualification
Not in List: A filter qualification using Not in List returns data for all
the attribute elements for an attribute that you do not select.
Derived Elements
245
Derived Elements
Derived Elements
All Other
The All Other derived element collects all attribute elements that are not
included in derived elements, and includes them on the report as individual
attribute elements by default. This derived element is created automatically
when the first derived element is created for an attribute. For example, recall
the report created with a filter derived element that included Southern
Regions and Northern Regions derived elements as shown below:
Example - All Other Derived Element
Central, Mid-Atlantic, and Web are all attribute elements that are not
included in any derived elements. The All Other derived element gathers
these attribute elements, and includes them on a report as separate attribute
elements.
247
Derived Elements
Derived elements require static report datasets so that they can be evaluated
without regenerating or re-executing SQL. Due to this requirement, derived
elements can only be created in the following types of reports and
documents:
Using the Derived Elements Editor: Using the Derived Elements Editor
provides the full set of derived elements functionality when creating
derived elements.
Derived Elements
You can create the following types of quick Group derived elements:
Quick groups: Creates a simple group of the attribute elements that are
selected.
Quick sorts: Creates a derived element that sorts the attribute elements
on the report or document in any order you wish. This option is only
available if no derived elements are defined for the attribute on the report
or document.
These quick group options to create derived elements are quick and easy
ways to create derived elements.
These quick group techniques are not available in Graph View mode.
249
Derived Elements
Quick Groups
Using right-click options, you can group attribute elements into a single
derived element. The derived element created by this action aggregates and
displays all the data for the attribute elements selected into one group of
data.
For example, you have a report with Region, Category, and Profit displayed.
To get a more summarized view of data, you decide to group the regions into
East, West, and South and Central elements.
Create Quick Groups
Derived Elements
Quick Calculations
You can group attribute elements and derived elements into a single derived
element, using the Create Calculation feature found in the right-click menu.
Quick calculations enable you to view various types of data and analysis on
the same report. You can add, subtract, average, divide, as well as find the
greatest and least values for each metric.
For example, you have a report with Region, Units Sold, Profit and Revenue.
Create Quick Calculations
251
Derived Elements
You can quickly create the average Unit Sold, average Profit and average
Revenue based on their location as shown below:
Example - Quick Calculations
This type of analysis enables you to quickly understand your market and
create targeted promotion at locations that have weaker sales.
To create a derived element with a quick calculation:
Add
Subtract
Average
Greatest
Least
Divide
Derived Elements
For example, notice the last group in the image above. If you create a quick
calculation on a report connected to an Intelligent Cube, the expression can
only include one type of function or operand such as +, /, and Average. From
the Derived Elements Editor, you can create expressions with a valid
combination of different functions. You can create a derived element from
the Derived Elements Editor with an expression of the following form:
(AttributeElement1 + AttributeElement2) / Sum(AllAttributeElements)
253
Derived Elements
Derived Elements
As discussed earlier, you can create group, filter and calculation type of
derived elements. The Derived Element Editor enables you to create all of
these types of derived elements.
To create a derived element using the Derived Element Editor:
3 In the Derived Elements Editor, click the New drop-down list, and select
List.
new derived elements are created, a blank group derived
Two
element and an All Other derived element.
4 Select the New List derived element.
5 In the Definition tab, from the left pane, select attribute elements to
include in the group, and then click > to add your selections to the group
derived element. This moves the attribute elements to the Selected objects
pane.
255
Derived Elements
7 From the Change Element drop-down list, you can format derived
element headers and values.
8 You can change the order in which the derived elements are displayed on
the report using the up and down arrows.
To complete derived element creation
9 You can continue to create more derived elements, or you can click OK to
close the Derived Elements Editor and return to the report.
10 You can save the derived element as a stand-alone object using the Save
button. This object can be shared by multiple reports and Grid/Graphs.
This procedure assumes a report is connected to an active Intelligent Cube
and the Derived Element Editor is open.
Derived Elements
1 To create a new filter derived element, click the New drop-down list, and
select Filter.
Two new derived elements are created, a blank filter derived element and
an All Other derived element.
2 Select the new Filter derived element.
Create Filter Derived Element
257
Derived Elements
Derived Elements
4 You can continue to create more derived elements, or you can click OK to
close the Derived Elements Editor and return to the report.
259
Derived Elements
All available group, calculation, filter, and all other derived elements are
saved as part of the derived element. You cannot select a subset of the
derived elements, you must save and share the entire collection of derived
elements.
The stand-alone derived element itself can be modified, but you cannot
modify it from within a report. Any modifications for the derived element
are applied to the derived element in all of the reports that it is shared in.
Derived Elements
The procedure assumes a report on which you connect the derived element to
an attribute is connected to an active intelligent cube.
1 Log in to a project in Desktop.
2 Open the report and run it in Grid View or Grid and Graph View.
3 Right-click the attribute on which you want to apply a stand-alone derived
element and click Derived Elements.
an attribute already has a derived element defined for it in the
Ifreport,
applying a stand-alone derived element overwrites the existing
definition.
4 In the Derived Elements Editor, click Link.
5 In the Select Group window, browse to and select the derived element to
apply to the attribute, and click Open.
6 Click OK to save your changes and close the Derived Elements Editor.
You can modify a stand-alone derived element which updates the derived
element in all reports it is used in. Since these modifications are applied to
multiple reporting objects, you can only update the stand-alone derived
element itself. You cannot update it from a report.
modify a stand alone derived element, right-click the stand-alone
Toderived
element and select Edit.
261
Derived Elements
Notice that the derived element East Coasts % Contribution uses derived
element formatting to apply a percentage format to the profit values. If you
used metric formatting to apply a percentage format to profit values, the
percentage format would be applied for all profit values across all elements.
Using the Derived Element Editor you can apply formatting to different
derived elements headers and values.
Derived Elements
263
Derived Elements
View filters
Derived Metrics
Page-by
Thresholds
Drilling
Prompts
View filters
View filters restrict the amount of data displayed on a report, resulting in a
different view of the data.
View filters restrict the same data that is used by derived elements to analyze
and display data to meet your reporting needs. Since both of these OLAP
Services features use the same data, it is important to understand how the
two features can be used together to return the desired report results.
Derived elements cannot be selected in a view filter, and therefore, cannot be
a part of a view filter qualification that restricts report results. View filters can
only include qualifications on attributes and metrics.
Since derived elements are associated with attribute elements, any view filter
qualifications that restrict the data for a derived elements associated
attribute elements also restricts data returned for the derived element.
Derived Elements
The Music and Movies derived element combines the profit values for the
Music attribute element and Movies attribute element. You then create a
view filter qualification that restricts the report data to the individual Movies
attribute element and Electronics attribute element. The report results are
shown below:
View Filter Qualification Restricting Movies and Electronics Attribute
Elements
The Music and Movies derived element is still displayed, but the profit value
has decreased. The view filter has restricted the data to only Movies and
Electronics. The Music and Movies derived element can only return profit
values for the available Movies attribute element data. When using view
filters and derived elements on the same report, any view filter qualifications
restricts the data available to analyze and format with derived elements.
265
Derived Elements
Derived Metrics
A derived metric is a metric based on metric data included in the report
dataset returned from the data warehouse. You can use derived metrics to
perform column math. That is, calculations on metrics included in the report
dataset, without regenerating or re-executing SQL.
Most derived metrics are represented correctly by derived elements.
However, derived metrics that have the same evaluation order requirements
as smart metrics can initially be calculated incorrectly when using derived
elements.
For example, a derived metric that uses a division such as Profit/Revenue is
initially calculated incorrectly when using derived elements. By default
derived metrics are evaluated before derived elements. You must change the
evaluation order to evaluate derived elements before derived metrics to
obtain the correct result set.
order is the order in which the analytical engine calculates
Evaluation
the metric values. For more information about changing the
evaluation order see Evaluation Order starting on page 299.
Page-by
You use the page-by feature to group data into subsets. Page-by makes
viewing a report easier than scrolling through long lists of data. Attributes are
one of the most common objects included in the page-by area of a report.
When an attribute is included in the page-by area, you can select the attribute
element for which you want to view data.
Derived Elements
If you create derived elements for an attribute included in the page-by area,
the derived elements are available for selection to display their associated
data. For example, the report below shows East Coast, West Coast, and
Central and South derived elements based on the Region attribute:
Derived Elements based on Region Attribute
If Region is moved to the page-by area, the derived elements are available for
selection from the page-by field, along with the Web attribute element, as
shown below:
Derived Elements in Page-by Field
must move attributes from the page-by area to the grid of the
You
report to create or modify derived elements for the attribute.
267
Derived Elements
Thresholds
Thresholds highlight particular data in a report by displaying special cell
formats, symbols, images, or replacement text.
They are created using conditions on attributes or metrics. Thresholds
created using conditions on attributes are not displayed for derived element
data. However, the more commonly used thresholds created using conditions
on metrics are applied to derived element data.
For example, you have a report with East Coast, West Coast, and Central and
South derived elements defined, based on the Region attribute and the Profit
metric.
You create a threshold on the Profit metric, as shown in the following image:
Metric Threshold
do not have the option to select the Region attribute since that
You
includes derived elements. You cannot display this type of
threshold formatting for derived elements, however you can still
apply formatting to the data for each derived element.
Derived Elements
When the report is executed, the Profit > $400,000 threshold is displayed, as
shown below:
Profit > $400,000 Results
Drilling
Drilling enables you to view displayed report data at levels other than that
returned in the original grid or graph report.
When you drill on attribute elements in a report, the resulting report restricts
the results to data only for the attribute elements used when drilling. For
example, if you drill down from the Year 2008 attribute element to Quarter,
the resulting report only includes Quarter that are within 2008. The same
logic applies to drilling on derived elements. Drilling on a derived element
restricts the resulting report to data only for the attribute elements used to
define the derived element.
269
Derived Elements
For example, the report below shows East Coast, West Coast, and Central and
South derived elements based on the Region attribute:
Derived Elements based on Region Attribute
Derived Elements
If you drill down from the East Coast derived element to Call Center, the
resulting report shown below returns data for Call Centers within the East
Coast regions (Northeast, Mid-Atlantic, and Southeast):
Drill Down from East Coast Derived Element to Call Center
Prompts
There is no interaction between prompts and derived elements. Intelligent
Cube reports support only object prompts and their information is retrieved
from the Intelligent Cube. Since derived elements are not part of the
Intelligent Cube, they are not available during object prompts.
271
Derived Elements
Lesson Summary
Group, filter, calculation and all other derived elements are examples of
the different types of derived elements.
The all other derived element collects all attribute elements that are not
included in derived elements, and includes them as individual attribute
elements by default.
Derived elements are associated with attribute elements so any view filter
qualifications that restrict the data for a derived elements associated
attribute elements also restricts data returned for the derived element.
Metrics: Revenue, Profit, Cost, Unit Profit, Unit Cost, Unit Price and
Units Sold
Metrics: Unit Cost, Unit Price, Unit Profit, and Units Sold
273
Your quick calculations should be based off the Movies category, and
provide an Average for the following:
Detailed Instructions
1 Right-click in the Object Viewer, point to New, and select Intelligent
Cube.
2 Select Empty Intelligent Cube, and click OK.
3 In the Intelligent Cube Editor, using the Object Browser, browse to the
Category, Subcategory and Item attributes and add them to the Report
objects window.
4 Add the Revenue, Profit, Cost, Unit Profit, Unit Cost, Unit Price and
Units Sold metrics to the Report Objects window.
5 Click the Run Report icon to publish the Intelligent Cube.
275
18 Name the group Avg Unit Cost between $7.00 and $10.00 and click OK.
19 Repeat the steps above to create two additional groups named Avg Unit
Cost between $10.01 and $14.00 and Avg Unit Cost above $14.01.
Your final Intelligent Cube report, which includes the derived elements,
should look like the image below (only a part of the report is shown):
Final Quick Derived Elements for Calculations - Average
20 Click Save and Close, and name the Intelligent Cube report Quick
Calculation - Average.
Metrics: Profit
Assume your manager is in charge of the Seattle, San Francisco, and San
Diego distribution centers, and wants to compare her performance with
respect to other regions.
Your manager now wants to compare her profit with the other centers.
277
Your Intelligent Cube report should now look like the following image:
Results for Additional Derived Elements - Ratios
Finally, your manager wants to change the display of the derived elements
on the Intelligent Cube report. Change the order so the ratios display at
the bottom and profits for each derived element display at the top.
Detailed Instructions
Creating Group Derived Elements
10 Add the Distribution Center attribute and the Profit metric to the
template.
11 On the toolbar, click Run Report.
12 Right-click the Distribution Center attribute, and select Derived
Elements.
13 In the Derived Elements window, on the New menu, select List, as shown
below:
Derived Elements Editor - List
279
14 Add distribution centers Seattle, San Francisco and San Diego to the
Selected objects list using the > button.
Desired Attribute Elements Selected
16 On the New menu, select List to create another new derived elements
group.
it is selected, you will only see those elements that are not part of
After
any other derived element.
Unused Elements Check Box
18 Select Washington DC, Miami, New York and Atlanta, and use the right
arrow to move them to the Selected objects pane.
19 On the Change Element menu, select Rename Derived Element, and
name this group East Manager's Distribution Centers.
20 Repeat the steps above to create another derived element which contains
the remaining Distribution Centers that are not part of the above two
groups. Name it Remaining Centers.
21 Click OK.
The report should look like the image below:
New Derived Elements for Distribution Centers
281
Your manager wants to compare her profit with the other centers. The
calculation derived element enables you to take the analysis a step further.
22 Right-click the Distribution Center attribute and select Derived
Elements.
In the summary window, you see the derived elements and its
expressions, as shown below:
Summary of all Derived Elements Created
24 Select Derived Element from the drop-down list to see the available
derived elements, as shown below:
Calculation Groups Selections
283
Now your manager wants to see the ratios at the bottom and profits of each
custom derived element at the top of the report.
40 Click OK.
Your results should look as follows:
Result Set for Ratios and Profits
41 Click Save and Close and name the report Regional Analysis.
285
7
REPORT DATA OPTIONS
Lesson Description
This lesson teaches you how to use Desktops Report Data Options to further
control the behavior of reports.
287
Lesson Objectives
After completing this lesson, you will be able to:
Define all of the Report Data Options and understand how to enable them.
After completing the topics in this lesson, you will be able to:
Describe and set report limits, change the join type of a metric on a report,
change the processing order of objects on a report, and set subtotal options
for custom groups and consolidations. (Page 291)
Change various display settings for a specific report. These settings include
object aliases, custom group display, specific syntax or text for null values,
report display and general drilling options at the report
level. (Page 308)
There are several options that can be set at the report-level, using Report
Data Options. The Report Data Options window is grouped into three
categories:
Calculations
Report LimitEnables you to set limits on any metrics to apply to a
report
Metric Join TypeEnables you to set the join type of each metric that
is present on the report
Attribute Join TypeEnables you to control how lookup tables are
joined with intermediate tables during report execution
Evaluation OrderEnables you to modify the evaluation order of
metrics, consolidations, report limits, and subtotals when present on a
report
SubtotalsEnables you to add a subtotal to custom groups and
consolidations present on a report
Display
AliasEnables you to specify an alias for each template object present
on a report
Object Display Enables you to specify custom group display settings
Null ValuesEnables you to control the display of null values present
on a report
Grid Graph ModeEnables you to specify the display settings for a
report when viewed in Grid Graph mode in Desktop
289
General
All of the above options apply to the report on which you set them. In other
words, you set Report Data Options on a report-by-report basis.
Calculations
After completing this topic, you will be able to:
Describe and set report limits, change the join type of a metric on a report,
change the processing order of objects on a report, and set subtotal options
for custom groups and consolidations.
Report Limit
The Report Editor enables you to apply limits to metrics on a report. Report
limits are maximum and minimum values for a metric that you specify at the
report-level. They determine the rows of a data set that are displayed in the
final report results.
A report limit specifies metric criteria that is used to restrict the final result
set after the report metrics are calculated. The Report Editor enables you to
set limits with any metric, regardless of whether or not that metric displays
on the report.
For example, on a report containing Call Centers and Profit, you might apply
a report limit of Revenue Rank Bottom 10%. This constrains the list of Call
Centers in the final report results to only those that had Revenue in the
bottom 10% of all Call Centers. Although the Revenue metric is used in the
report limit, it does not appear on the report template nor is it in the Report
Objects window.
Calculations
291
You can define report limits in terms of Value, Rank, and Percent as
described in the table below:
Function
Example
Operators
Value
Rank
Top
Bottom
Between
Exclude top
Exclude bottom
Not between
Exactly
Different from
Is null, Is not null
Percent
Top
Bottom
Between
Exclude top
Exclude bottom
Not between
Exactly
Different from
Is null, Is not null
Report limits are similar to metric qualifications but are defined on the
template rather than the report filter. Thus, unlike metric qualifications,
which can be saved as separate filter objects, report limits are saved locally to
a particular report and are not reusable across reports. Also, unlike metric
qualifications, report limits do not allow you to control the output level at
which the limit is evaluated. A report limit always evaluates at the Report
Level (the lowest attribute levels on the template). In general, report limits
can produce the same results as metric qualifications but with fewer passes of
SQL.
metric qualification report filters and report limits can be used
Both
on the same report because they are applied at different stages of the
report execution process. 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 instead applied at the level of
the report after the metrics have been calculated.
292 Calculations
1 In the Report Editor, on the Data menu, select Report Data Options.
2 In the Report Data Options window, expand Calculations and select
Report Limit.
3 In the right-hand window, click Modify.
4 In the Report Limit Editor, double-click the Limit Definition area.
5 In the Report Limit Qualification window, you can add a metric to the
Metric box in one of the following ways:
Type the metrics name: In the Metric box, type the desired metric
name and click OK.
Browse for the metric: Click the Browse button. In the Open window,
locate and select the desired metric. Click OK.
Drag and drop a metric: In the Object Browser, locate the metric and
drag it into the Metric box.
Calculations
293
An inner join includes only records that have data present for all metrics
in the report results.
An outer join shows all records for that metric, regardless of whether data
exists for other metrics in the report results.
Region
Sales
North
100
South
200
500
East
100
400
West
Inventory
300
In this second example, both the Sales and Inventory metrics are defined
with an Inner join. Only records that have data across both metrics are
present in the report. Since the North and West Regions do not meet this
condition, they are omitted. The North Region does not appear because it
does not have data for Inventory. The West Region does not appear because it
does not have data for Sales.
294 Calculations
Region
Sales
Inventory
South
200
500
East
100
400
In this last example, the Sales metric is defined with an Outer join while the
Inventory metric is defined with an Inner join. The North region displays on
the report because it has data for Sales, even though it does not have data for
Inventory. Alternately, the West region does not appear on the report
because it does not have data for Sales.
Region
Sales
Inventory
North
100
South
200
500
East
100
400
In summary, outer joins display all the records that have a value for that
metric. MicroStrategy enables you to specify metric join types for each metric
on a report.
To set the metric join type at the report-level:
1 In the Report Editor, on the Data menu, select Report Data Options.
2 In the Report Data Options window, expand Calculations and select
Metric Join Type.
Calculations
295
3 Under Join Type, select the join type for each metric.
Report Data Options Editor - Metric Join Type
1 In the Metric Editor, on the Tools menu, select Metric Join Type.
2 In the Metric Join Type window, clear Use default inherited value (Default settings level).
296 Calculations
Calculations
297
As an example, if you want the year 2011 to appear in a report (even though
there is no sales data for this year in the data warehouse), you must force the
SQL Engine to perform an outer join against the lookup table, LU_YEAR.
Doing so brings back all of the years in the lookup table, whether or not there
is data for these years in the sales fact table.
Changing the setting to Preserve lookup table elements joined to final
pass result table based on template attributes without filter (produces
same result set as the with filter option because there is no filter criteria in
the below report) brings back the following results:
following example assumes that there are 4 years stored in the
The
LU_YEAR lookup table, 2008- 2011. It also assumes that only the
years 2008, 2009 and 2010 have data in the fact table.
Example - Attribute Join Type
The example above demonstrates how the Attribute Join Type setting affects
the joins made between a lookup table and a fact table.
the case where you need to force an outer join between two lookup
Intables,
you can use the logical view functionality that is available in
MicroStrategy. For more information on logical views, refer to the
MicroStrategy Advanced Data Warehousing course.
you are using Microsoft Access, you also need to change another
Ifsetting
for the join type to take effect. On the Data menu, select VLDB
Properties. In the VLDB Properties window, in the Joins folder, clear
the Use default inherited value check box and change Join Type to
Join 92. Click Save and Close.
298 Calculations
Evaluation Order
The order in which data is calculated for a report can affect the final result
set. By using evaluation order settings, you can control the order in which
consolidations, certain metrics, report limits, and subtotals are calculated
and resolved for a given report.
Evaluation order determines the order in which the Analytical Engine
performs different kinds of calculations. The following simple example
illustrates how evaluation order can influence the result set of a report.
States Consolidation
Revenue
Dollar Cost
Revenue/Cost
New York
15
10
1.5
Virginia
20
15
1.33
NY & Virginia
35
25
In the above example two calculations are resolved by the Analytical Engine:
the States Consolidation and the smart compound metric, Revenue/Cost. If
the Analytical Engine calculates the consolidation before the compound
metric, the empty cells value is based on the last row of the consolidation,
35/25=1.4. If, however, the Analytical Engine calculates the smart
compound metric first, the empty cells value is based on the last column of
the result set, 1.5+1.33=2.83.
In general, calculations on MicroStrategy reports are achieved in one of two
possible ways:
Metric qualification
Calculations
299
Consolidations
Report limits
Subtotals
Custom groups
Derived elements
Sorting
Thresholds
Page-by
Crosstabbing
The MicroStrategy Engine makes a plan to decide the evaluation order of all
Analytical Engine calculations. Of the calculation types listed above, metric
qualification is always performed first. Page-by, sorting, and cross-tabbing
are always done during the last stage of the report execution process. For the
other types of calculations, the Analytical Engine enables you to specify the
evaluation order.
Currently, the MicroStrategy Engine supports user-defined evaluation order
for four types of calculations:
Consolidations
Report limits
Subtotals
The above calculations can be defined in any sequence. However, the default
calculation order is as follows:
1 Smart compound metrics
2 Consolidations
3 Report limits
4 Subtotals
300 Calculations
1 In the Report Editor, on the Data menu, select Report Data Options.
2 In the Report Data Options window, expand Calculations and select
Evaluation Order.
Set Evaluation Order
Calculations
301
302 Calculations
The following example shows two reports where the only difference is the
evaluation order of the consolidations. The first report evaluates the Seasons
consolidation first. The second report evaluates the Years consolidation first.
Evaluation Order ExampleEvaluate Seasons Consolidation First
Calculations
303
The view evaluation order is only enabled if you perform report view
manipulations. The report view manipulations are as follows:
There are objects in the Report Objects Window that are not on the report
view.
304 Calculations
SQL View
Report limits
Metric calculations
Subtotals
Consolidations
Thresholds
Crosstabbing
Calculations
305
By viewing the Analytical Engines calculation plan for any given report, you
can gain a clearer understanding of the order of operations for the report and,
if necessary, change the evaluation order to obtain the desired result set.
Subtotals
The Subtotals tab is used for custom groups and consolidations. If custom
groups or consolidations are on the report, this tab provides you with the
option to display the subtotals of these objects: Default, Yes, and No. If
Default is selected, the object inherits the Subtotal property as it is set in the
object itself through either the Custom Group or Consolidation Editor.
To set the Subtotal option at the custom group or consolidation-level:
306 Calculations
1 In the Report Editor, on the Data menu, select Report Data Options.
2 In the Report Data Options window, expand Calculations and select
Subtotals.
Report Data Options Editor - Subtotals
3 Under Allow Subtotals for the object, choose the appropriate value:
Default, Yes, or No.
4 Click OK.
5 In the Report Editor, click Save and Close.
consolidation subtotals to produce the best results, you may also
For
need to change the Subtotals over Consolidations Compatibility VLDB
property in the Analytical Engine folder.
Calculations
307
Display
After completing this topic, you will be able to:
Change various display settings for a specific report. These settings include
object aliases, custom group display, specific syntax or text for null values,
report display and general drilling options at the report level.
Alias
In certain cases, you may want to change the name of an object for report
display purposes. By specifying an alias for an object, you can have it display
under a different name without actually changing the objects name in the
project.
The ability to create object aliases on a report-by-report basis enables you to
create reports to meet the needs of a diverse end-user community. Naming
conventions of business measurements may differ from one department to
another and among organizations sharing data. For example, you may create
a metric named Sales. The Sales department refers to this measurement as
Revenue, while Marketing refers to it as Sales. Aliases provide greater
flexibility for naming conventions in situations such as this one.
In addition, you may want to name metrics from a more technical
perspective. For example, you may name a level metric as Revenue
(Level=Call Center, Filtering=Ignore, Grouping=None) to easily identify its
level properties. However, when you place it on a report, you may want it to
display as All Revenue to make it more understandable to the end-user
community, as seen below:
Example - Alias
308 Display
Attributes
Metrics
Consolidations
Custom Groups
1 In the Report Editor, 0n the Data menu, select Report Data Options.
2 In the Report Data Options window, expand Display and select Alias.
3 Under Alias, enter the alias in the text box next to the object.
4 Click OK.
5 In the Report Editor, click Save and Close.
Display
309
Object Display
The Object Display setting is used to further customize the display of custom
groups on a report. You can use the Object Display option to change the view
of the custom group to either flat or hierarchical. The following is an example
of a flat custom group display. Look closely at the display of the Top 10
Customers and Bottom 5 Items.
Custom Group Flat Display
With a flat display, there is no clear distinction between the custom group
header and the elements within it. Even if the custom group header is given a
name to distinguish it from its elements, it may be difficult to discern in large
report results.
310 Display
Display
311
4 Under Display, select the desired display for the custom group object.
5 Click OK.
6 In the Report Editor, click Save and Close.
can also specify custom group display settings in the Custom
You
Group Editor.
Null Values
A null value is an unknown value. Null values can result from a number of
reasons as discussed below.
312 Display
By default, the null values for such metrics are replaced by -- on the report.
You can change this default display via the Aggregation Null Values setting in
Report Data Options.
More information on how to change the dynamic aggregation function, see
Dynamic Aggregation starting on page 385.
Display
313
1 In the Report Editor, on the Data menu, select Report Data Options.
2 In the Report Data Options window, expand Display and select Null
Values.
Report Data Options Editor - Null Values
3 Under Aggregation null values, clear the Use default check box.
4 For Set the value to be displayed in the reports when the metric
value cannot be calculated at the desired level, enter a value.
5 Click OK.
6 In the Report Editor, click Save and Close.
change the display of dynamic aggregation null values for all
Toreports
in a project, modify the null display options in the Project
Configuration Editor. You can learn more about the Project
Configuration Editor in the MicroStrategy Administration:
Configuration and Security course.
314 Display
Grid Position setting: Affects the alignment of the grid on the report page
Display
315
General Options
After completing this topic, you will be able to:
Enable, disable, or limit the amount of drilling that can be performed on a
report. Specify whether or not to retain page-by selections when saving a
report. Specify the MicroStrategy Mobile data view.
Drilling
Drilling enables users to view data at levels either higher or lower than those
shown on a report. To review drilling concepts, refer to the Drill Maps lesson
in this course see What is Drilling? starting on page 335, or the Report
Manipulations lesson in the MicroStrategy Desktop: Reporting Essentials
course.
On the Drilling tab of Report Data Options, you can:
Determine whether or not users will see the attribute from which they
drilled in the drilled report. For example, if you drill from State to City
and you keep the parent, State remains on the report along with City. The
options are
Add the current page-by element as part of the filter when drilling from:
Adds the current page-by element to the filter when drilling. The options
are:
Any page-by field: The page-by element is added to the filter only
when you drill from a page-by field.
Any other part of the report: The page-by element is added to the
filter when you drill from anywhere on the report except a page-by
field.
Drilling filter options: Enables you to select whether to keep the child
elements in the filter when drilling. This setting affects the SQL generated
for the drilled report, not the report results. The options are:
General Options
317
Drill Attributes Join Type: Opens the Drill Attributes Join Type window,
which enables you to set the join type for the attributes that appear in
new, drilled reports.
1 In the Report Editor, on the Data menu, select Report Data Options.
2 In the Report Data Options window, expand General and select Drilling.
Report Data Options Editor - Drilling
3 Clear the Enable report drilling check box if you want to disable drilling
for the report (the check box is selected by default).
4 Select the appropriate option to specify whether you can drill anywhere or
only down.
5 For Keep parent while drilling, select Yes or No. (The Default setting
inherits the value from the drill path.)
6 For Keep Thresholds while drilling, select Yes or No. (The Default setting
inherits the value from the drill path.)
7 Inherit subtotals from parent, while drilling, select Yes or No. (The
Default setting inherits the value from the drill path.)
8 Set the page-by options as needed.
9 Select the appropriate Drilling filter option.
10 Click Drill Attributes Join Type to specify the join type on specific
attributes to which you drill.
11 Click OK.
12 In the Report Editor, click Save and Close.
General Options
319
Advanced
Report Data Options Editor - Advanced
Page-by enables you to select and display subsets of your report data on
separate pages. This feature is most useful when you have large report results
which require you to scroll to view all of the results.
review more about the page-by feature, refer to the Report
ToManipulations
lesson in the MicroStrategy Desktop: Reporting
Essentials course.
Using the page-by setting in the Report Data Options window, you can
specify whether or not to retain page-by selections when you save a report. By
default, page-by selections are retained when you save the report.
Always open this report in full screen mode sets the default display mode for
the report to be full screen, when viewed in MicroStrategy Web.
MicroStrategy Mobile
The MicroStrategy Mobile Data View settings in Report Data Options enable
you to control the design options and report functionality for reports
displayed in MicroStrategy Mobile.
Report Data Options Editor - MicroStrategy Mobile
General Options
321
Lesson Summary
In this lesson, you learned about the following:
Report Data Options are report-level settings that enable you to control
the appearance and behavior of certain objects on your reports.
Report limits enable you to set limits on any metric to apply to a report. A
report limit is applied after all of the reports metrics are calculated. While
they are similar to metric qualification filters, report limits are defined in
the template of a report. Report limits are saved locally to a report and
cannot be reused across other reports.
Metric join type enables you to control how multiple metrics on a report
interact.
Attribute join type enables you to force outer joins to lookup tables.
The Evaluation Order setting enables you to control the order in which
objects are calculated by the Analytical Engine.
The Alias setting enables you to display different names for objects on
your report without changing the actual object names.
The Object Display setting enables you to display a custom group as flat or
hierarchical.
The Null Values settings enable you to control the display of nulls on a
report, whether they come from the data warehouse or are a result of
cross-tabbing. You can also control how nulls are sorted on a report.
Furthermore, you can choose how you want to display nulls that result
from dynamic aggregation.
The Grid Graph Mode subcategory enables you to specify settings for
positioning the grid report on the screen and the percentage of the area
covered by the grid report on the screen.
The Drilling options enable you to control drill behavior on a given report.
323
14 Run the report. You should see subcategories with Revenue above
$500,000:
Joins
To observe the effects of join types:
1 With the Filter Editor, create a filter for Category = Books and name it
Books.
325
How would the report result be different if you used two conditional
metrics, 2009 Revenue and 2010 Revenue, instead of the Year attribute?
_______________________________________
_______________________________________
Notice that you do not see Ranks 1 through 6 in the report results. This is
because the ranks of all the subcategories were calculated before the
report limit of Revenue > $500,000 was applied.
327
11 Click OK. The report runs again with the new evaluation order, and you
should see the ranks change accordingly:
Subtotals
Display subtotals for a custom group. By default, the subtotals of custom
groups are disabled. They can be turned on in the Custom Group Editor or
through Report Data Options.
1 With the Report Editor, create a report with the Age Groups custom
group in the rows and Revenue in the columns. You can find the Age
Group custom group in the Public Objects/Custom Groups folder.
329
Alias
Suppose you want to change the attribute and metric names that display on a
single report.
1 With the Report Editor, open any report that contains a metric and at
least one attribute.
2 In the Report Editor, on the Data menu, select Report Data Options.
3 In the Report Data Options window, expand Display and select Alias.
4 Under Alias, enter an alias for the metric.
5 Enter an alias for the attribute.
6 Click OK.
7 Execute the report. You should see the aliases displayed in place of the
original names in the report results.
8 Where else does the alias appear? In Design View? In SQL View?
_______________________________________
_______________________________________
9 Save the report to the My Reports folder as Alias Options.
Drilling
1 With the Report Editor, create a simple report containing Category on
the rows, Units Sold on the columns, and Customer State in the page-by
field.
2 On the Data menu, select Report Data Options.
3 In the Report Data Options window, expand General and select Drilling.
4 If you enable the Drill down only and Keep parent while drilling
options, do these settings also apply to the drilled report?
_______________________________________
_______________________________________
5 Under Add the current page by element as part of the filter when drilling
from section, select Any other part of the report. (You can keep the Any
page-by field option selected as well.) Click OK.
6 In the Report Editor, run the report.
7 Drill from the Books category down to Subcategory. What did the Any
other part of the report option do? (Hint: Look in the Report Details
pane.)
8 Save the report to the My Reports folder as Drilling Options.
331
In step 15, when drilling down from Cameras to Item, the report limit is
applied to the drilled report.
In the optional question, the report with the report limit is more efficient
than the report with the metric qualification report filter. The report with
the report limit has only one pass, whereas the metric qualification report
filter has 5 passes.
Joins
In step 10, an outer join is not necessary in this case because the report
already contains cross-tabbing nulls. Additionally, using conditional
metrics instead of the Year attribute will result in only the values which
have results.
Evaluation Order
In step 12, you can only change the evaluation order of Rank Revenue
Ascending if Allow Smart Metric is enabled.
Subtotals
In step 10, if the subtotal is enabled in the Report Data Options, it is only
specific to the report. When the subtotal is enabled in the Custom Group
Editor, the subtotal is applied to all instances of the Custom Group.
Alias
In step 4, if you enable Drill down only and Keep parent while drilling,
these settings are applied to the drilled report.
333
8
DRILL MAPS
Lesson Description
Drill maps enable you to create fully customized drill paths to control
end-users drill actions on reports. By the end of this lesson, you will know how
a drill map works, how to create a custom drill map, and how it can affect
drilling on a report.
333
Drill Maps
Lesson Objectives
After completing this lesson, you will be able to:
Describe the purpose of drill maps in reporting. Create and edit drill maps.
After completing the topics in this lesson, you will be able to:
Describe how you create and customize drill maps. (Page 338)
Drill Maps
What is Drilling?
After completing this topic, you will be able to:
Explain the basic concept of drilling and define drill terminology.
After executing a report in MicroStrategy, you may want to see more detailed
or additional information about the result set. For example, after looking at
annual sales of a certain city, you may want to look at the monthly sales for
the same city. Alternatively, after noticing that a certain item had a very high
profit margin, you may want to analyze the entire category of that item. Such
actions, where you create a related report based on an existing report, are
referred to as drilling.
Attribute
Hierarchy
Consolidation
Custom group
Metric
You can also think of a template unit as any part of a template that can be
pivoted.
Initially, the default project drill map is empty. Whenever the project
designer creates drill hierarchies (that is, user hierarchies that are also
designated as drill hierarchies), they are added to the default project drill
map.
What is Drilling?
335
Drill Maps
Drill Maps
What is Drilling?
337
Drill Maps
Now that you have reviewed the basic principles of drilling and drill maps,
you are ready to learn how to create custom drill maps.
Using the Drill Map Editor, you can create or edit a drill map, and associate it
with a report, template, or template unit to view a different set of drill paths
than the default project drill paths.
There are three basic steps in defining a custom drill map:
1 Create a drill map.
2 Define the drill paths that will be available with the drill map.
3 Specify the drill map association to define the reports, templates, or
template units that use the drill map.
1 You can open the Drill Map Editor in one of several ways:
In the Report or Template Editor, on the Data menu, select Edit Drill
Map.
In the Custom Group Editor, on the Custom Group menu, select Edit
Drill Map.
Drill Maps
In the Consolidation Editor, on the Tools menu, select Edit Drill Map.
In the Attribute Editor, on the Tools menu, select Edit Drill Map.
339
Drill Maps
NameThis is the name of the drill map. This field is enabled when
changes are made to the drill map, such as adding or deleting a drill path
or modifying drill properties. The default drill map name is Object Name
Drill Map, where the Object Name is the object you have selected as the
destination object for the drill path. In other words, if you create a drill
path to Customer, the default name would be Customer Drill Map. For
objects in reports and templates, the default name displays as Report
Name Object Name Drill Map.
Drill PathsThis is where you specify the destination to which you want
to drill. Selecting any of these buttons opens up a Select Destination
Object window and enables you to navigate to the desired object. Select
the object and click Open.
Drill Map: This option enables you to select existing drill maps as
destinations. It enables you to create shortcuts to existing drill maps.
you do not see this option in the Drill Map Editor, on the View
Ifmenu,
select View Drill Map Path List.
Drill Path Display Name: This is the name that users see in the
right-click menu when they drill on a report.
Drill Maps
Set Name: Used in coordination with the Across drill paths, this
option enables you to group destinations under one heading. For
example, if you add three attributesCustomer, Day, and
Employeeto the Across drill option, you can create a set name, such
as Lowest, and associate it to all three destinations. The drill menu
would look like this:
Priority: This option enables you to set the default drill path. The
priority setting also impacts how the drill path is displayed for reports
in MicroStrategy Web. You may select one of the following:
Apply user filter: If selected, this option enables you to use the filter
created by the user when performing the drill. It is selected by default.
Apply report filter: If selected, applies the filter of the original report
to the drilled report. This option is selected by default.
341
Drill Maps
Clear AllClicking this option removes all the drill paths defined in the
current drill map. It empties the drill path information completely. It does
not affect the drill map associations.
ResetClicking Reset reverses any changes and resets the drill map to its
last saved definition. Drill Map associations are reset as well.
Associate withThis option enables you to associate the drill map to one
or more objects on a report.
Drill Maps
343
Drill Maps
Lesson Summary
In this lesson, you learned about the following:
Every project has a default, project-wide drill map. This drill map is based
on the user hierarchies that are also designated as drill hierarchies
(created by the project designer with Architect).
Drill paths are the different options available to you when you drill on a
report.
You can associate drill maps with different objects: an individual template
unit (to associate the drill map with the object globally across the entire
project), an individual template unit on a specific report, or a template
unit on a specific template.
The hierarchy of drill map associations is: report overrides template, and
template overrides object.
You can access the Drill Map Editor in six different ways: via the Report
Editor, via the Template Editor, via the Custom Group Editor, via the
Consolidations Editor, via the Attribute Editor, and by creating a new drill
map.
There are many components to the Drill Map Editor, including: Origin,
Object Browser, Drill Map Name, Drill Paths, Properties, and so forth.
345
2 When you double-click on any customer in the above report, you want to
see the details of the customers purchases. Using the Template Editor,
create a template that contains the following: Customer, Item, Day, Units
Sold, and Revenue (see image below). Save this template as Customer
Purchase Information.
3 Using the Drill Map Editor, create a new drill map and associate it with
the Customer attribute on the Florida Customers report. When you
double-click any customer on the report, you should drill to the
Customer Purchase Information template (Hint: you need to modify
the priority level for the drill path). Your drill map definition should
resemble the image below. Save this drill map as Customer Purchase
Drill Map.
4 After you drill to a customers purchase details, you want to be able to drill
on Customer again to see a customers personal contact information (see
Drill 2 at the end of this exercise). Using the Template Editor, create
another template that contains the following: Customer (display the
attribute forms Last Name, First Name, Address and Email), Customer
State, Customer City, Zip Code, and Customer Age. Save this template
as Customer Contact Information.
5 Using the Drill Map Editor, create another drill map and associate it with
the Customer attribute on the Customer Purchase Information
template. When you drill on any customer, you should be able to drill to
the Customer Contact Information template. You also want to have all
of the project default drill options available to you, so you need to include
the Tutorial Standard Drill Map as a drill path. (Hint: If you do not see
Drill Map under Drill Paths, in the view menu, select View Drill Map Path
List.) Save this drill map as Customer Contact Information Drill Map.
347
6 Run the Florida Customers report and perform the drilling as described
in the steps below to see the effects of the custom drill maps you have
created. The images below depict the drill paths for each of the drill
actions described in this exercise.
Drill 1: Double-click or right-click and drill from the first customer,
Abbott Delores, to the Customer Purchase Information template.
can also drill on the Customer attribute header, but your result
You
set will take longer to process since you are drilling on all of the
customers on the Florida Customers report.
Drill 2: Drill from the first customer, Abbott Delores, on the drilled
report (the Customer Purchase Information template) to the Customer
Contact Information template. Notice how you also have other drill
options.
9
REPORT DEVELOPER TOOLS
Lesson Description
In this lesson, you will learn about some of the tools available to you in
Desktop. You learn how the Find and Replace window enables you to define
Report Data Options settings, metric formatting, graph font specifications, and
graph preferences for multiple objects simultaneously. You will also learn how
to use the Project Documentation Wizard to generate project-related
information as HTML files.
351
Lesson Objectives
After completing this lesson, you will be able to:
Use Find and Replace to change multiple objects simultaneously. Create
project documentation HTML files.
After completing the topics in this lesson, you will be able to:
Globally find and replace Report Data Option settings, metric formatting,
graph font specifications, and graph preferences for selected
objects. (Page 351)
The Find and Replace window enables you to apply certain types of changes
to multiple MicroStrategy objects simultaneously. Using Find and Replace,
you can accomplish the following:
Define graph fonts and character sets for multiple graph reports or
templates
Modify certain Report Data Options for a group of reports and templates
Since many of the Report Data Options, such as evaluation order, are
relevant only to the report/template in which they are defined, globally
changing these settings can result in unexpected outcomes. Therefore,
only the following Report Data Options are available in Find and Replace:
General: Drilling
General: Advanced
353
2 In the Find and Replace window, select Report Data Options as the
category of properties to modify.
3 Find: Either browse to a group of reports/templates or use a search
object.
4 Replace With: Define the properties to apply to the group of
reports/templates. The Report Data Options button provides access to
the null value display, drilling, and page-by settings.
5 In the Report Data Options window, modify the Report Data Option
setting as needed. Select Apply next to each setting and click OK.
355
Replace With: Define the set of properties to apply to the selected metrics.
You can base the formatting properties on an existing metric or define
new formatting properties for the metric header and metric values. The
formatting modifications you can specify include the following: number
formatting, fonts, colors, alignment borders and background.
Summary: This section lists the metrics to be modified. You can select or
clear metrics to further refine the list.
To change the character sets and graph fonts for a group of reports or
templates, you can choose Graph Fonts as the category. The Find and
Replace window displays a similar set of sections as shown above, but they
are tailored to selecting reports or templates and applying specific character
sets and fonts for their graphs.
7 In the Find and Replace window, click Update Summary.
8 Click Replace.
9 In the confirmation window, click OK.
10 In the Find and Replace window, click Close.
Project Documentation
After completing this topic, you will be able to:
Use the Project Documentation Wizard to create documentation of a projects
application objects, schema objects, and configuration objects.
Project Documentation
357
Project Documentation
359
Lesson Summary
In this lesson, you learned about the following:
With the Find and Replace tool, you can apply settings to multiple objects
simultaneously. The settings include:
Certain Report Data Options
Autostyles
Metric formats
Graph fonts
Graph preferences
Export Options
361
Project Documentation
As a report developer, you want to document all of the application objects
that are created during the report development phase of the project. This
exercise is designed to give you hands-on practice with the Project
Documentation Wizard. You will use the following step-by-step instructions
to create HTML files that document most of the application objects that you
created in the MicroStrategy Tutorial project during this course.
1 In Desktop, log in to the MicroStrategy Tutorial project.
2 On the Tools Menu, select Project Documentation.
3 In the Project Documentation Wizard, click Next.
4 Select MicroStrategy Tutorial and click Next.
5 Select Application objects and click Next.
_______________________________________
_______________________________________
_______________________________________
_______________________________________
363
Click Metric.
_______________________________________
Click Facts.
_______________________________________
Click My Reports. Browse the objects you created during this course.
Good job!
In step 11, the following objects are listed and match the objects you
selected in the wizard:
Base formulas
Consolidations
Custom Groups
Derived Elements
Documents
365
A
MICROSTRATEGY TUTORIAL
Appendix Description
This appendix provides information on the MicroStrategy Tutorial project,
including the data model and physical warehouse schema.
365
MicroStrategy Tutorial
For more detailed information about data modeling, refer to the Project
Design Guide.
Although the MicroStrategy Tutorial data model is included in this section
for your reference, you can also view it directly in the product.
To view the MicroStrategy Tutorial data model:
MicroStrategy Tutorial
Geography
Customers
Time
Products
Geography Hierarchy
367
MicroStrategy Tutorial
Customers Hierarchy
MicroStrategy Tutorial
Time Hierarchy
369
MicroStrategy Tutorial
Products Hierarchy
MicroStrategy Tutorial
371
MicroStrategy Tutorial
9 To save the layout view of the tables, on the File menu, select Save
layout. The next time you open the Table Viewer, it displays the saved
view.
10 To copy the layout view, on the File menu, select Copy as Metafile
(.wmf).
MicroStrategy Tutorial
Geography
Customers
Time
Products
Fact tables
373
MicroStrategy Tutorial
Geography Schema
MicroStrategy Tutorial
Customers Schema
375
MicroStrategy Tutorial
Time Schema
MicroStrategy Tutorial
Products Schema
377
MicroStrategy Tutorial
B
ADDITIONAL TOPICS
Appendix Description
This appendix describes some of the advanced settings that exist in various
Desktop object editors:
Dynamic Aggregation
Prompt-in-prompt Functionality
Value-prompted Metrics
379
Additional Topics
Advanced Settings
Conditional Metrics: Embedding Method
Three embedding methods are available to you through the Advanced button
in the Condition pane of the Metric Editor:
These settings enable you to control how a report filter interacts with the
filter of a conditional metric. These settings are most relevant when you have
metric qualifications in both the report filter and the filter being applied to
the metric.
Business Scenario
You want to identify the top 10 items in terms of Revenue, but you have an
additional qualification for the top 5 customers in terms of Revenue. The first
qualification is defined in the report filter and the second is in a filter applied
to a metric.
You can change the following embedding methods to control the interaction
of these two filters and affect the report result set.
Additional Topics
This is the default setting. First, the report filter qualification is evaluated and
based on the intermediate result set, the filter on the metric is evaluated.
Using the above business scenario, the top 10 items based on Revenue are
identified. Then, the top 5 customers who purchased any of the top 10 items
is identified.
circles shown in the diagram above do not represent the
The
customers nor the items but rather the Revenue that was spent by the
top 5 customers and the Revenue that was spent on the top 10 items.
Also, notice that each patterned section of the circles can have a
completely different data set.
Advanced Settings
381
Additional Topics
In this case, the filter in the metric is evaluated first and based on this
intermediate result set, the report filter is evaluated. For example, first, the
Revenue spent by the top 5 customers is identified, and then the top 10 items
based on Revenue that was purchased by those customers is identified.
Additional Topics
Merge into new intersects the report filter with the filter in the metric. If you
choose this option, the result set returns the Revenue for the top 10 items and
the Revenue for the top 5 customers, whether or not the top 5 customers
purchased any of the top 10 items. Since the qualifications retrieve
completely different data sets, it is possible that the intersection of the two
qualifications produces an empty result set.
Advanced Settings
383
Additional Topics
Now, modify the report filter in design view and toggle the operator between
the two qualification from AND to OR. Run the report and notice that you get
the same result set rather than seeing all regions that have Revenue >
$4,000,000 other than Northeast and Mid-Atlantic. You get this incorrect
result set since the qualifications are merged, and both are included in the
SQL pass that resolves the metric qualification.
Example - Set Qualification Advanced Button
Besides affecting the report results, merging the qualifications reduces the
amount of data that is processed.
Additional Topics
Dynamic Aggregation
Dynamic aggregation is a function with OLAP Services which dictates the
behavior of reports that are aggregated within the Intelligent Cube. To
understand the purpose of the dynamic aggregation function, consider the
report below, which contains the attributes Region and Call Center, as well as
a metric, Average Revenue:
Example - Dynamic Aggregation
Consider what happens if you remove Call Center from the Report Objects
window. This type of modification is known as aggregation because Average
Revenue data aggregates to the Region level. This action requires new SQL to
be generated and results to be retrieved from the data warehouse.
Aggregations requiring SQL are normal aggregations.
Advanced Settings
385
Additional Topics
that Call Center has been removed from the Report Objects
Notice
window.
Example - New SQL Without Call Center on the Template
Now consider what happens to the metric values of Average Revenue when
you move Call Center to the Report Objects window (note that Call Center is
still a part of the report, though it is not displayed in the report view). This
action aggregates the metric values to the Region level without generating
new SQL; this is called dynamic aggregation.
When reports are dynamically aggregated, values for most metrics are simply
summed. However, in the report below, the MicroStrategy Engine is aware
that simply summing a metric that calculates averages produces erroneous
results (summing the average sales of call centers does not produce an
accurate average for its given region). Therefore, the MicroStrategy Engine
produces temporary null values for Average Revenue when it is dynamically
aggregated. By default, the temporary null values for such metrics are
replaced by -- on the report, as shown below:
Additional Topics
can change the default display of -- for temporary null values via
You
the Aggregation null values setting of Report Data Options.
The example uses a metric defined with the Average (Avg) function. The
MicroStrategy Engine produces temporary null values for dynamic
aggregation for many functions, including:
Average (Avg)
Count (Distinct=True)
Variance (Var)
Mode (Mode)
Advanced Settings
387
Additional Topics
You can change the dynamic aggregation function to any of the other
functions available in the Metric Editor. For example, you could change the
dynamic aggregation function for the Average Revenue metric to Average,
thus overriding the temporary null values.
To change the dynamic aggregation function for a metric:
Additional Topics
Advanced Settings
389
Additional Topics
Now consider the same scenario, except this time, the same result is achieved
through dynamic aggregation. Notice that in the illustration that follows, you
remove Subcategory from the report view (meaning, Subcategory remains in
the Report Objects window). No SQL is generated for the new report view.
Notice, however, that the values for Average Revenue for Books are incorrect.
The reason is that with dynamic aggregation, metric values are calculated
with information in the report cache (or Intelligent Cube), not against the
fact table in the data warehouse. Looking at the sales data, you know that the
correct figure for the Average Revenue for Books should be $30.00, not
$25.00.
dynamic aggregation function has been changed from Default to
The
Average for the Average Revenue metric below:
For the reasons stated above, you should use caution when changing the
dynamic aggregation function from Default.
Additional Topics
1 In the Prompt Generation Wizard, select Level prompt and click Next.
2 Click Add.
3 In the Select Objects window, add attributes to the Selected window and
click OK.
4 Click Next.
5 Enter a title and description, if desired.
6 Click Finish.
7 Save the prompt.
Advanced Settings
391
Additional Topics
Additional Topics
When you run the report, you select a start date and an end date for the time
period. These selections are captured with value prompts embedded within a
custom group element, as shown below:
Custom Group Definition Editor
The custom group elements display option is set to expand to show the
individual dates within the time period. This way, you see the overall Profit
and Profit Margin for the seven days as well as the Profit and Profit Margin
for each day. Every time you run or reprompt the report, you can select a
different time period.
Prompt-in-prompt Functionality
Prompt-in-prompt enables you to use the answer to one prompt to define
another prompt. To enable prompt-in-prompt, you must use attribute
element list prompts.
For example, you can create a prompt that filters on a certain list of
categories. This Category prompt is the inner prompt. You must answer it
before its dependent prompt, sometimes called the incomplete prompt, is
loaded. The dependent prompt presents a list only of the subcategories that
are in the categories you selected for the inner prompt. You create the
dependent, Subcategory prompt by embedding the Category prompt within
it.
Advanced Settings
393
Additional Topics
At report run-time, suppose you answer the inner prompt on Category with
Movies. The dependent, Subcategory prompt then loads with its attribute
elements filtered by Movies.
1 To create the inner prompt, open the Filter Editor and choose Add an
attribute qualification.
2 Select the attribute on which you want to qualify. For the example above,
choose Category.
3 In the Qualify on drop-down list, choose Elements.
4 In the Operator drop-down list, choose In list.
5 Click Prompt.
6 In the Prompt Generation Wizard, accept the defaults and click Finish.
7 Click OK.
8 In the Filter Editor, click Save and Close.
9 To create the dependent prompt, open the Prompt Generation Wizard
and under Filter definition prompt, select the Choose from an attribute
element list option.
10 Click Next.
11 Select the attribute on which you want to base the list of attribute
elements for the dependent prompt. For the example above, choose
Subcategory, and click Next.
12 Select the Use a filter to reduce the number of elements option and
select the inner prompted filter you created earlier.
13 Click Finish and save the prompt.
14 In the Report Editor, add the prompt to the filter definition pane.
Additional Topics
15 Run the report and observe how the inner prompt loads first. After you
answer the inner prompt, the dependent prompt loads, and its attribute
elements are filtered based on the answers provided for the inner prompt.
above example assumes that the inner prompt and dependent
The
prompt are based on attributes that have a direct relationship with
each other. Both, Category and Subcategory attributes belong to
the Product hierarchy. However, you may want to use
prompt-in-prompt with attributes that are not directly related. To
achieve this type of analysis, you need to use either a relationship
filter or a shortcut-to-a-report qualification filter.
Value-Prompted Metrics
You can add a value prompt to a metric expression to enable end-users to
determine how it will calculate at run-time. With value-prompted metrics,
you can answer a question like, What if I increased my sales by 15%? You
would enter 1.15 as your answer to the value prompt.
You define a value-prompted metric in the Metric Editor as follows:
Example - Value Prompted Metrics
Advanced Settings
395
Additional Topics
If you want to see the price of items if they all increased by 15%, a report with
this value-prompted metric might look like the following:
Result - Value-Prompted Metric
This simple example should give you an idea of the types of complex
questions you can ask and answer with multiple prompts embedded in
multiple metrics.
INDEX
A
Advanced Functions 85
advanced functions
date and time functions 93
N-tile 92
rank 91
round 91, 92
RunningSum, RunningAvg, MovingSum, MovingAvg 91
select examples 90
advanced subtotal
custom subtotals 96
advanced subtotals 96
user-defined subtotals 100
alias, metric
about 326
set 327
Analytical Engine 25
analytical functions 86
application objects 26
Apply functions
about 137
use 139
architecture
business intelligence 23
metadata database 25
source system 24
four-tier 29
three-tier 28
attribute join type 315
attributes
relationships 147
attribute-to-attribute filtering 127
B
band count 192
band for each distinct metric value 193
band size 192
banding points 192
banding, custom group 191
band count 192
band for each distinct metric value 193
band size 192
banding Points 192
base formulas
define 76
break by 144
business intelligence systems 23
397
Index
C
caches
overview of 31
calculation derived elements 259
conditional metrics 78
creating 78
embedding 402
filter elements 79
configuration objects 26
consolidation
Consolidation Editor 181
create 182-183
element
import 183
evaluation order
about 317
set 319
functions 179
multiple 320
row level math 179
count metric 87
create
conditional metrics 78
count metric 88
custom subtotal 99
derived elements using editor 270
intelligent cubes 210
intelligent cubes using reports 213
level metrics 57
nested metric 84
quick calculations derived
elements 266
quick group derived elements 264
stand-alone derived elements 274
transformation metric 73
user-defined subtotal 102
custom group
398
banding
about 191
band count 192
band size 192
banding points 192
create 195
create 188
Custom Group Editor
about 186
Definition area 187
elements 187
defining a 187
elements 187
SQL query 185
D
data warehouse 24
decision support system
architecture 23-26
data warehouse 24
four-tier 29
source system 24
three-tier 28
derived elements
about 253
all other 261
calculation 259
derived elements editor 268
filter 256
format 279
group 255
interaction
derived metrics 282
drilling 286
page-by 283
prompts 287
thresholds 284
view filters 280
standalone
create, share 274
type 255
derived elements editor 268
drill map
customizing 358
Editor 360
template unit 355
drill path
types 360
drilling
drill map
customizing 358
drill path
types 360
options
about 335
set 337
dynamic aggregation 232, 407
dynamic dates
about 132
create 133
evaluation order 134
E
evaluation order
about 317
set 319
F
filter
attribute-to-attribute 127
dynamic dates
about 132
create 133
evaluation order 134
import filter elements 135
Index
joint element
create 130
joint element list
about 129
metric qualification 142
merge attribute qualifications 405
metric qualifiers
break by 144
metric-to-metric 145
pass-through expression
create 139
relationship
about 148
create 151
report as filter 154
set qualification 147
filter derived elements 256
filtering 45
Filtering Set to None 55
filters
view filters 232
find and replace 373
export options 374
four-tier 29
four-tier architecture 29
functions
N-tile 92
overview 85
Rank 91
RunningSum 91
using 86
G
group derived elements 255
grouping 45
Grouping Set to None 51
Filtering Set to Absolute 52
Filtering Set to Ignore 54
399
Index
I
import filter elements 135
Intelligent Cube 207
intelligent cubes 207
concept 207
convert report into intelligent
cubes 213
create 210
publish 211
refresh using a schedule 214
sharing 208
J
join types
about 312
set, metric level 315, 324
set, report level 313
joint element filter
create 130
joint element list
about 129
L
level metrics
about 43-59
create 57
examples 46-56
review 60
target 44
400
M
metadata database 25
application objects 26
configuration objects 26
data types 26
schema objects 26
metric
alias
about 326
set 327
base formulas 76
conditional
embedding 402
filter elements 79
conditional metrics 78
create 78
remove related report filter
elements 79
count 87
embedding methods 402
evaluation order
about 317
set 319
functions
N-tile 92
overview 85
Rank 91
RunningSum 91
using 86
grouping 45
join types
about 312
set, metric level 315, 324
set, report level 313
level
create 57
examples 46-56
filtering options 45
grouping 45
target 44
nested metric 82
non-aggregatable
about 65
qualifier
about 142
break by 144
target 44
transformation
components 72
create 73
expression-based 70
table-based 71
types of 70
metric-to-metric filter 145
MicroStrategy Products 25
N
nested metric
about 82
create 84
non-aggregatable
about 65
null values 330
O
object display 328
P
page by 339
permissions, security
change 35
process 24
project documentation wizard 377
prompt
level prompt 413
value 417
Index
Q
Query Engine 25
query flow, report 30
R
relationship filter
about 148
create 151
report
caches 31
limits
define 309
set 311
row level math 179
security 34
report as filter 154
Report cache sharing 208
report data options 307
alias 326
attribute join type 315
drilling 335
find and replace 373
metric join type 312
null values 330
object display 328
page by 339
subtotals 324
report execution
query flow 30
report level 43
S
schema objects 26
security
permissions, change 35
report 34
server components 25
401
Index
T
target 44
template unit 355
three-tier architecture 28
Transformation 69
transformations
components 72
create 73
expression-based 70
table-based 71
types of 70
V
value prompt 417
view filter 232
view filters 232
derived elements 280
Metric Qualification Level 232
402