Microstrategy Advanced Reporting
Microstrategy Advanced Reporting
Microstrategy Advanced Reporting
Course Guide
Version: RPTADV-941-Mar14-CG
20002014 MicroStrategy Incorporated. All rights reserved.
This Course (course and course materials) and any Software are provided as is and without express or limited
warranty of any kind by either MicroStrategy Incorporated (MicroStrategy) or anyone who has been involved in the
creation, production, or distribution of the Course or Software, including, but not limited to, the implied warranties of
merchantability and fitness for a particular purpose. The entire risk as to the quality and performance of the Course
and Software is with you. Should the Course or Software prove defective, you (and not MicroStrategy or anyone else
who has been involved with the creation, production, or distribution of the Course or Software) assume the entire cost
of all necessary servicing, repair, or correction.
In no event will MicroStrategy or any other person involved with the creation, production, or distribution of the Course
or Software be liable to you on account of any claim for damage, including any lost profits, lost savings, or other
special, incidental, consequential, or exemplary damages, including but not limited to any damages assessed against or
paid by you to any third party, arising from the use, inability to use, quality, or performance of such Course and
Software, even if MicroStrategy or any such other person or entity has been advised of the possibility of such damages,
or for the claim by any other party. In addition, MicroStrategy or any other person involved in the creation, production,
or distribution of the Course and Software shall not be liable for any claim by you or any other party for damages
arising from the use, inability to use, quality, or performance of such Course and Software, based upon principles of
contract warranty, negligence, strict liability for the negligence of indemnity or contribution, the failure of any remedy
to achieve its essential purpose, or otherwise.
The Course and the Software are copyrighted and all rights are reserved by MicroStrategy. MicroStrategy reserves the
right to make periodic modifications to the Course or the Software without obligation to notify any person or entity of
such revision. Copying, duplicating, selling, or otherwise distributing any part of the Course or Software without prior
written consent of an authorized representative of MicroStrategy are prohibited.
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, Tysons Corner, Virginia
22182. Rights are reserved under copyright laws of the United States with respect to unpublished portions of the
Software.
Copyright Information
Trademark Information
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, 7,970,782, 8,005,870, 8,051,168, 8,051,369, 8,094,788, 8,130,918,
8,296,287, 8,321,411 and 8,452,755. Other patent applications are pending.
How to Contact Us
Course Description
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, you will learn about using Report Data Options features to customize
reports and work 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 Developer.
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:
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 174)
Define all of the Report Data Options and understand how to enable
them. (Page 302)
Describe the purpose of drill maps in reporting. Create and edit drill
maps. (Page 352)
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.
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:
Code
Sum(Sales)/Number of Months
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:
Keyboard Keys
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:
Heading Icons
The following heading icons are used to indicate specific practice and review
sections:
Precedes Exercises
MicroStrategy Courses
Core Courses
Implementing MicroStrategy: Development and Deployment
Advanced Courses
MicroStrategy Administration: Configuration and Security
All courses are subject to change. Please visit the MicroStrategy website
for the latest education offerings.
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:
Lesson Objectives
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 29)
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 Developer
MicroStrategy Architect
MicroStrategy Web
MicroStrategy Office
MicroStrategy SDK
MicroStrategy Mobile
MicroStrategy Cloud
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.
Basics of Reporting
A filter specifies the conditions that the data must meet to be included in the
report results. You can create filters separately using the Filter Editor, or you
can create them on the fly in the Report Editor.
A view specifies the portion of the full report result set that is initially
displayed to the user. A report may contain two attributes and two metrics,
but the view or template that the end-user sees may contain only one of the
original attributes and one metrics. Additionally, a report filter may contain
data for the entire East region, but you can use a view filter to further restrict
the data that is displayed.
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. Developer gets the result set from
Intelligence Server and then formats it for display in the Developer interface.
Similarly, MicroStrategy Web retrieves the result set from Intelligence Server
and formats it for display in a Web browser.
The following illustration and table describe, at a high level, the major steps
involved in executing a report in a three-tier environment:
Report Execution Query Flow
Step Process
3 The Intelligence Server Bus 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 9.
Step Process
4 If no valid cache exists for the report, the Intelligence Server Bus
obtains the report definition and application objects from the
metadata using the Metadata Server.
6 The Intelligence Server Bus sends the SQL to the Query Engine.
7 The Query Engine sends the SQL to run against the data
warehouse and the report results are returned to the Intelligence
Server Bus.
For reports with prompts, before step 3, Intelligence Server sends the
request back to the user to obtain prompt answers. After the user
provides the prompt answers, Intelligence Server continues with the
remaining steps.
Caches are created only when you save and close a report and execute it. It is
not sufficient to execute the report from Design View.
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.
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.
Re-executing a Report
You can re-execute every report you run in Developer 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.
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.
4 In the Select Users and Groups window, select the user or user group.
You may need to select the Show users check box to see the
members of the group in the list.
5 Click OK.
While users may have permissions to write or edit an object, they are
not able to do so if they do not also have the privilege to use the editor
for that object. Only the administrator can assign privileges to use the
different object editors. For more information about assigning
privileges, see the MicroStrategy Administration: Configuration and
Security course.
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.
Lesson Summary
In this lesson, you learned the following:
The report execution query flow is the process by which Developer 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 Description
In this lesson, you will 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?.
Lesson Objectives
After completing the topics in this lesson, you will be able to:
Save base formulas for reuse in creating other metrics. (Page 76)
Define custom subtotals to use different naming conventions for totals and
create user-defined subtotals that use nonstandard subtotal
functions. (Page 94)
Level Metrics
By default, all metrics calculate at the report level, which means that the
attributes on the report template dictate the level at which the metric
calculates. However, you may specify any attributes as the calculation level of a
metric. The metric-specified attribute levels override the default report level.
Target
Grouping
Filtering
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.
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:
The filtering setting only applies to filtering criteria that are related to
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
and there is a direct relationship between the target attribute and the
report filter.
Solution
2 Create a level metric using the Revenue fact and set the target to Region.
4 Create a report with Region, Call Center, and the first and the third metrics.
Business Scenario
Your company has recently kicked off a new advertising campaign targeted at
certain high-growth opportunity areas. In your regions, the high-growth areas
are the Boston, New York, and Washington, DC, call centers, so you need to
focus your analysis on these areas. One of your requirements is to see how the
revenue for each of these areas compares to the other areas in its region.
When you select Standard filtering, all of the report filter elements are applied
to the calculation of the metric. In the report SQL, the report filter is evaluated
in the WHERE clause of the SQL pass that calculates the metric.
In the business scenario, the value for the Regional Revenue level metric for
the Mid-Atlantic region includes revenue only for the Washington, DC call
center. The metric calculates this way because the Washington DC call center is
the only call center in the Mid-Atlantic region that is included in the report
filter. Also, because you are using Standard grouping, the Regional Revenue
metric calculates at the target attribute level of Region. The following image
shows the report with values for the level metric with Standard filtering:
Regional RevenueFiltering Set to Standard
Ifdimensionality
you include the totals for the Regional Revenue level metric, they are
aware and display the correct figures.
All SQL examples in this lesson use Microsoft Access 2007 SQL
syntax.
Using the same business scenario, if you select Absolute filtering, the Regional
Revenue level metric calculates only for those regions that have at least one call
center present within the report filter. Unlike Standard filtering, the Regional
Revenue is the total of all call centers within that region, not just the call
centers included in the report filter. Grouping continues to occur at the target
attribute level of Region since the grouping option is set to Standard. The
following image shows the report with values for the level metric with Absolute
filtering:
Regional RevenueFiltering Set to Absolute
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)
When you select Ignore filtering, the report filter elements that are directly
related to the target attribute are not included in the WHERE clause of the SQL
pass that calculates the metric.
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 the
level metric with Ignore filtering:
Regional RevenueFiltering Set to Ignore
Business Scenario
You now want to perform an analysis that is similar to the previous example
but with a slightly different perspective. For example, you may want to analyze
the following questions:
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.
With grouping set to None, the metric does not group by the target attribute or
any child attribute directly related to the target attribute specified within the
level metric. Therefore, in this particular example, there is no GROUP BY
clause in the SQL pass that calculates the metric. With filtering set to Standard,
the report filter elements are included in the WHERE clause.
The None grouping option applies only to the target attribute specified in the
level metric or attributes that are related as children of the target. If the
following report also contained the Year attribute, the report SQL would still
include a GROUP BY clause. The GROUP BY clause would contain Year since
the Year attribute is not directly related to the metric target of Region. The
GROUP BY clause would not contain Call Center or Region since Call Center is
a child of Region and Region is the target of the metric.
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
With Grouping set to None, the metric does not group by anything directly
related to the target attribute specified for the level metric. Since the only
attributes on the report are related to the target, there is no GROUP BY clause
in the SQL pass that calculates the metric. When filtering is set to Absolute, the
level metric is resolved in multiple passes of SQL. The report filter is present in
the WHERE clause of the first SQL pass.
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 the level
metric with Absolute filtering:
Regional RevenueFiltering Set to Absolute
With filtering set to Ignore, all the report filtering criteria directly related to the
target attribute are ignored, and the MicroStrategy Engine automatically
removes the related report filtering criteria from the WHERE clause of the SQL
pass that calculates the metric. With grouping set to None, the level metric also
does not display any grouping on the report since the only attributes on the
report are directly related to the target of Region.
Using the same business scenario, the Regional Revenue metric calculates the
total company revenue for all call centers in all regions, not just the three call
centers that are included in the report filter. The following image shows the
report with values for the level metric with Ignore filtering:
Regional RevenueFiltering Set to Ignore
You typically use the None filtering option in combination with the None
grouping option. The None filtering option enables you to specify the fact table
that you want the MicroStrategy Engine to use to calculate a metric. You add as
many target attributes as necessary to the metric to force it to calculate against
a specific fact table. Any target attribute set to the None filtering option
borrows its filtering criteria from the other target attributes specified in the
dimensionality of the metric, enabling you to choose the fact table without
altering the original intent of the report.
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 the level metric
with None filtering:
Regional RevenueFiltering Set to None
The SQL statements for these metrics look like the following:
3 In the Object Browser, drag the desired target attributes to the Level
(Dimensionality) pane.
Incalculates
general, you should retain the Report Level target, so the metric
at the report level for any attributes on the template that
are not related to your other target attributes.
Business Scenario
You want to compare the revenue performance of certain targeted areas to the
revenue of the entire company for all time.
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.
Ifattributes,
specific filtering behavior is required, you need to add other target
but you should always select None grouping.
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
If you want to achieve the same result set by defining your level metric with the
Report Level target still present, you need to define the level metric as follows:
Level MetricOne Attribute from All Dimensions
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.
Review: Level Metrics
Identify the target, filtering, and grouping for the level metrics in the following
reports.
_______________________________________
_______________________________________
_______________________________________
_______________________________________
_______________________________________
_______________________________________
_______________________________________
_______________________________________
_______________________________________
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?
_______________________________________
_______________________________________
_______________________________________
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
Solutions for Image with Various Level Metrics
A Absolute None
C Ignore None
E Standard None
F Standard Standard
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 that calculates the sum of sales across all
regions, considering only the regions represented by the call centers in the
report filter. On your template, you have 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 2010, considering only the call centers that are included in the
report filter. The template contains the Region and Call Center attributes
and the metric.
_______________________________________
_______________________________________
_______________________________________
3 You would like to create a metric to calculate the sum of profit for 2009
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.
_______________________________________
_______________________________________
_______________________________________
Review Solutions:
1 Target: Region
Filtering: Absolute
Grouping: None
2 Target: Region
Filtering: Standard
Grouping: Standard
Non-aggregatable 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)
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.
Transformation Metrics
You can apply any transformation to the definition of a metric, and you can
apply multiple transformations to a single metric.
Types of Transformations
There are two types of transformations:
Expression-Based Transformations
For example, you might create a Last Quarter or Last Month transformation
using QUARTER_ID-1 or MONTH_ID-1 respectively.
This method works only if you store your data in a format conducive to
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)
Table-Based Transformations
Transformation Components
All transformations have the following components:
Aexpression-based
single transformation can use a combination of table-based and
transformations. For example, you might create a
Last Year transformation based on the Year, Month, and Day
attributes. Year might be based on the expression Year_ID 1,
but Month and Day might be table-based transformations because
their IDs are not conducive to expression-based transformations.
Member tablesThese tables store the data for the member attributes.
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:
1 In the Metric Editor, in the Definition pane, define the formula for the
metric.
3 In the Object Browser, drag the predefined transformation object you want
use to the Transformations pane.
The following image shows the transformation metric in the Metric Editor:
Metric EditorTransformation Pane
2 In the report window, select the header of the metric on which you want to
base your transformation metric.
For each transformation metric, you can select what you want to
calculate:
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.
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 drag base formulas from the Object Browser to the
Definition pane when you create a new metric.
The expression to create a base formula cannot have more than one
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.
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.
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 2011 revenue
regardless of the filter on the report. You can create a conditional metric that
ignores the report filter and calculates all 2011 revenue.
While you can only apply one filter to the definition of a metric, that single
filter can contain multiple filtering conditions.
2 In the Object Browser, drag the filter you want to use to the Condition pane.
You can change this behavior so that the related report filter elements are not
ignored. In the previous example, changing the default behavior causes the
September Revenue metric to calculate revenue only for September 2011. To
change the default behavior, you need to clear the Remove related report filter
elements check box, which is shown in the following image:
Conditional MetricsAdvanced Options
The Embedding method options control how a report filter and metric
filter interact when both filters qualify on metrics. For more information
on this setting, see Conditional Metrics: Embedding Method starting
on page 400.
Ifmerged
you use a view filter on a report, the view filter conditions are
with the conditional metric.
To change how a metric condition interacts with related report filter elements:
When you enable the Remember option setting, the current state
of the Remove related report filter elements check box (enabled or
disabled) is saved as the default setting for all future conditional
metrics. However, you can still manually change the Remove related
report filter elements setting at any time.
4 Click OK.
Clearly, the metrics on the report on the left ignore the related report filter
element, Year = 2011. This behavior is the default for conditional metrics when
you select the Remove related report filter elements check box.
Nested Metrics
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).
In this example, note how the metric has an inner formula, Sum(Revenue) at
the Employee level, and an outer formula that takes the Average of the inner
formula for each Region.
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
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.
For example, the nested metric from the earlier example has the
following syntax: Avg(Sum (Revenue) {~, Employee}) {~,
Region}. In this formula, Revenue is a fact, not a metric.
2 Click Validate.
Iflevel,
you want the outer formula of the metric to calculate at the report
you can create the nested metric as a compound metric. For
example, you define a metric as Sum(Revenue) with a target of
Employee. You use this metric as the inner formula of a second metric
that uses another aggregate operator (AVG) and the default Report
Level target. The compound metric would be defined as follows:
Avg(Employee Revenue) {~, Report Level}.
Advanced Functions
All of the built-in functions that MicroStrategy provides are stored in the
Schema Objects\Functions and Operators folder.
Metric EditorFunctions and Operators Folder
1 In the Metric Editor, in the Object Browser, browse to the Functions and
Operators folder.
3 In the Object Browser, drag the desired metric that you want to use between
the parentheses of the function or operator in the Definition pane.
7 Click OK.
Another way to access the functions and operators (as well as their parameters)
is through the Insert Function Wizard. This wizard takes you through the
process of defining a metric formula. You access the wizard by clicking the f(x)
button on the toolbar of the Definition pane:
Metric Editor Insert Function Wizard
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.
1 In the Metric Editor, in the Object Browser, browse to the Basic Functions
folder.
3 In the Object Browser, drag the attribute between the parentheses of the
Count function in the Definition pane.
Asattribute,
an alternative to selecting the Count function and then the
you can just drag the desired attribute to the Definition
pane. The Count function is the default for attributes.
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.
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.
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.
1 In the Metric Editor, validate the syntax for the count metric formula.
6 Click OK.
Rank
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.
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
might 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.
For example, suppose you want a report that shows dates, sales, and
month-to-date sales. You can define the Month-to-Date Sales metric as
RunningSum(Sales)<Sort Ascending by Date>. There are many
similar OLAP functions, such as RunningAvg, MovingSum, and MovingAvg.
Round
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:
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
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.
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
The following table lists some of the available date and time functions:
Date and Time Functions
Function Description
Function Description
YearEndDate Returns the date of the last day of the year in which
the date or timestamp occurs
YearStartDate Returns the date of the first day of the year in which
the date or timestamp occurs
For a complete list of date and time functions, see the MicroStrategy
Functions Reference product manual.
For example, to determine the number of months between two specific dates,
you can create the following metric:
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, the result looks like the following:
Date and Time Function Example
The report was executed on June 17, 2013, so the MonthsBetween function
calculates the number of months between this date (the current date) and the
hire date for each employee.
Advanced Subtotals
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
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
#P The name of the attribute to the left of or above the attribute under which
the subtotal displays
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.
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.
9 Under Applied levels, set the levels at which you want to display the custom
subtotal and click OK.
The icon for a custom subtotal is different from the icon used for
standard subtotals.
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
Nested functions
Dimensional subtotals
Other metrics
The following report includes a user-defined subtotal called Last Quarter that
shows the number of units received for each product category in the last
quarter of 2012:
Example - User-defined Subtotal
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.
2 In the Subtotal Editor, in the Object Browser, drag the desired function for
the subtotal to the Definition pane.
6 Click OK.
8 Open any metric to which you want to apply the new subtotal with the
Metric Editor.
11 Click the > button to move the subtotal to the Available subtotals for metric
list.
13 Create or edit the report on which you want to display the user-defined
subtotal in the Report Editor.
15 In the Subtotals window, on the Definition tab, select the check box for the
user-defined subtotal.
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.
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.
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.
Rank, RunningSum, Round, Ntile, and date/time functions are some of the
built-in functions available in MicroStrategy.
You can create custom subtotals to control the display of subtotals on your
reports. You define custom subtotals at the report level.
Exercises: Advanced Metrics
For this and all subsequent exercises in this course, you should connect to the
MicroStrategy Analytics Modules project source that points to the latest
metadata and save your work to the My Reports folder under the My Personal
Objects folder. You may want to create additional subfolders for each of the
exercise sections throughout this course.
Given that this course targets more advanced users, the exercises
typically provide only high level steps. See your instructor for further
assistance.
4 In the right pane, under Dynamic Sourcing, clear the check box next to
Enable Dynamic Sourcing.
5 Click OK.
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:
Category Sales
Definition: Sum(Revenue)
For this metric, and all subsequent level metrics, be sure to use the
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
For this percent contribution metric and all others in this set of
exercises, use the Revenue metric, not the Revenue fact, as the
numerator. Also, be sure to format the metric as a percentage with 2
decimal places.
Apollo 13, Lethal Weapon 4, Ferris Buellers Day Off, The Wedding
Singer, Titanic
5 After viewing the results of your report, note what each metric is
calculating.
______________________________________
______________________________________
Solution:
Definition: Sum(Revenue)
Filtering: Standard
Grouping: None
Definition: Sum(Revenue)
Level: Item
Filtering: Ignore
Grouping: None
4 After viewing the results of your report, what if you want to analyze the
same items, but now you want to see how each item contributed to the total
sales of the three subcategories to which they belong. What will be the
Target, Filtering and Grouping of Subcategory Sales for Selected Items
metric?
______________________________________
______________________________________
Solution:
Definition: Sum(Revenue)
Filtering:
Subcategory: Absolute
Day: Ignore
Grouping:
Subcategory: Standard
Day: None
You will need to format this compound metric as a percent with two
decimal places.
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:
Level: Month
Filtering: Standard
Grouping: Ending(Fact)
2 Create a report with Item, Inventory EOH, and the Various Movies report
filter.
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:
Definition: Sum(Revenue)
You will need to format this compound metric as Currency with zero
decimal places.
2 Create a report with Item, Revenue, Last Years Revenue, the Various
Movies report filter, and an additional Year 2012 report filter condition.
Solution:
4 Create a report with Year, the three metrics you just created, and an
Electronics category report filter condition.
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?
_______________________________________
_______________________________________
To observe the effects of the Remove related report filter elements setting, you
need to edit the definition of the report filter.
1 Open the report you created above with the Report Editor. Modify the
report filter by adding a second condition so that the report qualifies on two
specific customer states: California and New York. Remember to keep the
Electronics condition.
2 Re-execute the report and observe the results. Did the report return
different data?
3 Next, edit the East US Customer Profit metric with the Metric Editor. In the
Condition definition window, click Advanced.
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 2012. The first few rows of your report should resemble
the following:
Solution:
Definition: Count(Item)
For this metric, use the Item attribute (not the Item metric) in the
formula.
Count parameters:
Distinct = False
Null = False
UseLookupForAttributes = True
Tometric
access the count parameters, highlight the Count function in the
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 2012.
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?
Overview
Create a new metric using the OLAP function, RunningSum. This metric shows
the running total of Revenue by monthly sales. The report should look like the
following:
Solution:
5 Run the report. Compare your results to the expected report in the
Overview section at the beginning of this exercise.
6 Save the report to the My Reports folder as Running Totals For Monthly
Sales.
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.
Optional Advanced Exercises
The following exercises are optional and are meant to challenge your
knowledge of the concepts covered in this lesson. They do not include
step-by-step instructions. Instead, they outline a list of report requirements
and suggest features or functionality that you should include in the report to
satisfy the requirements.
Report Requirements:
Revenue by month
Percentage of revenue for each month to the total for all years (all time) in
the data warehouse
You need to set the Output Level of the metric qualification to the
Customer Region attribute.
The first few rows of your final report should look as follows:
Report Requirements:
You need to change the default sort order and set the Break By
parameter to achieve the appropriate results.
Advanced sorting
Report filter of Units Sold > 25,000 and Category=Books, Movies, or Music
Advanced Metrics Exercise Solutions
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
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.
Lesson Objectives
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 139)
Attribute-to-Attribute Filtering
5 In the Qualify On drop-down list, select the attribute form on which you
want to qualify.
8 Drag the comparison attribute into the text box to the right of the Value
drop-down list.
9 To change the attribute form, simply replace the ID string with the name
of the desired form. Complete the expression as necessary (for example,
Date@ID + 2).
10 Click OK.
For example, if you choose the attributes Year and Region, you can create a
filter using a joint element list that filters on element pairs of those
attributes:
A joint element list enables you to create filters with attribute pairs as well as
triplets, quadruplets, and so on.
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 Add to add element lists of the selected
attributes.
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.
11 Click OK.
Dynamic Dates
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.
Ifonyouthearesystem
working in a 2-tier environment, dynamic dates are based
clock of the client machine that runs Developer.
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:
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.
4 In the Open window, select an attribute with a date datatype and click
OK.
6 In the Operator drop-down list, select the appropriate operators and click
Date Editor.
8 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.
You can import filter elements into the Filter Editor from sources other than
MicroStrategy. In the MicroStrategy Developer: 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.
You can use a prompt to enable users to select the file from which to
import at run-time.
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.
2 Text
Tab-delimited
Return-delimited
4 For Qualify On, select the attribute form on which you want to qualify.
6 Click Import.
8 The elements that exist in the file are imported into the List box. Click
OK.
Pass-through Functions
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.
The purpose of this topic is not to make you an expert on how to use
pass-through functions. Rather, this topic introduces you to the
concept and gives you some examples where pass-through functions
can be used to create filters. Please refer to the Analytical Functions
Reference manual for additional information.
where:
For example:
ApplyComparison("#0=trunc(sysdate-1)",Day@ID)
OR
ApplySimple("Mid(#0,5,2)",Month@ID) = 12
Filter Examples
To create a filter for current month using ApplySimple and a Microsoft SQL
Server databaseTM:
The above expression uses ApplySimple to let Intelligence Server know that it
needs to pass the datepart function directly to the SQL Server database.
InExample
Example 1, MicroStrategy objects are not used, so y is set to zero. In
2, shown below, you will see an example of a database
function that uses a MicroStrategy object.
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:
ApplyComparison("#0 is NULL",Day@ID)
In this example, you see the Day attribute used in the functions formula. #0
is used as a place-holder for the Day attribute. That attribute displays as the
argument for the ApplyComparison function.
Insyntax
a function that uses multiple MicroStrategy objects, the general
for Apply functions is as follows:
ApplyFunc(...#0...#1...,FirstObject,SecondObject)
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.
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.
When you define output level in a metric qualification filter, you can choose
from the following options:
Set Output Level
Calculate the output at the Metric levelMetric 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.
Incalculates
a case where you qualify on a simple metric, like Revenue, which
at the report level by default, the default output level
behaves the same as the report output level. In both cases, the
metric evaluates to the lowest attribute levels on the report
template.
Calculate the output for the list of attributesWith 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
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.
8 Drag the comparison metric into the text box next to the Value drop-down
list.
You add only one metric on which to base the comparison. However, it
is possible to create an expression-based metric comparison. For
example:
For the above comparison, the procedure is the same, except that you
need to select Custom from the Value drop-down box. You can then
drag the desired metric and enter the rest of the expression.
For example, the Customer and Date attributes have no relationship to one
another unless a customer purchases something on a certain date. Thus, the
Customer and Date attributes are only related through the Revenue fact, in
whichever fact tables the Revenue fact is stored.
One of the most common uses for relationship filters is to achieve product
affinity analysis, or market basket analysis. Affinity analysis is popular
among companies that need to identify the relationship between two
products. If one product is sold in conjunction with another product in the
same basket (or order/transaction) and if this situation often occurs, then
both products hold a high affinity. Contrarily, when two products are rarely
sold together, they have a low affinity.
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.
The image below shows the Filter Editor 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
Itrelationship
is also possible to nest relationship filters. In other words, a
filter can be used as the filter qualification in another
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.
For example, your data warehouse might have fact tables that contain the
Customer (output level) and Item (filter qualification) attributes and the
Revenue fact at the Year, Month, and Day levels. When you choose the
Revenue fact for your Relate by option, the MicroStrategy Engine
automatically chooses the fact table that contains Revenue data and is best
suited given the attributes on the report template.
On the other hand, if you choose a specific fact table for your Relate by
option, you force the MicroStrategy Engine to use that particular fact table to
establish the relationship between your output level and your filter
qualification.
5 In the Level window, add attributes from the Available objects window to
the Selected objects window and click OK.
You can also create a new filter qualification by clicking the Create
button.
7 In the Open window, browse through the folders to select a filter and click
OK.
8 In the Relate By drop-down list, select the table or fact to relate the output
level and filter qualification attributes. As mentioned earlier, if you select
the system default, the MicroStrategy Engine uses the project schema to
determine how to relate the filter qualification and output level. Most
often, you want to select a table or a fact by which to relate the filter
qualification and the output level. Click OK.
9 Click the Advanced button. Depending on the results you want to see on
your final report, select or clear the Also apply this qualification
independently of the relationship filter option.
The advanced option in the Filter Editor can affect the final report result for a
report that has one or more relationship filters. For example, the following
report that displays the customers who purchased two particular books: To
Kill a Mockingbird and The Old Man and the Sea. If the advanced option is
cleared for each of the relationship filters that correspond to each book, you
retrieve the following result set:
Relationship Filter - Advanced Option Cleared
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.
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.
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.
Exercises: Advanced Filters
Attribute-to-attribute Filtering
You want to determine the customers who have benefited from improved
efficiencies in your shipment process and their current profitability. Since
improvements began in October 2012 for the Books category, you can start by
analyzing book orders in November 2012. The goal is to ship out at least 50%
of all orders for books within 4 days of their order dates. Design the following
report:
Solution:
1 Create a report that contains the attributes and metrics shown above.
2 Define the local report filter as Month = November 2012 and Category
= Books and (Ship Date_ID < [Day_ID + 4]).
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:
Your final report result may have more information, depending on the
attribute forms selected for display.
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.
_______________________________________
_______________________________________
3 Explain why this is the correct approach for your report requirement:
_______________________________________
_______________________________________
Solution:
1 Create a new report named Special Sales with a template exactly like the
one shown at the beginning of this exercise.
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.
ToNotepad.
open Notepad, go to Start > All Programs > Accessories >
3 Create the following report by importing the filter elements from the
Promotions.txt file you just created.
Solution:
Click Import.
Browse to the text file created earlier in this exercise. Select it and click
Open. Click OK.
2 Use this filter on a report with Customer and Revenue on the template.
Dynamic Dates
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.
This exercise requires you to subtract two years for each dynamic date
qualification because the Tutorial data warehouse only contains data
for the years 2010, 2011,2012, and 2013. 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 November 25, 2013 as the current system date.
Solution:
Qualify on ID.
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 check
box, 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
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:
3 Create a metric to count Customers and apply the filter created in step 1.
4 Create a second metric to count the customers and apply the filter created
in step 2.
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?
_______________________________________
_______________________________________
1 Create a report that determines the top two sales without adjusting the
Output Level. Why doesnt this report result satisfy your requirements?
_______________________________________
_______________________________________
_______________________________________
Solution:
1 Create a new report named Top 2 Categories with a template exactly like
the one shown at the beginning of this exercise.
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:
Select Value.
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:
You can create a new filter for the filter qualification directly within
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.
Again, you can create the filter for this item directly within the
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.
Optional Advanced Exercises
The following exercises are optional and are meant to challenge your
knowledge of the concepts covered in this lesson. They do not provide any
step-by-step instructions. Instead, they outline a list of report requirements
and suggest features or functionality that you should include in the report to
satisfy the requirements.
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:
Your report results may vary from the example above due to the fact
that the Customer Age attribute is a derived attribute that is calculated
based on the current system date of your computer.
Report Requirements:
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
When you choose to view the Books category, your final report results
should look like the following:
Report Requirements:
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:
Advanced Filter Exercise Solutions
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.
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.
Lesson Objectives
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 182)
Consolidations
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.
Consolidations provide two powerful functions that can help satisfy unique
reporting needs. These two functions are:
Of course, you could also add a Seasons attribute to your Time hierarchy.
However, it is generally best to have the project architect add an attribute.
This person knows how to define the attribute properly and associate it with
the proper tables in the data warehouse. Sometimes, modifying the data
model is not always an option either. The benefit of consolidations is that
they enable you to avoid changing the data model.
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)
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.
3 In the Object Browser, locate the attribute element that you want to
include in your consolidation element and drag it into the expression
window.
You can also import consolidation elements from other consolidations in the
project.
3 Click Open.
2 In the Format Cells window, specify the formatting for the element
headers or values and click OK.
You can also specify whether or not to show subtotals for the consolidation
elements of a consolidation.
Tochange
ensure that the subtotals are the correct values, you may need to
the Subtotals over Consolidations Compatibility VLDB
property. VLDB properties are covered in depth in the MicroStrategy
Engine Essentials course.
Custom Groups
For example, in the special promotions business scenario, you want to be able
to view your 10 best customers along with your 5 worst products. You are
essentially asking for two different report result sets, but you want them to be
displayed on the same report. To do this, you can create a custom group with
two custom group elements. Each custom group element has a different filter
qualification applied to it. In this case, the first custom group element is a
rank of Revenue for the top 10 customers, and the second custom group
element is a rank of Revenue for the bottom 5 items.
The Custom Group Editor is similar to the Filter Editor. This is not surprising
because custom groups are very closely related to filters. The difference is
that 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.
The Custom Group definition area displays the custom group element
headers and their associated qualifications. From this area, you can access
the following panes:
Custom Group element headerused to name the custom group element
The advanced qualification is not displayed by default. You can enable this
option by following the steps below:
5 Click OK.
In the Object Browser, drag and drop a filter onto [Add Qualification]
OR
IfBrowse
you create a metric qualification, for Output Level, click the
(...) button. In the Level window, add the attribute level at
which the metric qualification should apply to the Selected objects
window. Click OK.
Each custom group element within a custom group can have different display
options. The display options vary from displaying only the custom group
element header to showing all the detailed items in the custom group
element. The following options are available:
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.
2 In the Choose a display option window, select one of the available options.
3 Click OK.
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.
3 Click OK.
3 Under Currently defined sorts, in Sort by list, select the custom group and
specify the sort criteria and order as usual.
4 Click OK.
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
In the example report earlier, the creator used the band size method (Start at:
$1, Stop at: $4000, Step size: 400):
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.
5 Click OK.
6 For Metric, select a metric on which to base the custom group banding.
7 For Band on, use the drop-down menu to select how you want to band:
Metric Value, Rank, or Percent.
8 For Banding type, select how you want to create your bands: Band Size,
Band Count, Banding Points, and Band for each distinct metric
value.
9 Based on the banding type you select, set the corresponding properties.
10 Click Level.
11 In the Level window, in the Output tab, add the appropriate attribute level
at which you want to band and click OK.
12 Click OK.
13 To customize the display of the band names, right-click the custom group
element and select Show Band Names Editor.
14 In the Band Name Editor, click Add to add new band names and Edit to
rename existing band names.
15 Click OK.
Examples Seasons consolidation that groups Custom group that displays Top 10
specific months of the year into Customers and Bottom 5 Items
different seasons
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.
Exercises: Consolidations and Custom Groups
Unfortunately, your data warehouse does not store data at the defined
regional level. A customer area attribute does not exist for you to place on the
report template. You need to create a customer area consolidation using the
Customer Region attribute to define the consolidation elements.
Solution:
Solution:
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.
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.
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, using the steps below:
1 In the Custom Group Editor, start by creating a custom group called All
Customers.
Metric = Revenue
Band on = Percent
For Banding points, enter the following band names and their points.
Level = Customer
3 Create a report with the custom group you created above and the Revenue
metric.
Optional Advanced Exercises
The following exercises are optional and are meant to challenge your
knowledge of the concepts covered in this lesson. They do not provide any
step-by-step instructions. Instead, they outline a list of report requirements
and suggest features or functionality that you should include in the report to
satisfy the requirements.
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.
Report Requirements:
Your report results may vary from the image below because the
Employee Experience attribute calculates tenure based on the
current system date:
Lesson Description
Lesson Objectives
After completing the topics in this lesson, you will be able to:
Intelligent Cubes
Rather than returning data from the data warehouse for a single report, you
can return sets of data from your data warehouse and save them directly to
Intelligence Server memory. You can then build multiple reports that gather
data from the Intelligent Cube instead of querying the data warehouse. The
reports accessing Intelligent Cubes can use all of the OLAP Services features
for analysis and reporting purposes.
MicroStrategy OLAP Services Intelligent Cube
You create Intelligent Cubes and publish them as a shared data source from
which users can build reports. Intelligent Cubes provide the fast response
time and analytic calculations that are often associated with
Multidimensional Online Analytic Processing (MOLAP) cubes. They also
provide the ability to use Relational Online Analytic Processing (ROLAP) by
drilling into the full set of data outside of the Intelligent Cube.
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.
Intelligent Cubes act as a set of data to which other reports can connect and
use OLAP Services to report, analyze, and display data. There is no need for
Intelligent Cubes to contain objects that modify the display of data. The
display of data is handled by the reports that access the Intelligent Cube.
Building an Intelligent Cube is similar to building a report. You can add data
to your Intelligent Cube by including objects such as attributes, metrics,
filters, and so on as report objects or report filters.
Example - Intelligent Cube
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 Developer, on the File menu click New and select Intelligent Cube.
2 In the New Intelligent Cube window, select Empty Intelligent Cube and
click OK.
You can also create an Intelligent Cube that contains data from an
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.
Ifrestricted
you create a filter on an Intelligent Cube, any data that is
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.
5 Click Save and close to save the Intelligent Cube and close the Report
Editor.
The following list of objects and features cannot be included in the definition
of Intelligent Cubes as they can be for reports:
You can convert an existing report that contains a set of required objects, into
an Intelligent Cube. Creating an Intelligent Cube by converting a report
enables you to view the set of data you are including in your Intelligent Cube.
With this method you can verify that you have the set of data you want, rather
than just the required report objects, before you publish it as an Intelligent
Cube.
When you convert a report to an Intelligent Cube, some parts of the report
are not included in the resulting Intelligent Cube. Intelligent Cubes are not
used for the same display and analysis purposes as a report. Intelligent Cubes
simply act as a sharable set of data. Therefore, when a report is converted
into an Intelligent Cube, some of the display and analysis features are no
longer necessary.
2 In the Report Editor, from the Data menu, point to Intelligent Cube
Options and select Convert to Intelligent Cube.
Ifconverting
you save the Intelligent Cube using the same name after
a report to an Intelligent Cube, the original report is
lost. To keep the original report, select Save As and save the
Intelligent Cube using a different name than the report.
For further explanation about optimal cube sizes and best practices
recommendations, refer to the MicroStrategy Administration:
Configuration and Security course.
While you are creating or modifying an Intelligent Cube, you can schedule
when an Intelligent Cube should be re-executed against the data warehouse
to refresh its data. For example, you can schedule to re-execute and republish
an Intelligent Cube when a database load occurs.
If the Intelligent Cube is updated based on one or more attributes, you can
enable Incremental Refresh to update the Intelligent Cube with only new
data. This significantly reduces the time and system resources needed to
update the cube periodically.
5 Click OK.
Once the schedule is triggered the Intelligent Cube is re-executed against the
data warehouse and published to the Intelligent Cube Monitor.
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.
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.
6 Select the Allow reports to drill outside the Intelligent Cube check box.
7 Click OK.
9 You must publish the Intelligent Cube again, to make your changes
available for reports accessing the Intelligent Cube.
4 Select the Allow reports to drill outside the Intelligent Cube check box.
Project-Level Setting for Intelligent Cube
5 Click OK.
You can publish Intelligent Cubes manually, or you can schedule the
publication of Intelligent Cubes.
You can remove a published Intelligent Cube so that its data is no longer
accessible by reports. This action does not delete the Intelligent Cube object
saved in a MicroStrategy project, it only removes the Intelligent Cube from
the Intelligent Cube Monitor.
The Intelligent Cube is unpublished from the Intelligent Cube Monitor, and
its data cannot be accessed by reports.
Unpublish an Intelligent Cube
After an Intelligent Cube is created and published, its data is made available
in the memory of the Intelligence Server, and multiple reports can access it
for data.
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.
To create a report that accesses an Intelligent Cube, you must first choose an
Intelligent Cube.
2014 MicroStrategy Inc. Reporting and Analyzing Data with Intelligent Cubes 221
5 Advanced OLAP Services MicroStrategy Developer: Advanced Reporting
The Report Editor opens with all of the objects of the Intelligent Cube
included in the Report Objects pane on the left. You can begin to create your
report.
You can change the Intelligent Cube accessed by a report. This enables you to
switch to an Intelligent Cube that fits your reporting requirements without
having to create a new report.
However, the Intelligent Cube to which you should have the same, or at least
similar, data to the previous data. If the report contains objects that are not in
the new Intelligent Cube the report looses the availability and functionality of
the objects. A warning message displays for any mismatch in data between
the report and the Intelligent Cube to which you want to link the report.
222 Reporting and Analyzing Data with Intelligent Cubes 2014 MicroStrategy Inc.
MicroStrategy Developer: Advanced Reporting Advanced OLAP Services 5
2 In the Report Editor, from the Data menu, point to Intelligent Cube
Options and select Point grid to Intelligent Cube.
Access a Different Intelligent Cubes
3 Browse to the new Intelligent Cube to which you want to link the report,
select it, and click Open.
IfCube,
there are data mismatches between the report and the Intelligent
a warning message is displayed that lists the differences.
Attributes on the report that are not contained in the new
Intelligent Cube are 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.
The report is updated to access the Intelligent Cube selected. You should
remove any attributes and metrics if they no longer return correct results.
2014 MicroStrategy Inc. Reporting and Analyzing Data with Intelligent Cubes 223
5 Advanced OLAP Services MicroStrategy Developer: Advanced Reporting
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.
224 Reporting and Analyzing Data with Intelligent Cubes 2014 MicroStrategy Inc.
MicroStrategy Developer: Advanced Reporting Advanced OLAP Services 5
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.
A report connected to Intelligent Cubes can drill within the set of data
available in the Intelligent Cube. This means that you can drill from an
attribute on the report grid to an attribute that is not on the report grid but
available in the Report Objects pane. If the attribute is not available in the
Report Objects pane, it is not an available drilling option by default.
However, you can enable the option to drill outside of an Intelligent Cube to
the full relational data warehouse.
For example, your report includes the Year attribute. After analyzing data at
the Year level, you want to analyze data for each quarter. You can drill down
from Year to the attribute Quarter to view and analyze data at the new logical
level. This drilling action is performed within an Intelligent Cube.
2014 MicroStrategy Inc. Reporting and Analyzing Data with Intelligent Cubes 225
5 Advanced OLAP Services MicroStrategy Developer: Advanced Reporting
The Quarter attribute 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. In the image above, the user right-clicks the 2011 attribute
element for Year and drills down to Quarter. The drilled-to report is shown
below:
ResultDrilling Within the Intelligent Cube
226 Reporting and Analyzing Data with Intelligent Cubes 2014 MicroStrategy Inc.
MicroStrategy Developer: Advanced Reporting Advanced OLAP Services 5
In the next example, the same scenario of drilling from Year to Day is used,
except that the Intelligent Cube does not contain the Day attribute. As shown
in the report below, you right-click the 2011 attribute element for Year and
drill down to Day.
ExampleDrilling Outside the Intelligent Cube
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 2011 attribute element for
Year and drill down to Day.
2014 MicroStrategy Inc. Reporting and Analyzing Data with Intelligent Cubes 227
5 Advanced OLAP Services MicroStrategy Developer: Advanced Reporting
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. Also, 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 you were originally connected.
The scenarios listed below cause reports to return error messages when
Intelligent Cubes are unavailable:
The Intelligent Cube is being published, but the publishing process is not
finished yet.
228 Reporting and Analyzing Data with Intelligent Cubes 2014 MicroStrategy Inc.
MicroStrategy Developer: Advanced Reporting Advanced OLAP Services 5
When creating reports, you can enable and increase the chances that your
report utilizes dynamic sourcing by following the recommendations below.
First, you must enable dynamic sourcing for your report. This can add some
overhead to the execution of your report, because the report checks whether
there are any Intelligent Cubes that meet the data requirements of your
report. This overhead usually has no effect on performance. If an Intelligent
Cube is used, the report results return quickly from the in-memory copy of
data rather than querying the data warehouse.
2014 MicroStrategy Inc. Reporting and Analyzing Data with Intelligent Cubes 229
5 Advanced OLAP Services MicroStrategy Developer: Advanced Reporting
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.
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.
2 In the View Filter area, right-click a metric qualification and select one of
the following options:
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:
Drilling can grant full ROLAP access to the data warehouse to Reports
that access an Intelligent Cube.
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.
You can apply view filter metric qualifications at the lowest attribute
levels in the Report Objects window or at the report grid level.
Exercises: Intelligent Cubes
Overview
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:
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.
5 Add the Year 2011 and 2012 attribute elements to your report filter.
You can also save and close the report after step 5, then double-click
the Intelligent Cube to run it.
11 Add the Year and Category attributes and the Revenue metric to the
template.
13 Click Save and Close, and name your report My First Intelligent Cube
Report.
2 Select the Intelligent Cubes tab, and browse to the Intelligent Cube you
want to use for your Intelligent Cube report.
2 On the File menu, select Save As. Name the report OLAP Report and
save it in My Reports folder.
4 On the Data menu, point to Intelligent Cube Options and select Convert
to Intelligent Cube.
6 Save and Close the Intelligent Cube with the default name Cube
converted from OLAP Report and save it in My Reports folder.
Atyetthis point the report is just converted into Intelligent Cube. It is not
published.
Aprompt
prompt generation wizard window opens, and only Object
is available.
13 Click OK.
14 Click Next.
16 Click Finish.
17 Name the prompt Metric Objects and save it to the My Reports folder.
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.
26 In the Save As window, name the prompt Country Prompt and click
Save.
28 In the view filter panel, for Field option, select Select a Prompt.
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:
Overview
What happens when you change the behavior of the view filter condition for
Revenue to the following options?
______________________________________
______________________________________
______________________________________
______________________________________
Detailed Instructions
2 On the File menu, select Save As, and save your report as My First
Intelligent Cube Report with View Filter.
4 Define the new metric with the definition of Revenue - Cost. Name this
metric Profit.
5 Click OK.
8 In the view filter panel, create an attribute qualification for Year 2012.
Asexpressions
soon as this filtering condition is added, the two view filter
on attributes Category and Year get combined using
the logical operator AND. A user can click AND to change the
logical operation to either OR or NOT.
10 Create another metric qualification for Cost Greater than $500,000, and
press Enter on the keyboard.
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:
The attributes Category and Year represent all the attributes present
in the Intelligent Cube.
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:
Lesson Description
Lesson Objective
After completing the topics in this lesson, you will be able to:
You can use derived elements to create these groups on the fly while viewing
a report, rather than defining consolidations or custom groups. For example,
you have a report with Region, Category, and Profit on the template as
displayed on the left hand side in the image below:
Example - Derived Elements
In the report on the right, the Region attribute elements are grouped into
four different derived element groups.
West CoastCombines the data for the Northwest and Southwest regions
South and CentralCombines the data for the South and Central regions
WebDisplays 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 contribution to profit, as
shown below:
Example - Derived Elements
The different types of derived elements provide a wide range of reporting and
analysis features.
The report shown below includes the derived elements defined using groups
of Region attribute elements:
Example - Group Derived Elements
ToGroups
learn how to create a group derived element see Create Quick
and Calculations starting on page 261.
To create Group derived elements, you can either quickly create derived
elements with right-click options or you can use the Derived Elements Editor
to access the full functionality of derived elements.
For example, in a report with Region and Category attributes and a Profit
metric, you can filter the regions on the report into various geographical
groups based on the region names.
The report shown below includes the following derived elements defined with
filters of Region attribute elements:
Central, Mid-Atlantic, and Web are displayed since they are a part of
All Other derived elements.
To create Filter derived elements, you must use the Derived Elements Editor.
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.
For example, in a report with Region and Category attributes and a Profit
metric, you can group the regions on the report into various groups for profit
analysis, as shown below:
Example - Calculation Derived Elements
To create Calculation derived elements, you can either quickly create derived
elements with right-click options or you can use the Derived Elements Editor
to access the full functionality of 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.
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:
For more information about derived elements using the Grid Graphs
in a document see the MicroStrategy Report Services: Document
Essentials course.
You can create derived elements with the following methods described in this
section:
You can create the following types of quick Group derived elements:
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.
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
2 Browse to the Intelligent Cube report and run it in Grid View or Grid
Graph View.
3 Press CTRL and select multiple attribute elements for the same attribute
in the grid display of the report.
Do not select derived elements for the attribute, as you cannot create
quick groups on derived elements. To group derived elements, you
must use the Derived Elements Editor.
5 In the Defining Group window, type a name for the derived element, and
click OK.
The group is created as a derived element and displayed on the report. You
can modify the derived element using the Derived Elements Editor.
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
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.
2 Browse to the Intelligent Cube report and run it in Grid View or Grid
Graph View.
3 Press CTRL and select multiple attribute elements for the same attribute
in the grid display of the report.
Ifallyou selected exactly two attribute elements, you can choose from
of the calculations listed below. However, if you select more
than two attribute elements, Subtract and Divide are not available
calculations as they can only accept two operands. If you want to
create a subtraction or division including more than two attribute
elements, you must use the Derived Elements Editor.
Add
Subtract
Average
Greatest
Least
Divide
5 In the Create Calculation window, type a name for the derived element
and click OK.
With the Derived Elements Editor you can create derived elements with
groups, filters, and calculations. You can access the Derived Elements Editor
from a report in Design View, Grid View, and Grid Graph view in Developer.
You can also access the Derived Elements Editor from outside reports or Grid
Graphs to create stand-alone derived elements. Stand-alone derived
elements can be shared by multiple reports and Grid Graphs.
3 In the grid display of the report, right-click the attribute for which you
want to create the derived element or modify an existing derived element,
and select Derived Elements.
Create New Derived Element
As discussed earlier, you can create group, filter, and calculation types of
derived elements. In the Derived Elements Editor.
3 To access the Derived Elements Editor, right-click the attribute for which
you want to create new derived elements or modify existing derived
elements and select Derived Elements.
4 In the Derived Elements Editor, click the New drop-down list, and select
List.
6 In the Definition tab, from the left pane, select attribute elements to
include in the group and click > to add your selections to the group
derived element.
8 From the Change Element drop-down list, you can format derived
element headers and values.
9 You can change the order in which the derived elements are displayed on
the report using the up and down arrows.
10 You can continue to create more derived elements, or you can click OK to
close the Derived Elements Editor and return to the report.
11 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.
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.
4 Create the qualification by defining the Field, Operator, and Value fields.
5 You can continue to create more derived elements, or you can click OK to
close the Derived Elements Editor and return to the report.
You can also use the toolbar above the expression to include operators
and functions, as well as validate or clear the expression.
Calculation Derived Element Definition
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.
There are two methods with which you can create stand-alone 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 in which it is
shared.
4 In the Derived Elements Editor, you can create list, calculation, or filter
derived elements to define your stand-alone derived elements by selecting
an option in the New drop-down list.
5 After you create the required derived element click Save and Close.
6 In the Save Derived Element As window, type a name and click Save.
The Derived Elements Editor closes and the derived element is saved as a
stand-alone object.
This procedure assumes the report, on which you connect the derived
element to an attribute, is connected to an active Intelligent Cube.
2 Open the report and run it in Grid View or Grid Graph View.
Ifreport,
an attribute already has a derived element defined for it in the
applying a stand-alone derived element overwrites the existing
definition.
5 In the Select Derived Elements window, browse to and select the derived
element to apply to the attribute
6 Click Open.
7 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.
Toderived
modify a stand alone derived element, right-click the stand-alone
element and select Edit.
For example, consider the report shown below that has derived elements
created from the Region attribute.
Example: Derived Element Formatting
2 On the Change Element menu, point to Format and select from the
following options:
4 Click OK to save your changes and close the Derived Elements Editor.
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. They can only include qualifications on attributes
and metrics. View filters cannot use derived elements in the view filter
qualification; neither can you select a derived element in a view filter.
Since derived elements are associated with attribute elements, any view filter
qualifications that restrict the data for a derived elements associated
attribute elements also restrict data returned for the derived element.
The Music and Movies derived element combines the profit values for the
Music attribute element and Movies attribute element. When you create a
view filter qualification that restricts the report data to the individual Movies
attribute element and Electronics attribute element, the report results
change, as 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, so 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
restrict the data available to analyze and format with derived elements.
You may have to clear your derived element, create a view filter on a
category attribute and then recreate your derived element on that
category.
Derived Metrics
A derived metric is a metric based on metric data that is 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.
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.
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
You must move attributes from the page-by area to the grid of the
report to create or modify derived elements for the attribute.
Thresholds
Thresholds highlight particular data in a report by displaying special cell
formats, symbols, images, or replacement text.
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
You do not have the option to select the Region attribute since that
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.
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 2012 attribute element to Quarter,
the resulting report only includes Quarters that are within 2012. 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.
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 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 retrieve their data from the Intelligent Cube, so because derived
elements are not part of the Intelligent Cube, they are not available during
object prompts.
Lesson Summary
Derived elements are grouping of attribute elements on a report that are
created on the fly.
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 can only be created in Intelligent Cube reports and Grid
Graphs in Report Services documents.
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.
Exercise: Derived Elements
All of theses exercises should be completed in the MicroStrategy Tutorial
project in the three-tier project source.
Overview
Metrics: Revenue, Profit, Cost, Unit Profit, Unit Cost, Unit Price and
Units Sold
Metrics: Unit Cost, Unit Price, Unit Profit, and Units Sold
Your quick calculations should be based off the Movies category, and
provide an Average for the following:
Your final Intelligent Cube report results should display all three of the
derived elements noted above, as shown in the image below:
Final Quick Derived Elements for Calculations - Average
Detailed Instructions
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.
7 Click Save.
10 Add the Subcategory and Item attributes, and the Unit Cost, Unit Price,
Unit Profit and Units Sold metrics to the template.
11 Right-click the Unit Cost metric, point to Formatting, then All Metrics,
and select Values.
12 On the Number tab, select Currency and set to 2 decimal places. Click
OK.
16 For the Action subcategory, with Ctrl key pressed, select the items with
unit cost between $7.00 and $10.00.
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.
Overview
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 Intelligent Cube report should look like the following image:
Derived Elements for Distribution Centers
Your manager now wants to compare her profit with the other centers.
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
3 In the Intelligent Cube Editor, using the Object Browser, browse to the
Year, Day, Category, Subcategory and Distribution Center attributes
and add them to the Report objects window.
4 Add the Revenue, Cost and Profit metrics to the Report Objects window.
7 Click Save.
10 Add the Distribution Center attribute and the Profit metric to the
template.
13 In the Derived Elements window, on the New menu, select List, as shown
below:
Derived Elements Editor - List
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.
After it is selected, you will only see those elements that are not part of
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.
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.
Your manager wants to compare her profit with the other centers. The
calculation derived element enables you to take the analysis a step further.
Ina drop-down
the definition window for calculation derived element, you will see
list. You can choose from the attribute elements or the
derived elements to perform mathematical operations, as show below:
Calculation Options
24 Select Derived Element from the drop-down list to see the available
derived elements, as shown below:
Calculation Groups Selections
32 Click OK.
35 Click OK.
The derived element summary window should look like the image below:
Derived Element Summary
The display order of your derived elements can be different than the
image above depending on where you added the new derived
elements.
36 Click OK.
Now your manager wants to see the ratios at the bottom and profits of each
custom derived element at the top of the report.
39 Repeat the previous step to move the other derived element, Ratio of My
Profit to East Manager's, to the bottom of the group list.
40 Click OK.
41 Click Save and Close and name the report Regional Analysis.
Lesson Description
This lesson teaches you how to use Developers Report Data Options to further
control the behavior of reports.
Lesson Objectives
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 305)
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 322)
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
Metric Join TypeEnables you to set the join type of each metric that
is present on the report
Display
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
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.
You can define report limits in terms of Value, Rank, and Percent as
described in the table below:
Value Include only items greater than a specified Greater than, Less than
value for the metric Exactly
Between
Not between
Different from
Greater than or equal to
Less than or equal to
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 you can save 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.
Both metric qualification report filters and report limits can be used
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.
1 In the Report Editor, on the Data menu, select Report Data Options.
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.
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.
In this first example, both the Sales and Inventory metrics are defined with
an Outer join. Notice the North and West Regions have no data present for a
metric. Even so, both records appear in the report results because both
metrics have been defined with an outer join.
North 100
West 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.
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.
North 100
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.
1 In the Report Editor, on the Data menu, select Report Data Options.
3 Under Join Type, select the join type for each metric.
Report Data Options Editor - Metric Join Type
4 Click OK.
Setting the metric join type using Report Data Options affects only
the results for the report being modified. To globally set the join
type of a metric, specify it at the metric-level with the Metric
Editor. A metric join type that you set globally affects the results of
all reports using that metric. However, you can still override the
global setting at the report-level with Report Data Options.
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).
4 Click OK
Preserve lookup table elements joined to final pass result table based on
fact table keysKeep only the attribute elements that are joined to the
fact table based on fact table keys
Preserve lookup table elemetns joined to final pass result table based on
template attributes without filterKeep all attribute elements and ignore
all related filtering conditions
As an example, if you want the year 2013 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.
The following example assumes that there are 4 years stored in the
LU_YEAR lookup table, 2010-2013. It also assumes that only the
years 2010, 2011 and 2012 have data in the fact table.
The example above demonstrates how the Attribute Join Type setting affects
the joins made between a lookup table and a fact table.
Intables,
the case where you need to force an outer join between two lookup
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.
Ifsetting
you are using Microsoft Access, you also need to change another
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 click Join 92. Click
Save and Close.
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.
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.
Metric qualification
AMetric
smart compound metric is one that has the Allow Smart
setting enabled, which is on the Subtotals/Aggregation tab
of the Metric Editor.) The Analytical Engine always calculates
smart compound metrics. Only a metric with mathematical
operators in its formula can have this setting enabled.
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.
Consolidations
Report limits
Subtotals
The above calculations can be defined in any sequence. However, the default
calculation order is as follows:
2 Consolidations
3 Report limits
4 Subtotals
1 In the Report Editor, on the Data menu, select Report Data Options.
4 Under Data Set evaluation order, next to the appropriate object, select a
number indicating the order of evaluation. A 1 causes the relevant object
to be evaluated first, a 2 second, and so on.
5 Click OK.
A report can contain one or more consolidations. If there is more than one
consolidation on a report, you must pay attention to the evaluation order.
This is important when one of the consolidations involves division (or
multiplication) and the other involves addition (or subtraction) in the
definitions of the consolidation elements.
For example, suppose you have a report that has a Revenue metric and two
consolidations. One is the Seasons consolidation that was described earlier,
and the other is a Years consolidation that contains three consolidation
elements: 2011, 2012, and 2011/2012. Depending on the evaluation order of
the consolidations, you may get different result sets.
The row for Spring 2010/2011 can be either calculated as (April 2011 +
May 2011 + June 2011) / (April 2012 + May 2012 + June
2012) or (April 2011 / April 2012) + (May 2011 / May 2012)
+ (June 2011/June 2012). You need to specify the order in which you
want Spring 2011/2012 to be calculated.
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
If you are using MicroStrategy OLAP Services and you add view filters,
derived elements or derived metrics to a report, you can also control the
evaluation order for these OLAP Services objects. Since all report view
manipulations that do not cause new SQL to be generated are performed
after the report result is retrieved from the data warehouse, they need their
own view evaluation order.
The view evaluation order is used to control the evaluation order of subtotals,
derived metrics, and smart metrics. All of these calculations can potentially
change if the report view is manipulated.
Report Data Options EditorView Evaluation Order
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.
You can view the Analytical Engine calculation plan in the SQL View of a
report. For example, the following report contains several objects that are
calculated by the Analytical Engine: a consolidation, a smart metric, and a
subtotal. You can switch from Grid View to SQL View to see the order in
which the Analytical Engine calculates each object.
Grid View
SQL View
Report limits
Metric calculations
Subtotals
Consolidations
Thresholds
Crosstabbing
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
In Report Data Options, the Subtotals are used for custom groups and
consolidations. If custom groups or consolidations are on the report, this
window 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.
OR
1 In the Report Editor, on the Data menu, select Report Data Options.
3 Under Allow Subtotals for the object, choose the appropriate value:
Default, Yes, or No.
4 Click OK.
For consolidation subtotals to produce the best results, you may also
need to change the Subtotals over Consolidations Compatibility VLDB
property in the Analytical Engine folder.
Display
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.
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.
Report Data Options Editor - Alias
3 Under Alias, enter the alias in the text box next to the object.
4 Click OK.
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.
2 In the Report Editor, on the Data menu, select Report Data Options.
3 In the Report Data Options window, expand Display and select Object
Display.
Report Data Options EditorObject Display
4 Under Display, select the desired display for the custom group object.
5 Click OK.
You can also specify custom group display settings in the Custom
Group Editor.
Null Values
A null value is an unknown value. Null values can result from a number of
reasons as discussed below.
Often, null values can be found in the data warehouse. For example, if a
customer chooses to withhold personal information, such as birth date, the
value for that customer's birth date would appear as null in a table in the data
warehouse.
Nulls can also be a product of the calculations and crosstabbing that are
performed on a report. For example, on a report that contains no data for a
certain field, you can pivot attributes on the template such that the
cross-tabbing action produces a null value in the report results.
Rather than leave the null values as blank cells, you can have them display
with text or numbers. Often, you might want to display a zero or the word
NULL instead of a blank cell.
The value that replaces the null only replaces it in the report results. In the
case of a data warehouse null, it does not change the actual value in the data
warehouse table. It is used only for calculations in the report SQL, or it is
used for display in the final report results.
There are cases when dynamic aggregation performed in the Intelligent Cube
results in null values on a report. The example below shows that Average
Revenue dynamically aggregates from Call Center to Region, returning null
values in the report view.
ExampleNull Values 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.
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 EditorNull 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.
Toreports
change the display of dynamic aggregation null values for all
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.
This setting pertains to Freeform SQL reports that may, under certain
circumstances, reference objects that are not available. Freeform SQL reports
are beyond the scope of this course. For more information on Freeform SQL
reports, refer to the MicroStrategy Freeform SQL Essentials course.
Grid Position setting: Affects the alignment of the grid on the report page
General Options
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 353, or the Report
Manipulations lesson in the MicroStrategy Developer: Reporting Essentials
course.
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
DefaultInherits the setting from the drill path
The Keep parent option can be set either in the Report Data
Options window or the Drill Map Editor. Setting the Keep parent
option in the Report Data Options window enables you to specify
that parent objects are automatically kept whenever a user drills on
the report.
The Keep threshold setting can be set in either the Report Data
Options window or the Drill Map Editor.
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:
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:
Drill Attributes Join TypeOpens 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.)
10 Click Drill Attributes Join Type to specify the join type on specific
attributes to which you drill.
11 Click OK.
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.
ToManipulations
review more about the page-by feature, refer to the Report
lesson in the MicroStrategy Developer: 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.
Report Data Options Editor - Advanced
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
Original layout view disables some Mobile user features, but it enables some
report designer configurations to enable greater flexibility in report design. It
also improves the loading time of a report if the report is paged.
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 use 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.
The Advanced options include a setting for retaining page-by selections
when you save a report.
Exercises: Report Data Options
Report Limit
Suppose you want to retrieve only those Subcategories with more than
$500,000 in Revenue. There is more than one way to obtain the result set,
but for this exercise, use a report limit.
1 With the Report Editor, create a new report with Subcategory and
Revenue.
2 In the Report Editor, from the Data menu, select Report Data Options.
4 Click Modify.
15 Run the report. You should see subcategories with Revenue above
$500,000:
17 Optional: Obtain the same result set using a metric qualification in the
report filter instead of a report limit. Compare the SQL for the two
reports. Which has more SQL passes? Which is more efficient?
Joins
To observe the effects of join types:
1 With the Filter Editor, create a filter for Category = Books and name it
Books.
3 With the Report Editor, create a report with Customer, Revenue, and
Book Revenue.
_______________________________________
Not every customer bought an item from the Books Category, so many
customers have no data for that metric. With both metrics defined with
inner joins, you see only the customers that have data for both metrics. To
see all the customers that have data for Revenue, you need to set the
Revenue metric to an outer join.
7 For Revenue, change the Join Type to Outer and click OK.
Ifsetting
you are using Microsoft Access, you also need to change another
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.
_______________________________________
10 With the Report Editor, create a report with Customer in the rows and
Year and Revenue in the columns. When you run the report, you should
see all the customers who have sales in either year.
_______________________________________
_______________________________________
How would the report result be different if you used two conditional
metrics, 2011 Revenue and 2012 Revenue, instead of the Year attribute?
_______________________________________
_______________________________________
2 In the Metric Editor, click the Subtotals/Aggregation tab and select the
Allow Smart Metric box.
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.
10 Under Data Set evaluation order, for Report Limit, select 1 and for Rank
Revenue Ascending, select 2.
11 Click OK. The report runs again with the new evaluation order, and you
should see the ranks change accordingly:
13 Optional: What happens if the Rank Revenue Ascending metric does not
have its Allow Smart Metric setting enabled?
_______________________________________
_______________________________________
Subtotals
By default, the subtotals of custom groups are disabled. You can turn
subtotals 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.
5 In the Subtotals window, select the Total check box and click OK. Notice
that subtotals are not displayed.
8 Next to Age Groups, click Allow Subtotals drop-down list and select Yes.
9 Click OK.
_______________________________________
_______________________________________
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.
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?
_______________________________________
_______________________________________
Drilling
You can customize drilling capabilities in the Report Data Options window.
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.
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.)
Report Data Options Exercise Solutions
Report Limit
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 4, the report returns 9,940 rows.
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 8, Alias displays in the following views:
Design
Grid
Graph
Grid Graph
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.
Lesson Objectives
After completing the topics in this lesson, you will be able to:
Describe how you create and customize drill maps. (Page 356)
What is Drilling?
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.
The different options available to you when you right-click to Drill are drill
paths.
In summary, a drill map determines what drill paths are available for the
different template units on a report. By default, the drill paths available are
based on the system hierarchy (which includes all of the attributes in a
project and their respective relationships) of the project. You can also create
custom drill maps that can override these defaults.
The image below illustrates one of the drill paths in the default project-wide
drill map for the MicroStrategy Tutorial project. In the image, you can
right-click the Electronics category to Drill and choose the Other directions
option to drill to the Brand attribute of the Products hierarchy.
Example - Drill Path
You can associate drill maps with different objects. For example, you can
associate the Item attribute with a customized drill map such that whenever
Item displays on any report or template, the custom drill map takes effect. In
this example, you associate the custom drill map to a specific template unit
(Item) and the drill map applies globally throughout the project whenever
you use the template unit (a report or template on which you place Item).
You can also define drill maps on a template or a report basis. For example,
assume that you want end-users to be able to drill from the Item attribute to a
particular template, but only from a specific report. You can associate a
custom drill map to the Item attribute on that specific report, so end-users
can drill from Item, only on that report, to the desired template.
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.
2 Define the drill paths that will be available with 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.
In the Consolidation Editor, on the Tools menu, select Edit Drill Map.
In the Attribute Editor, on the Tools menu, select Edit 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.
Ifmenu,
you do not see this option in the Drill Map Editor, on the View
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 Path Description: This field enables you to enter a description for
the drill path. There is a limit of 250 characters.
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:
Drill Map Editor - Set Name
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, this option applies the filter of the
original report to the drilled report. This option is selected by default.
Keep parent: If selected, the parent object is kept on the drilled report.
Default: Selecting Default means that the report filters setting is used.
Clear all: Clicking 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.
Reset: Clicking Reset reverses any changes and resets the drill map to its
last saved definition. Drill Map associations are reset as well.
Associate with: This option enables you to associate the drill map to one
or more objects on a report.
The Associate with option is only available within the Drill Map
Editor when it is opened by editing an existing drill map or
creating a new drill map. If you open the Drill Map Editor from
within a given template unit (for example, a report, a
consolidation, or an attribute), you will see an Associations option.
This option merely displays the objects that are already associated
with the drill map.
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.
Exercises: Drill Maps
1 Using the Report Editor, create a report that contains Customer and
Revenue on the template and Customer State = Florida in the filter.
Save this report as Florida Customers. When you execute the report, the
first few rows should resemble the image below:
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.
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.
You can also drill on the Customer attribute header, but your result
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.
Lesson Description
In this lesson, you will learn about some of the tools available to you in
Developer. 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.
Lesson Objectives
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 369)
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
You can change general preferences, such as font and line resizing,
scrolling, and labels; layout preferences; resizing behavior;
available graph types and their settings for MicroStrategy Web and
Developer; and graph object colors.
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:
DisplayNull Values
GeneralDrilling
GeneralAdvanced
GeneralMicroStrategy Options
You must be logged in to a project before you can access the Find and
Replace window.
Find and Replace Tool
2 In the Find and Replace window, select Report Data Options as the
category of properties to modify.
5 In the Report Data Options window, modify the Report Data Option
setting as needed. Select Apply next to each setting and click OK.
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.
8 Click Replace.
Project Documentation
This tool is extremely useful when you want to capture the contents of a
project at a given point in time. You can use the HTML documentation files to
identify object owners; view detailed object definitions, creation, and
modification dates/times; and so on.
ToDocumentation
use this feature, you must have the Developer Designer Use Project
privilege.
6 Choose how much information you want to document about each object.
You can specify all object properties by selecting Basic Properties,
Definition and Advanced Definition, or you can select individual
properties. Click Next.
Depending on which object category you select, you may not see
Definition or Advanced Definition options. For example, selecting
Folders will only give you the Basic Properties option.
For example, if you chose to document Application objects, then you must
select whether to include metrics, filters, templates, Report Services
documents, and so forth. Similarly, if you chose Schema objects, you need
to select whether to include facts, attributes, hierarchies, and so forth.
8 Configure how the project documentation will display and click Next.
You can specify the location where the HTML files will be created. (By
default, the HTML files are saved to the users temporary folder.) You can
also specify the structure of the project documentation, how many objects
to display per page and how to sort those objects (by Name or by Type).
Additional settings include paper layout, margin settings, font size, and
image file location. Click Next.
10 After the HTML files are generated, click the Open project documentation
after closing the wizard check box and click Next.
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:
Autostyles
Metric formats
Graph fonts
Graph preferences
Export Options
Exercises: Report Developer Tools
4 In the Find and Replace window, under Select the category of the
properties to modify, select Metric Formatting.
5 Under Find, select the Choose a set of metrics option and click the
Browse button.
8 Click the right arrow button to add the metrics to the Selected objects list.
9 Click OK.
13 In the Format Cells window, on the Number tab, select the Currency
category.
15 Click OK.
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.
7 Select all applicaton objects except the following: Autostyle, Data Mart
Report, HTML document, Predictive metric, and Search. Expand Metrics
and notice that you can select Basic Properties, Definition and Advanced
Definition.
8 Click Next.
9 In the Settings window, keep all of the default settings and click Next.
10 The Summary window, click Finish, and the wizard generates the project
documentation files.
_______________________________________
_______________________________________
_______________________________________
_______________________________________
Click Metric.
_______________________________________
Click Facts.
_______________________________________
Click My Reports. Browse the objects you created during this course.
Good job!
Report Developer Tools Exercise Solutions
Project Documentation
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
Rows: Region
Thresholds: Yes
Appendix Description
For more detailed information about data modeling, refer to the Project
Design Guide.
5 To view the entire hierarchy in the window, on the View menu, select Fit
in window.
6 To return to the default view, on the View menu, select Auto arrange.
7 To save the layout view of the hierarchy, on the File menu, select Save
layout. The next time you open the Hierarchy Viewer, it displays the
saved view.
Geography
Customers
Time
Products
Geography Hierarchy
Customers Hierarchy
Time Hierarchy
Products Hierarchy
For more detailed information on the schema, refer to the Project Design
Guide.
Although the MicroStrategy Tutorial physical schema is listed below for your
reference, you can also view the physical or logical schema directly in the
product.
3 In the Table Viewer, to change display preferences for the logical view, on
the Options menu, select any of the following options:
4 To switch to the physical view, on the View menu, select Physical view.
5 To change display preferences for the physical view, on the Options menu,
select any of the following options:
6 To switch back to the logical view, on the View menu, select Logical view.
7 To view the entire schema in the window, on the View menu, select Fit in
window.
8 To return to the default view, on the View menu, select Auto arrange.
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).
Geography
Customers
Time
Products
Fact tables
Geography Schema
Customers Schema
Time Schema
Products Schema
Appendix Description
This appendix describes some of the advanced settings that exist in various
Developer object editors:
Dynamic Aggregation
Prompt-in-prompt Functionality
Value-prompted Metrics
Advanced Settings
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.
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.
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.
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.
For example, the report below shows Revenue by Region. The report filter
contains the attribute qualification on Region = Northeast and Mid-Atlantic,
and the metric qualification on Revenue > $4,000,000. If the default option
is kept, the qualifications are merged, and both are included in the SQL pass
that resolves the metric qualification. Only Revenue for Northeast and
Mid-Atlantic is considered when evaluating the metric qualification, Revenue
> $4,000,000. The report results are:
Example - Set Qualification Advanced Button
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.
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.
Notice
window.
that Call Center has been removed from the Report Objects
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:
You can change the default display of -- for temporary null values via
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)
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.
You then remove Subcategory from the Report Objects window, generating
new SQL and a new report. Because new SQL was generated and executed
against the data warehouse, the new figures for Average Revenue are
calculated using the fact table.
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.
For the reasons stated above, you should use caution when changing the
dynamic aggregation function from Default.
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.
6 Click Finish.
Level prompts are used in metrics to enable users to specify the level of
aggregation for a metric at report run-time.
3 In the Object Browser, drag a level prompt and drop it into the Level
(Dimensionality) pane.
When you run a report with a prompted level metric, a prompt resolution
window opens enabling you to choose the level of calculation for the metric.
4 Click Finish.
The report runs and the metric calculates at the level that you chose.
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.
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.
5 Click Prompt.
6 In the Prompt Generation Wizard, accept the defaults and click Finish.
7 Click OK.
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.
14 In the Report Editor, add the prompt to the filter definition pane.
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.
The above example assumes that the inner prompt and dependent
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.
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.
A business intelligence 25
metadata database 27
Advanced Functions 83 source system 26
advanced functions four-tier 31
date and time functions 91 three-tier 30
N-tile 90 attribute join type 311
rank 89 attributes
round 89 relationships 144
RunningSum, RunningAvg, Moving- attribute-to-attribute filtering 125
Sum, MovingAvg 89
select examples 88
advanced subtotal B
custom subtotals 94 band count 190
advanced subtotals 94 band for each distinct metric value 191
user-defined subtotals 97 band size 190
alias, metric banding points 190
about 322 banding, custom group 189
set 323 band count 190
Analytical Engine 26 band for each distinct metric value 191
analytical functions 84 band size 190
application objects 28 banding Points 190
Apply functions base formulas
about 135 define 76
use 136 break by 141
architecture business intelligence systems 25
C banding
about 189
caches band count 190
overview of 33 band size 190
calculation derived elements 257 banding points 190
conditional metrics 77 create 192
creating 77 create 186
embedding 400 Custom Group Editor
filter elements 78 about 184
configuration objects 28 Definition area 185
elements 184
consolidation
defining a 185
Consolidation Editor 179
elements 184
create 179-180
SQL query 183
element
import 180, 181
evaluation order D
about 313
data warehouse 26
set 315
decision support system
functions 177
architecture 25-28
multiple 316
data warehouse 26
row level math 177
four-tier 31
count metric 86
source system 26
create
three-tier 30
conditional metrics 77
derived elements
count metric 86
about 251
custom subtotal 96
all other 259
derived elements using editor 267
calculation 257
intelligent cubes 209
derived elements editor 265
intelligent cubes using reports 212
filter 255
level metrics 55
format 274
nested metric 82
group 253
quick calculations derived
elements 264 interaction
derived metrics 277
quick group derived elements 262
drilling 280
stand-alone derived elements 270 page-by 277
transformation metric 74 prompts 282
user-defined subtotal 99 thresholds 279
custom group view filters 275
filter
attribute-to-attribute 125 G
dynamic dates group derived elements 253
about 130 grouping 44
create 131
Grouping Set to None 50
evaluation order 132
Filtering Set to Absolute 51
import filter elements 133
Filtering Set to Ignore 53
nested metric 80 Q
non-aggregatable
Query Engine 26
about 66
query flow, report 32
qualifier
about 139
break by 141 R
target 44
relationship filter
transformation
about 145
components 73
create 148
create 74
expression-based 71 report
table-based 72 caches 33
types of 71 limits
metric-to-metric filter 142 define 305
MicroStrategy Products 27 set 307
row level math 177
security 35
N report as filter 151
nested metric Report cache sharing 208
about 80 report data options 303
create 82 alias 322
non-aggregatable attribute join type 311
about 66 drilling 331
null values 326 find and replace 369
metric join type 307
O null values 326
object display 324
object display 324
page by 335
subtotals 320
P report execution
page by 335 query flow 32
permissions, security report level 43
change 37
process 26 S
project documentation wizard 373
schema objects 28
prompt
security
level prompt 411
permissions, change 37
value 415
report 35
server components 26
T
target 44
template unit 353
three-tier architecture 30
Transformation 70
transformations
components 73
create 74
expression-based 71
table-based 72
types of 71
V
value prompt 415
view filter 230
view filters 230
derived elements 275
Metric Qualification Level 230