Professional Documents
Culture Documents
B6061 David Lashbrook Course Guide
B6061 David Lashbrook Course Guide
com
Course Guide
IBM Cognos Analytics: Author
Reports with Multidimensional Data (v11.0)
Course code B6061 ERC 3.0
IBM Training
Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27
Preface
April, 2016
NOTICES
This information was developed for products and services offered in the USA.
IBM may not offer the products, services, or features discussed in this document in other countries. Consult your local IBM representative for
information on the products and services currently available in your area. Any reference to an IBM product, program, or service is not intended to
state or imply that only that IBM product, program, or service may be used. Any functionally equivalent product, program, or service that does not
infringe any IBM intellectual property right may be used instead. However, it is the user's responsibility to evaluate and verify the operation of any
non-IBM product, program, or service. IBM may have patents or pending patent applications covering subject matter described in this document.
The furnishing of this document does not grant you any license to these patents. You can send license inquiries, in writing, to:
IBM Director of Licensing
IBM Corporation
North Castle Drive, MD-NC119
Armonk, NY 10504-1785
United States of America
The following paragraph does not apply to the United Kingdom or any other country where such provisions are inconsistent with local law:
INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF NON-INFRINGEMENT,
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer of express or implied warranties in
certain transactions, therefore, this statement may not apply to you.
This information could include technical inaccuracies or typographical errors. Changes are periodically made to the information herein; these
changes will be incorporated in new editions of the publication. IBM may make improvements and/or changes in the product(s) and/or the
program(s) described in this publication at any time without notice.
Any references in this information to non-IBM websites are provided for convenience only and do not in any manner serve as an endorsement of
those websites. The materials at those websites are not part of the materials for this IBM product and use of those websites is at your own risk.
IBM may use or distribute any of the information you supply in any way it believes appropriate without incurring any obligation to you. Information
concerning non-IBM products was obtained from the suppliers of those products, their published announcements or other publicly available
sources. IBM has not tested those products and cannot confirm the accuracy of performance, compatibility or any other claims related to non-IBM
products. Questions on the capabilities of non-IBM products should be addressed to the suppliers of those products.
This information contains examples of data and reports used in daily business operations. To illustrate them as completely as possible, the
examples include the names of individuals, companies, brands, and products. All of these names are fictitious and any similarity to the names and
addresses used by an actual business enterprise is entirely coincidental.
TRADEMARKS
IBM, the IBM logo, and ibm.com are trademarks or registered trademarks of International Business Machines Corp., registered in many jurisdictions
worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the
web at “Copyright and trademark information” at www.ibm.com/legal/copytrade.shtml.
Adobe, the Adobe logo are either registered trademarks or trademarks of Adobe Systems Incorporated in the United States, and/or other countries.
Microsoft, Windows, and the Windows logo are trademarks of Microsoft Corporation in the United States, other countries, or both.
Java and all Java-based trademarks and logos are trademarks or registered trademarks of Oracle and/or its affiliates.
© Copyright International Business Machines Corporation 2016.
This document may not be reproduced in whole or in part without the prior written permission of IBM.
US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
Contents
Preface................................................................................................................. P-1
Contents ............................................................................................................. P-3
Course overview................................................................................................. P-8
Optional configuration for the IBM Cognos Analytics 11.0 course
environment.................................................................................................. P-10
Document conventions ..................................................................................... P-13
Exercises.......................................................................................................... P-14
Additional training resources ............................................................................ P-15
IBM product help .............................................................................................. P-16
Introduction to dimensional reporting concepts ................................ 1-1
Unit objectives .................................................................................................... 1-3
Data sources and model types ........................................................................... 1-4
Examining OLAP data structures........................................................................ 1-5
Describe IBM Cognos dynamic cubes ................................................................ 1-6
The dimensional structure in IBM Cognos Analytics ........................................... 1-8
Differentiate data entities .................................................................................... 1-9
What is a dimensional query?........................................................................... 1-10
The dimensional approach to queries ............................................................... 1-11
The query model in IBM Cognos Analytics ....................................................... 1-12
The IBM Cognos Analytics query language ...................................................... 1-13
Data items and data item properties ................................................................. 1-14
Identify dimensional expressions ...................................................................... 1-15
Differentiate from SQL and MDX ...................................................................... 1-16
Demonstration 1: Explore the dimensional data tree ........................................ 1-20
Report authoring styles..................................................................................... 1-29
Apply report authoring styles ............................................................................ 1-30
Other reports in IBM Cognos Analytics ............................................................. 1-31
Unit summary ................................................................................................... 1-32
Introduction to dimensional data in reports ....................................... 2-1
Unit objectives .................................................................................................... 2-3
What makes up a member? ............................................................................... 2-4
What is a Member Unique Name? ...................................................................... 2-6
What makes up a MUN? .................................................................................... 2-7
Changes that impact a MUN............................................................................... 2-8
Demonstration 1: Use members to create reports .............................................. 2-9
Demonstration 2: Explore MUNs ...................................................................... 2-15
Inserting members and children ....................................................................... 2-18
Using sets in IBM Cognos Analytics ................................................................. 2-19
Course overview
Preface overview
This course is designed to guide professional report authors in building on their
experience with IBM Cognos Analytics by applying dimensional techniques to reports.
Through interactive demonstrations and exercises, participants will learn how to author
reports that navigate and manipulate dimensional data structures using the specific
dimensional functions and features available in IBM Cognos Analytics.
Intended audience
Professional Report Authors working with dimensional data sources.
Topics covered
Topics covered in this course include:
• Compare dimensional and relational data sources
• Understand dimensional concepts and reporting styles
• Create reports using dimensional data items such as members, levels, and
hierarchies
• Focus reports using dimensional techniques such as edge filters, slicers, and filter
functions
• Navigate dimensional data structures using functions to find related members or
comparison time periods
• Create sophisticated measure calculations
• Understand totals and aggregation
• Analyze reports with drill-up and drill-down techniques
• Configure advanced drilling behavior to support complex calculations and
dashboard reports
• Set up drill-through access from one data source to another
Course prerequisites
Participants should have:
• IBM Cognos Analytics: Author Professional Reports Fundamentals (v11.0)
course
• Knowledge of your business requirements
• Knowledge of dimensional data
• Experience using basic Windows and Web browser functionality
When creating a report in the current environment (as per the course set up tasks),
the user interface and dialog box for choosing a report type (List, Crosstab, Chart,
etc.) appears as follows:
The dialog box is a legacy component from the IBM Cognos BI 10.2.2 version of the
product. It is available, by default, when performing the "Custom" installation of IBM
Cognos Analytics 11.0. The "Custom" installation was chosen for the setup of the
course environment. Note: steps in demonstrations and exercises are currently
scripted to use this dialog box for creating reports.
Once this configuration has been performed, use the following steps to create a
report.
1. Follow the steps from the demonstration or exercise to log on as a user
with the ability to create reports.
2. From the side panel (left pane), click New.
3. Click Report.
The user interface now appears as follows:
Document conventions
Conventions used in this guide follow Microsoft Windows application standards, where
applicable. As well, the following conventions are observed:
• Bold: Bold style is used in demonstration and exercise step-by-step solutions to
indicate a user interface element that is actively selected or text that must be
typed by the participant.
• Italic: Used to reference book titles.
• CAPITALIZATION: All file names, table names, column names, and folder names
appear in this guide exactly as they appear in the application.
To keep capitalization consistent with this guide, type text exactly as shown.
Exercises
Exercise format
Exercises are designed to allow you to work according to your own pace. Content
contained in an exercise is not fully scripted out to provide an additional challenge.
Refer back to demonstrations if you need assistance with a particular task. The
exercises are structured as follows:
The business question section
This section presents a business-type question followed by a series of tasks. These
tasks provide additional information to help guide you through the exercise. Within
each task, there may be numbered questions relating to the task. Complete the
tasks by using the skills you learned in the unit. If you need more assistance, you
can refer to the Task and Results section for more detailed instruction.
The task and results section
This section provides a task based set of instructions that presents the question as
a series of numbered tasks to be accomplished. The information in the tasks
expands on the business case, providing more details on how to accomplish a task.
Screen captures are also provided at the end of some tasks and at the end of the
exercise to show the expected results.
Task- You are working in the product and IBM Product - Help link
oriented you need specific task-oriented help.
Introduction to dimensional
reporting concepts
Unit objectives
• Identify different data sources and models
• Investigate the OLAP dimensional structure
• Identify dimensional data items and expressions
• Differentiate the IBM Cognos Analytics query language from SQL and
MDX
• Differentiate relational and dimensional report authoring styles
Unit objectives
The terms multidimensional and dimensional can be used interchangeably. For
consistency and simplification, the term dimensional is used throughout the course.
Prerequisites:
• The participant should have experience with IBM Cognos Analytics (strongly
recommended).
Mountaineering
Equipment
Dimension
Personal
Accessories
Products
Jan Feb ...
Q1 Q2 ...
Attributes
2005 2006 ...
Start End
2005 Q1 Q2 Q3 Q4 April 1 June 30
Hierarchy/Levels Time
IBM Cognos Dynamic Cubes adds a relational OLAP component to the Dynamic Query
Mode server to provide a multidimensional view of a relational data warehouse. You
can then perform OLAP analysis by using the Cognos Dynamic Cubes server.
IBM Cognos Dynamic Cubes integrates easily into your existing infrastructure by using
resources that are already in your environment. Some of these existing resources are
required, such as a Java™ virtual machine, or other databases for the content store.
The Administration Console is used to deploy and manage the cube data. The dynamic
query mode (DQM) server runs the cube data, and IBM Cognos Analytics uses the data
in reporting environments.
Dimension
Hierarchy
Level
Child
Members Members used as data
items for a report
Attribute
OLAP/DMR Relational
Product
TrailChef Water Bag
Members TrailChef Canteen
TrailChef Kitchen Kit
Product
Aloe Relief
Values Astro Pilot
Auto Pilot
Expression Expression
children([Asia Pacific])
• Level expression
[sales_and_marketing].[Products].[Products].[Product line]
• Attribute expression
[sales_and_marketing].[Products].[Products].[Product line]. [Product line - Long
Name]
You will work with the metadata of query subjects, query items, and facts within
this selected namespace unless otherwise mentioned. Follow the start point
information carefully, as there will be different logins, packages, report types,
and namespaces used for each demonstration and exercise in this course.
At the end of each unit, in the last demonstration or exercise, you will be
instructed to log off. You do not have to log off if you will be doing the next unit
immediately; you should log off as a best practice if you are finished working with
IBM Cognos Analytics for the day.
Note: The course environment requires the following services to be started before you
begin performing demonstrations and exercises:
• Apache Directory Server
• DB2 -DB2COPY 1 - DB2
• DB2DAS - DB2DAS00
• IBM Cognos
• World Wide Web Publishing Service
To review the services, on the Taskbar of your environment, click the Services icon,
and ensure that the above services are running. If you have closed your image and
launched it again, it is a best practice to review the status of the services before
continuing with your demonstrations and exercises.
If the Apache Directory Server or DB2 -DB2COPY 1 - DB2 service have stopped, you
will need to stop the IBM Cognos service, start the stopped service(s), and then start
the IBM Cognos service once the previously stopped service(s) has (have) started
successfully. You can start and stop a specific service by double-clicking the service to
open the Properties dialog box, and then clicking the Stop or Start buttons.
Note that it may take 15 minutes or more for the IBM Cognos service to start.
Demonstration 1
Explore the dimensional data tree
Demonstration 1:
Explore the dimensional data tree
Purpose:
You must familiarize yourself with using dimensional reporting objects to
create reports. To do this, you will navigate a dimensionally-modeled
relational data source and identify the objects in the data tree. You will
identify the differences in the result set when using the objects in crosstab
reports.
Portal: http://vclassbase:9300/bi
User/Password: hirschb/Education1
Package: Team content > Samples > Models > GO Sales (analysis)
Report Type: Crosstab
Folder: Sales and Marketing (query)
Namespace: Sales (query)
6. Click Data from the side bar at the left to expose the Data pane with the
Source tab selected.
The Source tab shows the GO Sales (analysis) model as follows:
The GO Sales model consists of a root namespace that takes its name from the
package that was published from Framework Manager. This namespace
contains six namespaces. This structure represents the contents of the package
that was created in Framework Manager, which in turn, represents a business
view of the metadata taken from the Framework Manager model. This model is
based on a relational source but it was modeled dimensionally.
If you were to examine the data tree at this point, you would see Members
folders. This is the default behavior for IBM Cognos Analytics for dimensional
data sources. At this point, you will hide the Members folders because you want
to only examine the metadata that is available from the tree, and not members.
You can change the view of the data package tree, on the Source tab, by
switching between the Metadata tree view , which allows you to view the full
data tree (the metadata and dimensional members), and the Members tree
view , which limits your view to dimensional-only data. For now, you will
work in the default view.
7. In the Data pane, right-click the background of the Source tab, and then click
Package Tree Settings.
8. In the Settings section, clear the Members and the Members for each level
check boxes, and then click OK.
The tree will now display levels and member properties.
9. In the Data pane:
• Expand the Sales (analysis) namespace.
It contains measures and dimensions.
• Expand the Products dimension.
It contains the Products hierarchy.
4. In the application toolbar, click the More ellipses, and then click Options.
5. Click the Report tab, and click Automatic group and summary behavior for
lists to deselect it, and then click OK.
6. Run the report in HTML by first clicking Run options , and then clicking
.
The report appears in IBM Cognos Analytics as shown below:
Because you included the top levels from both the Time and Product
hierarchies, the report shows the corresponding members from each level in the
rows and column edges. In this case, each level contains a single member,
Products and Time respectively. The value shown for Revenue is a rolled up
value for all child levels for both hierarchies.
7. Close the rendered report tab.
Task 3. Use a level below the highest level in a hierarchy to
create a report.
1. In the report layout, click <#Time#>, and then press the Delete key.
2. In the Data pane:
• From the Products dimension > Products hierarchy, drag the Product line
level to the Rows drop zone above <#Products#> as a peer
• From the Time hierarchy, drag the Year level to the Columns drop zone.
• Right-click the Year level and then click Properties.
The expression in the Ref field appears as follows:
[Sales (analysis)].[Time].[Time].[Year]
Compared to the previous expression, the level [Year] now replaces [Time].
Because you are using the first levels below the highest levels from both
hierarchies, you now see the child members of those levels on both the rows
and columns edges. On the rows edge, you can see that the values shown for
each child member roll up to the values shown at the parent member, which is
Products.
4. Close the rendered report tab.
Task 4. Use a hierarchy to create a report.
1. In the report layout, click <#Product line#>, Ctrl+click <#Products#>, and then
press the Delete key.
2. In the Data pane, from the Products dimension, drag the Products hierarchy
to the Rows drop zone.
The Insert Hierarchy dialog box appears.
3. Accept the default selection of Root members, and then click OK.
4. In the Data pane, right-click the Products hierarchy, and then click Properties.
The expression in the Ref field appears as follows:
[Sales (analysis)].[Products].[Products]
5. In the Properties dialog box, click Close.
6. In the report layout, click <#Products#>, and then in the Properties pane ,
scroll to the DATA ITEM section.
The DATA ITEM section of the Properties pane appears as follows:
The DATA ITEM properties indicate that the Products hierarchy will be used as
a Member Set in the report.
7. Run the report in HTML.
The results appear as follows:
Because you selected Root member as the option for showing the Products
hierarchy, the rows edge of the reports shows the root member, Products, from
the Products hierarchy. You still see the child members for the Year level on the
columns edge.
8. Close the rendered report tab.
9. In the report layout, click <#Products#>, and then delete it.
10. In the Data pane, from the Products dimension, drag the Products hierarchy
to the Rows drop zone.
11. In the Insert hierarchy dialog box, click All members, and then click OK.
This data item will return the Hierarchy Set for the Products hierarchy, and not
only Root Members. You will add some formatting so that the report appears
properly.
12. In the report layout, click <# Products#>, in the Properties pane , under
GENERAL, click the Level indentation property, and then click the ellipsis.
13. In the Level indentation dialog box, in the Indentation length box type 15.
14. In the Direction section, under Indent towards the right, in the Start after the
following level box, type 1, and then click OK.
15. Run the report in HTML.
A section of the report appears as follows:
Because you selected All members as the option for showing the Products
hierarchy, the rows edge of the report shows all members from all levels based
on the structure of the hierarchy.
16. Close the rendered report tab.
Product line code is an attribute of Product line, and the Data Item currently
associates it directly to the Product line level. Because Product line is already in
the query, the Product line code attribute is labeled Productline1.
This is the data item for the Product line code attribute.
The Product line code attribute is nested for each member of the Product line
level.
9. Close the rendered report tab.
10. In the application bar, click Branka Hirsch and then click Sign out.
11. Click OK, and then close the Web browser.
Results:
You familiarized yourself with using dimensional reporting objects by
navigating the data tree of a dimensionally modeled relational data source,
and by using the objects to create crosstab reports.
Data Source
Relational √
√ √
√ √*
√
Authoring
Style √ √
Dimensional √* √
Unit summary
• Identify different data sources and models
• Investigate the OLAP dimensional structure
• Identify dimensional data items and expressions
• Differentiate the IBM Cognos Analytics query language from SQL and
MDX
• Differentiate relational and dimensional report authoring styles
Unit summary
Introduction to
dimensional data in reports
Unit objectives
• Work with members
• Identify sets and tuples in IBM Cognos Analytics
Unit objectives
Some topics are a review from the IBM Cognos Analytics: Author Reports
Fundamentals (v11.0) course.
The topics of identifying sets and tuples, as well as expressions, are covered at a high
level with more detail to follow in subsequent units.
Prerequisites:
• IBM Cognos Analytics: Author Reports Fundamentals (v11.0) course.
For example:
• In a Framework Manager DMR source:
member key property = _businessKey role; member caption property =
_memberCaption role
• In an IBM Cognos PowerCube source:
member key = Category code; member caption = Category label
• In an IBM Cognos Contributor cube source:
member key = IID (internal identification); member caption = display name
• In a MSAS cube source:
member key = Member Key Column; member caption = Member Name
Column
Demonstration 1
Use members to create reports
Demonstration 1:
Use members to create reports
Purpose:
Because IBM Cognos Analytics lets us use members to create reports, you
will navigate a PowerCube data source to identify members in the data tree.
This will include the root member for a hierarchy, the member at the highest
level of a hierarchy, and members at lower levels. To demonstrate the power
of using members, you will create a report using levels and compare it to
creating a report using members.
Server: http://vclassbase:9300/bi
User/Password: brettonf/Education1
Package: Team content > Samples_PowerCube > Cubes > Sales and
Marketing (cube)
Report type: Crosstab
Namespace: Sales (analysis)
Task 1. Identify members in the dimensional data tree.
1. In the Internet Explorer address box, type http://vclassbase:9300/bi, and then
press Enter.
2. On the Log on screen, in the User ID box, type brettonf, in the Password box,
type Education1, and then click Sign in.
3. Create a new Crosstab report using the Sales and Marketing (cube) package
shown above.
4. In the Data pane, right-click the background of the Source tab, and then click
Package Tree Settings.
5. Ensure that the Package Tree Settings check boxes are all selected as
follows.
6. Click OK.
7. In the Data pane, expand the Products dimension, the Products hierarchy,
and then all levels within the Products hierarchy.
Each level in the hierarchy, and the hierarchy itself, contains a Members folder.
8. Under the Products hierarchy, expand the Members folder, and then under the
Products level, expand the Members folder.
Each folder contains the same member, Products. The Products member is the
member for the highest level, Products, in the hierarchy, a level which
represents all products. In some cases, this "all" level is omitted from the model;
therefore, report authors can only access the root member(s) from the
hierarchy’s Members folder.
9. For each lower level in the hierarchy, expand the Members folder.
Each level contains members at increasingly lower levels of detail. For example,
the Product level, which is at the lowest level, has the most members. The
Product type level contains fewer members than the Product level, and the
Product line level contains even fewer members than the Product type level.
Depending on the dimensional data source you are using, more than one root
member at the highest level may be specified, as in SAP BW data sources.
10. Under the Products level > Members folder, expand the Products member.
Members from the next level in the hierarchy, Product line, appear.
11. Expand the Camping Equipment member.
Members at the Product type level for the Camping Equipment member appear.
12. Expand the Tents member.
Members at the Product level for the Tents member appear.
13. Expand the Star Dome member.
There are no members to show because Star Dome is at the lowest level in the
hierarchy.
You accessed lower-level members by navigating to them from the highest
level, Products, in the hierarchy. You can also access lower-level members by
navigating to them at their respective level within the hierarchy.
14. Under the Product line level > Members folder, expand the Camping
Equipment member, and then expand the Tents member.
You can access the same members as previously shown in steps 9 to 11. The
only difference is that you began the navigation from the Product line level
instead of the Products level.
15. Under the Product type level > Members folder, expand the Tents member.
The members from the Tents member appear, as previously demonstrated.
Are these the same members? Yes, but how can you confirm this?
16. In the Product type level, under the Tents member, place the mouse pointer
over the Star Dome member.
The MUN for the member appears in the tooltip as follows:
[sales_and_marketing].[Products].[Products].[Product]->:[PC.[@MEMBER].[12]
17. In the Products level, under the Camping Equipment > Tents member, place
the mouse pointer over the Star Dome member.
The MUN for the member appears in the tooltip as follows:
[sales_and_marketing].[Products].[Products].[Product]->:[PC].[@MEMBER].
[12]
Both instances of the member have the same MUN; therefore they are the
same member. The structure of the hierarchy is flexible so that you can access
members using multiple navigation paths. It does not matter where you take the
members from when you create reports, because each member is uniquely
identifiable through its MUN.
18. Click View members tree , and expand Products > Camping Equipment
>Tents, and then place the mouse cursor over the Star Dome member.
Notice that MUN is the same as the previous view. The members tree view
allows you easy navigation of members. You will work with levels, rather than
members, for the next task.
Because you are using levels in the report, all members from each of the levels
appear. In particular, because you have used the Month level, which contains
numerous members, the report is so wide that it requires scrolling.
6. Close the rendered report tab.
Task 3. Create a report using members.
1. Without saving the previous report, create a new Crosstab report using Sales
and Marketing (cube) package, located in Team content >
Samples_PowerCube > Cubes.
2. In the Data pane, expand the Time dimension > Time hierarchy > Year level >
Members folder.
3. Drag 2011 to the Columns drop zone, and then drag 2012 to the right of 2011.
4. In the Data pane, expand 2012, and then expand 2012 Q 4.
5. Drag 2012/Oct under <#2012#>, and then drag 2012/Nov, and 2012/Dec to the
right.
The month members are nested as peer children of the 2012 column.
6. In the Data pane, in Products dimension > Products hierarchy > Product line
level > Members folder, click Camping Equipment and drag it to the Rows
drop zone.
7. Drag Mountaineering Equipment to the Rows drop zone, under Camping
Equipment.
Camping Equipment and Mountaineering Equipment appear as peers in the
rows.
8. In the Data pane, in the Measures dimension, drag Revenue to the Measures
drop zone in the report.
The results appear as follows:
By using members, you narrowed the focus of the report to only those members
you are interested in viewing. In this case, you see revenue for 2011 and for the
last three months of 2012 for both the Camping Equipment and Mountaineering
Equipment product lines.
10. Close the rendered report tab.
11. Leave the browser open for the next demonstration.
Results:
You navigated an IBM Cognos PowerCubes data source and identified
members in the data tree, including the root member for a hierarchy, the
member at the highest level of a hierarchy, and members at lower levels. You
learned how you could use members to create focused reports.
Demonstration 2
Explore MUNs
Demonstration 2:
Explore MUNs
Purpose:
To become proficient at using members to create reports you will add
members to the edge of a crosstab report, and then examine the member
expressions that are generated.
Server: http://vclassbase:9300/bi
User/Password: brettonf/Education1
Package: Team content > Samples > Models > GO data warehouse
(analysis)
Report type: Crosstab
Folder: Sales and Marketing (analysis)
Namespace: Sales (analysis)
Task 1. Identify a MUN in a report.
The GO Data Warehouse package is based on a model that was modeled
dimensionally in Framework Manager. This is an example of a Dimensionally
Modeled Relational (DMR) model.
1. Without saving the previous report, create a new Crosstab report using the GO
data warehouse (analysis) package.
2. In the Data pane, expand Sales and Marketing (analysis) > Sales, and add
the following:
• Rows: Products dimension > Products hierarchy > Product line
• Columns: Order method dimension > Order method hierarchy > Order
method type level > Members folder > Fax, Telephone, Mail, E-mail, and
Web
• Measures: Sales fact > Revenue
The results appear as follows:
You will now examine the MUN for the Fax member. You previously identified a
MUN by viewing the tooltip for the member in the Insertable Objects pane. You
will now use an alternate method.
3. In the Data pane, click the Order method level to change the focus of the
currently selected items.
4. In the Data pane, right-click the Fax member and then click Properties.
The properties for Fax are displayed, and the Member Unique Name value is as
follows:
[Sales].[Order method].[Order method].[Order method type]->[Order
method].[601]
Notice the last portion of the expression: [601]
5. Close the Properties dialog box.
6. Run the report in HTML.
The results appear as follows:
The rows edge is populated with all the members from the Product line level,
while the columns edge is populated with members that you selected from the
Order method dimension level.
7. Close the rendered report tab.
With DMR a broken MUN will simply return no data or the wrong data. This is
because the filter syntax generated in the native SQL will still be valid and either
return no data if the filter condition is not met, or return the wrong data if the
changed MUN's member key is pointing to another row in the database table.
With OLAP data sources, this behavior is different. You get an error message
indicating which MUNs are broken. This is because OLAP uses MUNs to
retrieve members from the data source. Unlike SQL filters, which exclude all
data except the ones that meet the criteria, MUNs are used to request a specific
item. If that item does not exist, then an error is raised indicating that it cannot
be found. Altered MUNs in OLAP data source also have the potential to return
the wrong member. For example, if a report uses a MUN pointing to Camping
Equipment and that MUN subsequently changes, it could end up pointing to
Golf Equipment although the report indicates it should be Camping Equipment.
If you frequently encounter reports that are broken as a result of changed
MUNs, you should discuss the issue with the data modeler to devise a model
maintenance strategy that prevents or minimizes the problem.
8. Leave the browser open for the next demonstration.
Results:
You used members to create a crosstab report and examined the MUN
expressions that are generated.
<#Time#>
<#2010#>
<#2011#>
<#2012#>
<#2013#>
<#2010#>
<#2011#>
<#2012#>
<#2013#>
<#Time#>
<#Camping Equipment#>
<#Mountaineering Equipment#> <#Set - Products#>
Rows Measures
Set
Revenue 2010 2011 2012
Tuple values
Select multiple
members from
data tree
2011,Golf Equipment,Revenue
Query calculations
• Create:
[2011]- [2010]
calculated member
calculated measure [Revenue]- [Planned Revenue]
Query calculations
Create calculated members or calculated measures where the expression is a member
or a tuple-based (not property-based) value expression.
Use set expressions to create calculated sets of members. You must base each set
expression on a hierarchy, and the set expression must contain only members from this
hierarchy.
Create value expressions when you want to insert a string, number, date, or interval
value.
tuple(member {,member})
The tuple function provides a great deal of control to the report author over what is
returned in the cells of the crosstab. An example of this is how the tuple function can be
used to override the context defined by a slicer. For example, you have a report that
returns the top 3 product lines for revenue for all Sales Regions. If you add a slicer on
Asia Pacific, you will see a different set of product line members as my top 3.
Obviously, my cell values will also be affected. If I include the tuple function in the
topCount function that includes the Sales Region member as a parameter, it will
override the slicer with respect to what is returned as your top 3 product lines.
Essentially, you will get the same product line members that were returned when the
slicer wasn’t applied. The difference will be the cell values. Even though you get the
same members, the cell values will still be sliced on Asia Pacific.
Demonstration 3
Identify sets and tuples in reports
Demonstration 3:
Identify sets and tuples in reports
Purpose:
Automatically create sets by adding items to the rows, columns, and
measures drop zones in a crosstab report. Identify tuples in the report,
including those defined by members on both separate and the same axes.
Compare results to a tuple that you created manually.
Server: http://vclassbase:9300/bi
User/Password: brettonf/Education1
Package: Team content > Samples_PowerCube > Cubes > Sales and
Marketing (cube)
Report type: Crosstab
Task 1. Identify sets in a report.
1. Without saving the previous report, create a new Crosstab report using the
Sales and Marketing (cube) package.
2. From the Data pane, add the following member to the new crosstab report
object:
• Columns: Time dimension > Time hierarchy > Year
3. Run the report in HTML.
The results appear as follows:
You have created a set for this report. This set appears on the columns edge of
the report and shows the list of members for the set that is generated by the
following expression:
[sales_and_marketing].[Time].[Time].[Year]
4. Close the rendered report tab.
5. In the report layout, click <#Year#> to set focus, and then click the ellipsis from
the toolbar.
6. Click Edit Set.
The set definition indicates that the members for the Year level are in this set.
7. Point to the Year level in the set definition.
The message indicates that the set is defined by members of the level.
8. Click OK to close the Set definition dialog box.
9. From the Data pane, add Products dimension > Products hierarchy >
Product line level to the Rows drop zone.
10. Run the report in HTML.
The results appear as follows:
You have created a second set for this report. This set, shown on the rows edge
of the report, shows the list of members for the set that is generated by the
following expression:
[sales_and_marketing].[Products].[Products].[Product line]
11. Close the rendered report tab.
12. In the report layout, click <#Product line#> to set focus, and then click the
ellipsis from the toolbar.
13. Click Edit Set.
14. Point to Product line.
The message indicates that the members for the Product line level are in this
set.
15. Click OK to close the Set definition dialog box.
16. Add Order Method dimension > Order Method hierarchy > Order Method
type level to columns as a nested child under <#Year#>.
17. Run the report in HTML.
A section of the report appears as follows:
You have created a third set for this report that is nested and shown on the
columns edge of the report. It shows the list of members that is generated by
the following expression:
[sales_and_marketing].[Order Method].[Order Method].[Order Method type]
Optional: Open the Set Definition for the Order Method type set in the report
layout and observe the results.
18. Close the rendered report tab.
Up to this point, you have identified sets in a crosstab report. You will now
identify tuples.
Task 2. Identify tuples in a report.
1. Add the Measures dimension > Revenue measure to the Measures drop
zone.
2. Run the report in HTML.
A section of the report appears as follows:
Examine the value 80,467,596.88. This value represents the rolled up revenue
value for all months and quarters of the year 2010, for all product names and
product types of the Camping Equipment product line, and for the Telephone
order method. It can also be expressed using dimensional terminology as the
tuple of the 2010, Camping Equipment, and Telephone members for the
Revenue measure. Although not evident by what appears in the report, the
dimensional query, which is used to return the measure values in the cells, also
uses the default members from all other dimensions in the cube.
3. Close the rendered report tab.
4. In the report layout click <#Product line#>, and then pressing Delete.
Even if Revenue was on the report by itself, a value would still be returned. This
value would be the tuple of default members from all dimensions.
Examine the value 178,793,580.36. This is the tuple of the 2010 and Telephone
members for the Revenue measure. This shows that tuples can exist, not only
for members on separate axes, but for members on the same axis, in this case
nested members. Because you removed Product line from the report, you are
now seeing that the query is using not only the default members from other
dimensions, such as Retailers and Promotions, but also the default member
from the Products dimension. The value 178,793,580.36 is now a rollup of all
products (not individual product lines) for the year 2010 and the Telephone
order method.
You will also examine the MDX that is generated for this dimensional query.
6. Close the rendered report tab.
7. Click the Navigate tab on the side bar, right-click Report , and click
Show Generated SQL/MDX.
The Generated SQL dialog box opens as shown below:
The results for this manually created tuple item (178,793,580.36) match the
results of the tuple automatically created in task 2, step 3. The tuple displays
revenue for all products for the year 2010 and the Telephone order method.
You could have also created the tuple manually by dragging an Intersection
(Tuple) object from the Toolbox tab to the report layout.
6. Close the rendered report tab.
7. Click Frank Bretton and then click Sign out.
8. Close the Internet Explorer.
Results:
You created sets by adding items to the rows, columns, and measures drop
zones in a crosstab report. You identified tuples in the report including those
defined by members on both separate and the same axes. You also compared
results to a tuple that you created manually.
Unit summary
• Work with members
• Identify sets and tuples in IBM Cognos Analytics
Unit summary
Unit objectives
• Understand the purpose of report context
• Understand how data is affected by default and root members
• Identify default measure and current measure
Unit objectives
Prerequisites:
• Introduction to Dimensional Concepts
• Introduction to Dimensional Data in Reports
• Experience with IBM Cognos Analytics recommended
• IBM Cognos Analytics: Author Reports Fundamentals (v11.0)
Root members
• The root member is the
member at the highest
level of aggregation for Retailers is
a particular hierarchy the root
member for
the Retailers
hierarchy
Root members
Dimensions with multiple hierarchies may have multiple root members.
The root member of a hierarchy can be found with the function rootMembers().
The root member of a single root hierarchy can be found with the function
rootMember().
Default members (1 of 3)
• The default member is typically the root member, or in some cases can
be specified by the modeler
Default members
There is only one default member per hierarchy. The default member is typically the
root member at the highest level in a hierarchy. Depending on what data modeling tool
is used, a data modeler can define which member from a dimension will be the default
member. If not done explicitly by the modeler, most data modeling tools will
automatically assign the default member.
The definition for default member is not the same as for root member. Depending on
the data source, multiple root members can be defined. Despite having multiple root
members in a hierarchy, there can only be one default member.
When would a default member be defined, other than for a member at the highest
level? Example: for the Time dimension, by default you may want to only report on
current month. In the Dimensional data source (for example, a cube) define the default
member for the Time hierarchy in the Time dimension, as the current month (such as
2007/Jan) then generate the data source. A report author then creates a crosstab using
that data source. With default member specified as the current month, consumers will
only see revenue values for the current month (the default member for the Time
dimension).
If you need to identify the default member for a hierarchy, you can use the
defaultMember function. This function takes a hierarchy as its only parameter.
Default members (2 of 3)
In a dimensional query, when an item is not explicitly specified from a dimension, the
default member from that dimension is implied.
In this example, Campaign and Order method type are specified in the query. All other
dimensions such as Time, Products, and Retailers are not included in the query, but
their default members are applied to the context of the measure values.
Default members (3 of 3)
Because the filter specifies only revenue and order method types as criteria, values will
be calculated using the default member for all other dimensions.
Even though the report displays revenue by Year, the filter itself evaluates against the
Time dimension default member, or the summary of all years.
Current members
1 2
2012/Oct 2012/Nov
Revenue Revenue Revenue Previous Revenue Revenue Previous
Year Year
Camping Equipment 7,629,536.42 4,966,619.84 2,225,443.46 1,992,682.58
Current members
During each iteration, the current member changes. In iteration 1, the member for the
Month level is 2012/Oct, and for iteration 2, it is 2012/Nov.
The concept of current member is important when applying advanced calculations in a
report using the currentMember function. You can use the function currentMember to
return the current member of a hierarchy during iterations.
When a dimensional function expects a member, you can specify the current member
by using the currentMember function.
In the slide example, the Revenue Previous Year calculation requires a month member
in order to retrieve the values for the previous year. Therefore, the currentMember
function is used to pass the appropriate month member during each iteration of the
Time hierarchy to calculate the values.
Default measures
• IBM Cognos Analytics automatically sets the default measure when
you insert a measure into the Measures drop zone of a crosstab
Default measure
2012/Oct 2012/Nov
Revenue
Revenue Profit Revenue Profit
Camping Equipment 7,629,536.42 4,966,619.84 2,225,443.46 1,992,682.58
Default measures
For any intersection or expression where a measure is not explicitly defined, the default
measure will be used.
You implicitly set the default measure for a crosstab report when you insert a measure
into the Measures drop zone. You can explicitly set the default measure of the crosstab
by setting the Default Measure property in the Properties pane. To do this, you must
first select the crosstab object in the work area. The measures that you can choose
from must already exist in the query.
If you insert a measure on the rows or columns that is different from the one you
inserted in the Measures drop zone that measure will appear, instead of the default
measure. It does not become the default measure for the crosstab.
When the current measure keyword is used in member summary expressions, and
there is no other measure inserted on the rows or columns, the default measure is used
to resolve the expression.
If you do insert a measure on the rows or columns, the current measure used to resolve
the member summary expression will be derived from the context provided by the
measure you have inserted on the rows or columns.
Current measures (1 of 2)
• The current measure is the measure returned during an iteration
Current Measure
1 2
2012/Oct 2012/Nov
Revenue
Revenue Profit Revenue Profit
Camping Equipment 7,629,536.42 4,966,619.84 2,225,443.46 1,992,682.58
Current measures
Many measures can be used in a report. Measures can be explicitly added to an edge
of a report, or used in expressions for filtering or complex calculations.
The current measure is the value returned in a cell, at the time the query iterates
through and returns an intersection of given member on the rows and columns edges.
For example, when the query returns the intersection of Golf Equipment, 2012/Oct,
Revenue, the current measure value is 1,794,878.
Current measures (2 of 2)
• The current measure is the current intersection (tuple) for the members
defined on the edges during an iteration
You can use the current measure to create more complex calculations using the
currentMeasure keyword.
The currentMeasure keyword is used as the first argument of member summary
functions such as aggregate(currentMeasure within set [Year]).
The aggregate function uses the aggregation type defined in the source. You will use
the aggregate function throughout this course. The aggregate function will be discussed
in more detail in the unit Calculations and Dimensional Functions.
Demonstration 1
Use the default measure to create a summarized column in a report
Demonstration 1:
Use the default measure to create a summarized column in a
report
Purpose:
To have more control over the result set of your dimensional queries, you
must identify the behavior of the default measure in your crosstab reports.
You will create a crosstab report and identify its default measure. You will
include a summary calculation on the columns that will use the default
measure. You will add a measure to the columns to show that the summary
calculation still uses the default measure when there is no context provided
by a measure on the rows. You will move the measure from the columns to
the rows and again show the behavior of the summary calculation. You will
modify the default measure for the crosstab and observe the impact on the
calculation.
Server: http://vclassbase:9300/bi
User/Password: brettonf/Education1
Package: Team content > Samples_PowerCube > Cubes > Sales and
Marketing (cube)
Report type: Crosstab
Task 1. Identify the default measure in a crosstab report.
1. In Internet Explorer, open IBM Cognos Analytics, and sign in as
brettonf/Education1.
2. Create a Crosstab report using the Sales and Marketing (cube) package.
3. From the Data pane, add the following query items to the crosstab report:
• Rows: Products dimension > Products hierarchy > Product line
• Columns: Time dimension > Time hierarchy > Year
• Measures: Measures > Revenue
Revenue is the default measure for this crosstab.
The report shows revenue values for each product line for each year and also
as a total for all years in the last column. Because there is no measure provided
on the rows or columns, the context for the current measure in the calculation
for this column is obtained from the default measure in the crosstab, which is
Revenue. You will examine what happens when you add a measure to the
columns with the existing summarization.
4. Close the rendered report tab.
The report shows the quantity measure values for each product line for each
year. The totals shown in the last column are for revenue for each product line.
The context for the current measure in the calculation for the column is still
obtained from the default measure of the crosstab because no other measure
context is provided on the rows. You added only a measure to the columns and
not the rows.
3. Close the rendered report tab.
The last row of the report shows the Quantity measure on rows with the quantity
values for each year appearing in the cells. This is quantity for all product lines.
The summary column shows totals for revenue for all rows (product lines),
except for the last row where it shows a total for quantity. For the last row, the
presence of the Quantity measure on the rows provides the context for the
current measure in the calculation.
3. Close the rendered report tab.
Task 5. Change the default measure of the report.
In the top left corner of the crosstab, notice the three orange dots. This icon will
allow you to select the container with one click.
The summarized column now shows totals for quantity for all rows. For the first
five rows (product lines), the context for the current measure in the calculation
for this column is obtained from the default measure of the crosstab which is
now Quantity. For the last row, the presence of the Quantity measure provides
the context for the current measure in the calculation.
5. Close the rendered report tab.
6. Sign out as Frank Bretton.
7. Close the Web browser.
Results:
You created a crosstab report and identified its default measure. You included
a summary calculation on the columns that used the default measure. You
added measures to the report columns to show that the summary calculation
still used the default measure when there is no context provided by a measure
on the rows. You moved the measure from the columns to the rows and again
showed the behavior of the summary calculation. You modified the default
measure for the crosstab and observed the impact on the calculation.
Unit summary
• Understand the purpose of report context
• Understand how data is affected by default and root members
• Identify default measure and current measure
Unit summary
Unit objectives
• Compare dimensional queries to relational queries
• Explain the importance of filtering dimensional queries
• Evaluate different filtering techniques
• Filter based on dimensions and members
• Filter based on measure values
• Filter using a slicer
Unit objectives
Participants should be familiar with basic concepts of reporting using the dimensional
style and dimensional data sources.
Suggested units to reference:
• Introduction to Multidimensional Concepts
• Introduction to Multidimensional Data in Reports
• Dimensional Report Context
1 out of 7
each Mail
instance of a E-mail
retailer Fax
4 Your Eyes Telephone
Sales visit 135,201.76
Web 737,820.6
Special
Mail
E-mail
Fax
retailer. Mail
Fax
Why? Special
4 Your Eyes Web 737,820.6
E-mail
Telephone
Sales visit 135,201.76
Mail
Fax
Special
Filtering techniques
• Relational filtering techniques:
Detail filters
Summary filters
• Dimensional filtering techniques:
Dimensional objects, set definitions, and expressions to specify members
Filter() function
Slicers (Context filters)
Filtering techniques
The main ways to restrict data in dimensional queries are through set definitions and
expressions that contain dimensional functions, and through slicers. These techniques
are part of the dimensional style of report authoring.
It is not recommended to use relational style filters with OLAP data sources. With DMR
data sources, use caution when applying relational style filters; this combination should
only be used by advanced report authors who have an understanding of the behavior.
The reporting that you do with dimensional data sources is considered as a form of
filtering. For example, if you use only the Camping Equipment member in your report,
you have already filtered results to only include Camping Equipment member. There
are certain scenarios where relational filters, when applied to dimensional data, do not
return expected results and may result in poor performance. For example, relational
filters applied to measure values, in reports that contain complex dimensional
expressions, or that mix members from different levels as a result of nesting. These
scenarios are of concern because at runtime the relational filters trigger re-aggregation
that could cause the values to change.
Demonstration 1
Demonstration 1:
Focus your report by excluding members of a defined set
Purpose:
You want to create a report to compare the performance of product line sales
when they are on promotion. Since the promotions dimension includes a
category for Regular Sale, you will exclude that member from your report.
Server: http://vclassbase:9300/bi
User/Password: brettonf/Education1
Package: Team content > Samples_PowerCube > Cubes > Sales and
Marketing (cube)
Report type: Crosstab
Task 1. Create an unfiltered report comparing product sales
across time.
1. In Internet Explorer, open IBM Cognos Analytics, and sign in as
brettonf/Education1.
2. Create a Crosstab report using the Sales and Marketing (cube) package.
3. From the Data pane, add the following members to the new crosstab report
object:
• Rows:
• Products dimension > Products hierarchy > Product line
• Promotions dimension > Promotions hierarchy > Campaign to the right
of <#Product line#> in the Rows drop zone, to nest as a child.
• Columns: Time dimension > Time hierarchy > Year
• Measures: Measures > Revenue measure to the Measures drop zone.
4. In the report layout, click <#Campaign#>, and on the toolbar click Summarize,
and then click Default summary from the list.
The report displays the revenues for each product line and each different
promotional campaign. The summary row aggregates all revenues for the
product line including the regular sale revenues.
You want to modify the Summary label to identify what is being summarized in
the report.
6. Close the rendered report tab.
7. In the report layout, click Summary.
8. In the application bar, click Show properties pane, and under DATA ITEM,
notice that the Name value is Summary(Campaign).
You will modify the label to clearly identify that all campaigns are included in this
summary.
9. Under DATA ITEM, click Label, and change the property to Summary(All
Campaigns), and then press Enter.
Task 2. Exclude the campaign type Regular Sale for the
default measure.
1. From the Data pane, drag the Campaign level above <#Campaign#> in the
report layout.
This new set definition displays as <#Campaign1#>, because there is an
existing set definition based on this level in the crosstab.
2. Click <#Campaign1#>, click the ellipsis on the toolbar, and then click Edit Set.
You will exclude a member from this set definition.
3. In the Set definition dialog box, click New, and then click Exclude.
4. In the Available members pane, expand Promotions, click Regular sale, click
the right arrow to add it to the Members pane, and then click OK.
The set definition graphically displays that there is an exclusion applied to the
base set. If you point your cursor at Exclude, the excluded member(s) will
display in a tooltip.
5. Click OK to close the Set definition dialog box.
Instead of creating a new set definition, you could have also used the except()
function to create the following expression in a query calculation in the crosstab:
except([sales_and_marketing].[Promotions].[Promotions].[Campaign], set
([Regular sale]))
Because you have the summary row for all campaigns in the crosstab, you no
longer require the detailed rows for all campaigns.
The except() function does not need the single [Regular Sale] member to be
included in a set function. A member is recognized as a set composed of one
member only. The following expression could be used:
except([sales_and_marketing].[Promotions].[Promotions].[Campaign], [Regular
sale]), and achieve the same results.
6. In the report layout, click <#Campaign#>, and then on the toolbar, click the
ellipsis and then click Delete.
You will rename the Campaign1 set definition to clearly identify the campaigns
in this customized set.
7. Click <#Campaign1#>, in the Properties pane, in the DATA ITEM section,
click Name, change the property to Promotional Campaigns, and then press
Enter.
8. In the report layout, click <#Promotional Campaigns#>.
9. On the toolbar, click Summarize, and then click Default summary from the list.
10. To rename this summary to be more meaningful, click Summary, in the
Properties pane, in the DATA ITEM section, click Label, change the property
to Summary(Promotional Campaigns), and then press Enter.
The report now shows all promotional campaigns, excluding regular sales. The
two summary rows compare the aggregation of promotional campaigns to the
aggregation of all campaigns.
12. Close the rendered report tab.
13. Leave the browser open for the next demonstration.
Results:
You have created a report that shows you revenues for product lines for all
promotional campaigns except Regular sales.
2012
Planned revenue
Revenue Planned Revenue
First Aid 1,789,507.36 923,995.66
Only the product types in Sunscreen 3,342,648.85 2,006,172.66
the bottom 3% planned Insect Repellents 5,217,019.63 3,457,024.63
revenue for 2012 are Golf Accessories 16,184,834.94 10,066,864.59
returned. Safety 32,716,937.10 12,287,850.59
Demonstration 2
Demonstration 2:
Create a crosstab report showing the top two retailers
Purpose:
A request was made for a top two Retailers by revenue report. Users want to
see the top two retailers by revenue in 2012, their total revenue, the total
quantity sold, and profit margin for 2012. They also want to see the total
revenue for all years.
Server: http://vclassbase:9300/bi
User/Password: brettonf/Education1
Package: Team content > Samples_PowerCube > Cubes > Sales and
Marketing (cube)
Report type: Crosstab
Task 1. Create a crosstab report.
1. Without saving any previous reports, create a Crosstab report using the Sales
and Marketing (cube) package.
2. From the Data pane, add the following members to the new crosstab report
object:
• Rows: Retailers dimension > Retailers hierarchy > Retailer name
• Columns:
• Time dimension > Time hierarchy > Year level > Members folder > 2012
• Time dimension > Time hierarchy > Members folder > Time (to the right of
<#2012#>, as a peer)
• Measures: Measures > Revenue measure
Throughout the course, when working with members, you may switch between
the metadata tree view and the members tree view to populate report objects
like crosstabs and charts with members.
3. From the Data pane, in the Measures dimension, click Revenue, Ctrl+click
Quantity and Profit Margin, and drag them below <#2012#> in the report
layout, as nested items.
The results appear as follows:
Instead of creating a set definition, you could have also used topCount() and
tuple() to create the following expression in a query calculation in the crosstab:
topCount ([sales_and_marketing].[Retailers].[Retailers].[Retailer name], 2,
tuple([2012],[Revenue]))
8. Click OK to close the Set definition dialog box.
9. Run the report in HTML.
The results appear as follows:
Detail filters
[Revenue]> 150000000
Detail filters
Detail and summary filters are the relational style approach to filtering.
A detail filter is applied to the details of the report using the set of members at the
lowest level on both the columns and rows edges as context. The condition of a detail
filter is applied to the measure value within each individual cell.
If a value does not meet the condition it is removed. If all the values are removed for an
entire row, the row is not returned.
Only two order method types are returned. The other five (there are seven order
method types in this data set) are not returned because their detail values, for all
columns, do not meet the criteria and are removed. Conversely if there were values
removed for an entire column, the column would not appear.
Demonstration 3
Demonstration 3:
Compare the use of the filter() function to a detail filter
Purpose:
To understand the differences between the behavior of the filter function and
the relational style detail filter when they are applied to dimensional data, you
will create a crosstab report and apply the filter function two different ways on
edge expressions and then apply a detail filter to the same report. You will
identify the result sets and the performance characteristics in each scenario.
While you could use set definition in this demonstration, to have more control over
changing the expression of the function in this demonstration, you will use query
calculations.
Server: http://vclassbase:9300/bi
User/Password: brettonf/Education1
Package: Team content > Samples_PowerCube > Cubes > Sales and
Marketing (cube)
Report type: Crosstab
Task 1. Create an unfiltered report.
1. Without saving any previous reports, create a Crosstab report using the Sales
and Marketing (cube) package.
2. From the Data pane, add the following members to the new crosstab report
object:
• Rows:
• Products dimension > Products hierarchy > Product
• Order method dimension > Order method hierarchy > Order method
type (to the right of <#Product#> nested as a child)
• Promotions dimension > Promotions hierarchy > Campaign (to the right
of <#Order method type#> nested as a child)
• Columns: Time dimension > Time hierarchy > Year level
• Measures : Measures > Revenue
This report is 285 pages long and contains 11,088 rows. Using the first page as
an example, the report contains many null values for Revenue. For each
product, all promotional campaigns for all order methods are shown, regardless
of whether there is any revenue.
4. Close the rendered report tab.
You want to filter the campaigns to only show those with revenue values that
are not null. You will use the filter function to accomplish this.
This report is only 34 pages long. Rows that contain all null values have been
filtered. Only campaigns that have generated revenue for a product for at least
one of the years are shown.
In the Time dimension, this filter is evaluated against the default member's
values, in this case the Time member which is a rollup of all years. In fact, the
filter evaluates against the default member of all dimensions not explicitly
mentioned. The filter evaluates revenue for each Campaign, rolled up for all
Time, all Retailers, and so on.
You will now alter the Revenue measure and the filter function on Retailer name
to evaluate the individual cell values. In other words, create a filter using the
dimensional style of authoring.
8. Close the rendered report tab.
Task 3. Create a detail filter to filter out nulls.
1. In the report layout, click <Non-null Campaigns>, click the ellipsis, and then
click Edit Set.
7. In the Filters dialog box, click Add , in the Create filter dialog box, click
Advanced, and then click OK.
This report is 181 pages long, and there are no rows with all null values,
indicating that the detail filter is working.
3. Close the rendered report tab.
Task 5. Use the filter function to attempt the same report.
1. Click the container selector for the crosstab.
2. On the toolbar, click Filters, click Edit Filters, click the [Revenue]<>null filter,
and then under Usage, click Disabled.
3. Click OK.
4. Click <Non-null Campaigns> in the rows of the report layout, click the ellipsis
on the toolbar, click Edit Set, and then double-click Set expression.
5. Create and validate the following expression:
filter ([sales_and_marketing].[Promotions].[Promotions].[Campaign],
[Revenue]<>null)
Hints:
• Available Components pane > Data Items tab: Revenue
6. Click OK to close the Set expression dialog box, and then click OK to close the
Set definition dialog box.
The report is 226 pages long. It ran faster than the one in the previous task,
even though it is longer. This is because the detail filter, applied in the previous
task, affects the lowest level item intersections of Region and Year. The
intermediate result set that returns products, order methods, and campaigns
must still be created to test against those intersection values (details).
Although the report performs well, there are rows that contain all null values.
This is because the filter function is applied only to the Campaign level and not
to the Region level.
8. Close the rendered report tab.
Task 6. Use another filter function to filter on a nested set.
1. In the report layout, click <#Region#>, and then press the Delete key to
remove it from the report.
2. From the Toolbox pane, drag a Query Calculation to the right of <#Order
method type#>, click the Set expression radio button, from the Hierarchy list,
click the Retailers hierarchy.
3. Click OK.
4. In the Set expression dialog box, in the Name field, type Non-null Regions.
The report is returned quickly, is 162 pages long, and rows with all null values
have been removed.
The filter function is not required on the higher levels in the nesting, but is
recommended for more efficient zero suppression queries. The filter function on
Campaign could be removed and the report would run with the same results.
However, if it is left in, and if the condition at the higher level is not met, then the
lower level does not need to be evaluated, thereby saving processing time. This
is only valid for zero suppression filters. For threshold filters such as
[Revenue]>1000000, the filter should only be applied at the level you are trying
to evaluate.
This demonstration is about using the filter function vs. using a detail filter, but
zero suppression is yet another way that you could have achieved the same
results quickly with another method (the UI toolbar).
Slicers
• A slicer:
Provides context to intersection values
Affects the values of the cells of the report but not the rows or columns
Uses an expression that returns a set of members from the same dimension
• You can create multiple slicers if you need to filter across two or more
dimensions
• You cannot create two slicers for the same dimension
Slicers
Slicers require a dimensional model and cannot be used without one. This is because
they are member set expressions which are a dimensional structure.
There are certain scenarios where a slicer does affect the rows or columns. For
example, if you use a topCount function to return a set of members, the slicer provides
context to what is evaluated as the top members of a set.
A practical use of slicing on the same dimension might be if you include a root member
of a dimension, such as Order Method in the report, and then create a dynamic slicer
(that includes the Order Method level in the expression) that prompts the user to
choose an order method from a list of order methods.
If you have used PowerPlay or Analysis Studio then you have already used a slicer – in
PowerPlay it is called the dimension bar and in Analysis Studio it is called the context.
Analysis Studio even uses a slicer to implement the context. If you were to create an
analysis with a context in Analysis Studio and bring it into IBM Cognos Analytics, you
can see the slicer that Analysis Studio generated.
Slicer example
• Create a slicer containing the 2011 member
2012 2011
2011 France
2010
All Years Germany
France United
Germany Kingdom
All
United Kingdom Countries
Tents
Stoves
Golf
All Products
All Countries
Tents
Stoves
Golf
All Products
Slicer example
If we use the example of a cube as an OLAP data source, we can see that the height of
the cube corresponds to the rows, the width corresponds to the columns, and the depth
corresponds to the slice.
You can use either the slicer pane in the query, or the context filter pane in the report
page to slice the data.
Demonstration 4
Filter dimensional data using slicers
Demonstration 4:
Filter dimensional data using slicers
Purpose:
You will create slicers to filter the rollup values of the measures that appear in
the cells of a crosstab report. You will create a simple slicer using a single
member and a more complex slicer using the set function to slice on multiple
members. Both of these slice on a dimension that is not referenced on the
columns or rows edge. You will then modify the slicer to slice on a dimension
that does exist on the columns edge.
Server: http://vclassbase:9300/bi
User/Password: brettonf/Education1
Package: Team content > Samples_PowerCube > Cubes > Sales and
Marketing (cube)
Report type: Crosstab
Task 1. Create a simple slicer.
1. Without saving any previous reports, create a Crosstab report using the Sales
and Marketing (cube) package.
2. In the Data pane, add the following members to the new crosstab report object:
• Rows: Products dimension > Products hierarchy > Product type
• Columns: Order method dimension > Order method hierarchy > Order
method type
• Measures: Measures > Quantity
The report shows quantities for all product types for all order methods for all
years. You want to filter the report to show quantities for all product types for all
order methods for only the year 2011. You will create a slicer to do this.
5. In the Navigate pane, click the Query explorer tab, and then click Query1.
6. In the Data pane, expand the Time dimension > Time hierarchy > Year level >
Members folder, and then drag the 2011 member to the Slicer pane.
7. Run the report in HTML.
A section of the report appears as follows:
The product type and order method row and column edges are not affected, but
the quantity sold values now reflect only the year 2011.
You will now modify the slicer by adding an additional member from the same
dimension. You will use the set function inside the slicer to accomplish this. This
will add an additional year of data to the report.
8. Close the rendered report tab.
Task 2. Create a slicer using the set function.
1. In the Slicer pane, double-click [2011].
2. Create and validate the following expression:
set([2011],[2012])
Hints:
• From the Source tab: Time dimension > Time hierarchy > Year level >
Members folder > 2011 and 2012 member
3. Click OK to close the Slicer member expression dialog box.
4. Run the report in HTML.
A section of the report appears as follows:
The product type and order method row and column edges are not affected, but
the quantity sold values now reflect the years 2011 and 2012.
You have created a slicer using the set function, which uses members from the
same dimension. You will now examine the result when you add an additional
slicer that uses members from a dimension that appears on the columns or
rows edge.
5. Close the rendered report tab.
Task 3. Create a compound slicer that uses members from a
dimension that appears on the columns edge.
1. From the Toolbox pane, drag a Slicer member set to the Slicer pane.
2. Create and validate the following expression:
set([Fax],[Telephone],[Mail])
Hints:
From the Source tab, expand the Order method dimension > Order method
hierarchy > Order Method type level > Members folder, click Fax, Ctrl+click
Telephone, and Mail, drag the items to the Expression Definition.
3. Click OK to close the Slicer member expression dialog box.
The slicer populates the pane.
4. Run the report in HTML.
A section of the report appears as follows:
The row and column edges are not affected by the slicer. The slicer filters the
cell data only, returning null values where there is no matching member on the
edge.
5. Close the rendered report tab.
6. Leave the browser open.
Results:
You created slicers to filter the rollup values of the measures that appear in
the cells of a crosstab report.
Unit summary
• Compare dimensional queries to relational queries
• Explain the importance of filtering dimensional queries
• Evaluate different filtering techniques
• Filter based on dimensions and members
• Filter based on measure values
• Filter using a slicer
Unit summary
Exercise 1
Create a set using a prompt and the
except() function
Exercise 1:
Create a set using a prompt and the except() function
Server: http://vclassbase:9300/bi
User/Password: brettonf/Education1
Package: Team content > Samples_PowerCube > Cubes > Sales and
Marketing (cube)
Report type: Crosstab
Users have requested a report that shows returns for each year for specific product
types. You will create a crosstab report that prompts users to choose the product types
for which they do not want to see returns. They will see returns for all other product
types.
To accomplish this you need to:
• Create a crosstab report using the following query items from the Sales and
Marketing (cube) package:
• Column: Time dimension > Time hierarchy > Year level
• Measure: Measures > Returns
• Add a query calculation named Selected Product Types to the rows in the report.
The calculation will prompt the user to select from multiple product types.
• Modify the Selected Product Types expression to display values for all product
types not selected by the user. You will do this by modifying the edge expression
(through the set definition) so that it includes the except() function and the
appropriate prompt syntax.
• Run the report, using Eyewear, Navigation, and Watches when prompted for a
product type.
For more information about where to work and the exercise results, refer to the Tasks
and Results section that follows. If you need more information to complete a task, refer
to earlier demonstrations for detailed steps.
Exercise 1:
Tasks and Results
Task 1. Filter a report using a prompt.
• Create a Crosstab report using the Sales and Marketing (cube) package.
• Add the following:
• Columns: Time dimension > Time hierarchy > Year level
• Measure: Measures > Returns
The results appear as follows:
• From the Toolbox pane, under TEXTUAL, drag a Query calculation item to the
Rows drop zone.
• In the Create Calculation dialog box, click Set expression, and then, from the
Hierarchy list, click Products hierarchy.
• In the Set Expression dialog box:
• Name the calculation Selected Product Types.
• Create and validate the following expression:
set ([sales_and_marketing].[Products].[Products].[Product type]->?pt?)
• Validate the expression using the Binoculars product type, and then close the
dialog boxes.
The results appear as follows:
• Use Ctrl-click to select Eyewear, Navigation, and Watches, and then click OK.
The report shows returns for the product types selected in the prompt.
• In the prompt, select Eyewear, Navigation, and Watches, and then click OK.
The report shows returns for all product types except the ones you selected in
the prompt, which were Eyewear, Navigation and Watches.
The results appear as follows:
Unit objectives
• Use IBM Cognos Analytics dimensional functions to create sets and
tuples
• Perform arithmetic operations in OLAP queries
• Identify coercion errors and rules
Unit objectives
Participants should be familiar with:
• Basic concepts using the dimensional style and relational style of report authoring
• Basic concepts of dimensional data sources
• The behavior of relational queries versus dimensional queries
• Creating efficient dimensional queries
• Options for focusing data returned by dimensional queries
Suggested units to reference:
• Introduction to Dimensional Reporting Concepts
• Focus Your Dimensional Data
Additional Information:
• Coercion: Attempting to force the system to do something it is not designed to do
In the crosstab, Product lines are the children of Products, and in the total function, the
total revenue of Products is included with the totals of the Product lines. The aggregate
function recognizes the duplication, and aggregates the revenue of the Product lines,
but does not include the revenue of the parent member Products, which has already
been evaluated.
You should not use an explicit summary function unless you know the data well enough
to know where it is safe to use. Communicate with your modeler(s) to ensure that the
aggregation tasks you apply will return expected results.
Be aware that it can be more efficient to use a parent member instead of a member
summary function when creating an aggregate across the full set of sibling members
when the aggregate matches the default aggregate function for the measure.
We say performance may be degraded because this is typically true for any large data
set. More processing time is required when asking for values that are not pre-calculated
in the data source.
In this case, we filtered out items from the set, and we are aggregating the remaining
set. The data source does not have this value pre-calculated. If we had only aggregated
the set without filtering, the data source would simply retrieve the rollup value for all
product lines which is pre-calculated in the data source. To use this expression, you
must know your data extremely well to ensure that accurate values are returned (what
is default roll up for the measure: sum, average, minimum?). Talk to your data modeler
to ensure that there are no data source configurations that may return unexpected
results.
Demonstration 1
Show totals and exclude members
Demonstration 1:
Show totals and exclude members
Purpose:
Consumers want to review the totals for the top two product lines, the totals
for excluded members and the overall totals. To provide this, you will edit the
set definition for the top two product lines, and use the aggregate function
and the except function.
Server: http://vclassbase:9300/bi
User/Password: brettonf/Education1
Package: Team content > Samples_PowerCube > Cubes > Sales and
Marketing (cube)
Report type: Crosstab
Task 1. Create a crosstab report showing the top two product
lines.
1. Without saving any previous reports, create a Crosstab report using the Sales
and Marketing (cube) package.
2. In the Data pane, from the Source tab, add the following members to the
crosstab:
• Rows: Products dimension > Products hierarchy > Product line
• Columns: Time dimension > Time hierarchy > Year
• Measures: Measures > Revenue
3. In the Data pane, expand the Time dimension > Time hierarchy > Members
folder, and drag the Time member to the right of <#Year#> as a peer.
4. In the crosstab, click <#Product line#>, click the ellipsis on the toolbar, and
then click Edit Set.
5. In the Set definition dialog box, click New, and then click Top.
6. In the Top or bottom dialog box, in the Count box type 2, and then in the
Based on intersection (tuple) box, click the ellipsis.
The top two product lines for all years are displayed.
13. Close the rendered report tab.
Task 2. Aggregate the Top Two Product Lines data item to
show totals.
1. In the report layout, click <#Top Two Product Lines#>, on the toolbar, click
Summarize, and then, from the list, click Default summary.
You want to apply a meaningful name to the summary.
2. Click Summary, click the ellipsis on the toolbar, and then click Edit Data Item
Label.
3. In the Data item label box, change the text to Summary (Top Two Product
Lines), and then click OK.
The report shows the aggregated summary for the top two product lines for
each year and for all years.
5. Close the rendered report tab.
Task 3. Create a calculation to return totals for excluded
members.
1. From the Data pane, drag Products dimension > Products hierarchy >
Product line level below Summary (Top Two Product Lines).
2. Click <#Product line#> to select it and then on the toolbar, click the ellipsis
followed by clicking Cut.
You do not want Product line in the report, but you want to reuse the data item
in the query.
3. From the Toolbox pane, under TEXTUAL, drag a Query calculation object to
the Rows drop zone under Summary (Top Two Product Lines) as a peer.
This type of expression, as stated earlier, can result in poor performance if the
data set is large.
4. Verify that Calculated member is selected, and then click OK.
You left the Hierarchy setting in the Create Calculation dialog box as Automatic.
5. In the Name field type Excluded and then create and validate the following
expression:
aggregate (currentMeasure within set except([Product line],[Top Two
Product Lines]))
Hints:
• Available Components pane > Data items tab: Product line
• Available Components pane > Data items tab: Top Two Product Lines
This expression aggregates the totals of all product line members with the
exception of the top two product line members, as defined in the expression
<#Top Two Product Lines#> in the crosstab, and returns the totals for all
product members not shown in the crosstab.
6. Click OK to close the Calculated member expression dialog box.
The Products row is not labeled intuitively to let consumers know it is an overall
total. You will change the label to be more intuitive, and format the row to be
consistent with the Summary (Top Two Product Lines) row.
2. In the report layout, click <#Products#>, in the Properties pane, under the
TEXT SOURCE section, click the Source Type property, and then in the list,
click Text.
3. Click the Text property; click the ellipsis, type All Products, and then click OK.
4. In the Properties pane, under the MISCELLANEOUS section, click the
Classes property, and then click the ellipsis.
5. In the Selected classes pane, click Crosstab member cell, and then click the
left arrow to remove it from the list.
6. In the Global classes pane, double-click Crosstab member cell (outer
member, not nested) to add it to the Selected classes pane, and then click
OK.
7. In the crosstab, click All Products, click the ellipsis on the toolbar, and then
click Select Member Fact Cells.
The report now shows the overall totals for products in an appropriate format.
11. Close the rendered report tab.
12. Save the report in Team content > Student_B6061 as
Unit5_Demonstration1, and leave the report open to continue building this
report in the next demonstration.
Results:
Using the set definition top two functionality, the user interface summary
feature, the aggregate and except functions and appropriate labeling, you
showed the totals for the top two product lines, the totals for excluded
members and the overall totals for products.
Demonstration 2
Create a percent of base calculation
Demonstration 2:
Create a percent of base calculation
Purpose:
Consumers want to see the percentage each value in the report contributed to
the overall revenue for all time.
You will use simple arithmetic and the tuple function to achieve this
calculation, and then arrange and format the report as required.
Note: You need to complete Demonstration 1 before starting this demonstration. If you
were unable to complete the previous demonstration successfully, you can use the
Solution file for the previous demonstration, found in Team Content > B6061 >
Solutions > 05 Calculations_and_Dimensional_Functions > Demonstration 1 Solution.
Server: http://vclassbase:9300/bi
User/Password: brettonf/Education1
Package: Team content > Samples_PowerCube > Cubes > Sales and
Marketing (cube)
Report type: Crosstab
Task 1. Create a percent of base calculation using an
arithmetic operator and the tuple function.
You will use the report built in the previous demonstration as a starting point for this
demonstration.
1. From the Toolbox pane, under TEXTUAL, drag a Query calculation object to
the columns under <#Year#> to nest as a child.
2. In the Create calculation dialog box, click Calculated measure and then click
OK.
3. In the Calculated measure expression dialog box, in the Name field type
% of Base, and then create and validate the following expression:
[Revenue]/tuple ([Revenue],[Products])
This expression takes each revenue value in the context of the report and
divides it by the values found at the intersection of Revenue and Products (all
products). In other words, they are divided by the total of all products for each
respective year.
Hints:
• Available Components pane > Data Items tab: Revenue
• Available Components pane > Data Items tab: Products
The % of Base calculation shows the percentage that each Revenue row
contributes to the total at the bottom of the column (All Products). However,
consumers want to see the % of Base for the overall total for all years, in this
case, 4,686,775,768.85. You can accomplish this by changing the tuple function
in the % of Base calculation to include the Time member (all years).
10. Close the rendered report tab.
Task 2. Modify the % of base calculation and reuse it
elsewhere in the report layout.
1. In the report layout, double-click % of Base.
The Calculated measure expression - % of Base dialog opens.
2. Modify and validate the expression as follows:
[Revenue]/tuple ([Revenue],[Products],[Time])
The expression now takes each revenue value in the context of the report and
divides it by the values found at the intersection of Revenue, Products (all
products), and Time (all years). In other words, each revenue value is now
being divided by the overall total 4,686,775,768.85.
Hints:
• Available Components pane > Data Items tab: Time
6. Repeat steps 6 to 8 from Task 1 to format the % of Base cells under <#Time#>
to appear as percentages.
7. On the toolbar, click Run Report.
The results appear as follows:
The % of Base calculation now shows the percentage that each revenue cell
value contributed to the overall total of all products for all time. Notice that the
second % of Base calculation that you placed in the report layout takes on the
context of the columns and rows.
8. Close the rendered report tab.
9. Leave the Web browser open.
Results:
Using simple arithmetic, as well as the tuple function, you created a Percent
of Base calculation to illustrate how each revenue value contributes to the
overall total of the report. You reused the Percent of Base calculation which
automatically reflects the context of where it was positioned in the report. You
also applied appropriate formatting to maintain consistency in your report.
Sort by Value
Sort by Value - Ascending Sort by Value - Descending
Demonstration 3
Nest dimensional functions to create a dynamic bottomPercent report
Demonstration 3:
Nest dimensional functions to create a dynamic
bottomPercent report
Purpose:
You want to create a report that identifies the countries that are in the
bottom 20% of planned revenue for a given year. The report should show
revenue values and planned revenue values separately. Users want to choose
which countries to evaluate, and which year to apply the evaluation. To
achieve this, you will use the bottomPercent function that uses a nested tuple
function. You will also use prompts to make the report dynamic. You will
modify the report so that you can identify how the bottomPercent function
behaves.
Server: http://vclassbase:9300/bi
User/Password: brettonf/Education1
Package: Team content > Samples_PowerCube > Cubes > Sales and
Marketing (cube)
Report type: List
Task 1. Create a dynamic report using nested dimensional
functions.
1. Without saving any previous reports, create a List report using the Sales and
Marketing (cube) package.
2. To the left of Frank Bretton, click More , and then click Options.
3. In the Report tab, deselect Automatic group and summary behavior for
lists.
4. From the Toolbox tab, under TEXTUAL, drag a Query calculation object to
the report layout.
5. In the Create calculation dialog box, click Other expression, and then click
OK.
6. In the Data item expression dialog box, in the Name field type Selected Year,
and then create and validate the following expression:
[sales_and_marketing].[Time].[Time].[Year]->?Year?
Hints:
• Available Components pane > Source tab: Time dimension > Time hierarchy
> Year level
• Validate using 2010
19. From the Data pane, drag the Revenue measure to the right of Bottom 20%
Planned Revenue.
20. Run the report in HTML.
A prompt is generated, and appears as follows:
There are more than 20 countries to choose from. At this point you will select all
of them.
21. Under the Country prompt, click Select all, and in the Year list, click 2012, and
then click OK.
The results appear as follows:
The report is filtered to show the countries that are in the bottom 20% for
planned revenue for the year 2012. Notice that the report shows revenue values
and not planned revenue values.
You will modify the report to show a summary value for revenues, and you will
further examine how the bottomPercent function works.
22. Close the rendered report tab.
The report shows a summary value for Revenue. More importantly, the report is
filtered to show the countries that were chosen in your prompt. If you compare
this report to the report at the end of Task 1, you may ask why Mexico is now
included. The results are based on how the bottomPercent function works. To
help explain this, you will add a second query that shows us the planned
revenue for these countries.
5. Close the rendered report tab.
Task 3. Add a block object to the report layout.
You will now add a block object to improve the layout of the report, before
adding another list report.
1. From the Toolbox pane, drag a Block object under the existing List report.
2. With the Block object selected in the report layout, in the Properties pane,
under POSITIONING, click the Size & overflow property, and then click the
ellipsis.
3. In the Size & overflow dialog box, in the Height box, type 30, and then click
OK.
4. In the Properties pane, under BOX, click the Padding property, and then click
the ellipsis.
5. In the Padding dialog box type 20 in the Top padding box, and then click OK.
You have formatted the block object to a specific height and padding for
separating the objects in your report, and will now add a second list report.
15. In the report layout, click the <Total (% of Total Planned Revenue)> summary
cell, and then in the Properties pane, under DATA, ensure that the Data
Format is Percent.
16. From the Toolbox pane, drag a Query calculation, to the right of <% of Total
Planned Revenue>.
17. In the Create calculation, click Other expression, and then click OK.
18. In the Data item expression dialog box, in the Name field, type Running Total
of % Planned Revenue, and then create and validate the following expression:
running-total ([% of Total Planned Revenue])
Hints:
• Available Components pane > Data Items tab: % of Total Planned Revenue
19. Click OK to close the Data item expression dialog box.
20. Click <Running Total of % Planned Revenue>, and in the Properties pane,
under DATA, click the Data Format property, and then click the ellipsis.
21. In the Format type list, click Percent, and then click OK.
22. Run the report in HTML.
23. In the Retailer country list, click Brazil, Ctrl+click Canada, Mexico and United
States, in the Year list, click 2012, and then click OK.
The results appear as follows:
The bottom list report shows the total for planned revenue values for the four
countries. These are the same four countries that you selected in the prompt.
Also displayed is the percent of total planned revenues, and a running total.
For the top list report, the bottomPercent function works as follows:
• The total planned revenue, for the selected countries from the prompt, is
evaluated to be 477,326,244.24.
• The planned revenue from each of the selected countries is evaluated from
lowest to highest (Brazil, Mexico, Canada, United States).
• The values from lowest to highest are summed, until a value that is 20% of
the total is reached. 20% of 477,326,244.24 = 95,465,248.85.
• Planned revenue for Brazil is 45,151,584.06. Since that member alone does
not reach the bottom 20% threshold of 95,465,248.85, planned revenue for
Mexico (61,848,335.71) is added to planned revenue for Brazil to equal
106,999,919.77. The value is evaluated as being higher than the 20%
threshold. Notice that only a portion of the planned revenue for Mexico
contributes to reaching the bottom 20% threshold. The evaluation ends and
the countries that contribute to reaching the 20% threshold are shown in the
report. Because the planned revenue measures for Canada or the United
States do not contribute to reaching the 20% plateau, they are not shown in
the report.
24. Close the rendered report tab.
25. Leave the browser open for the next demonstration.
Results:
You created a report so that users can identify the Countries that are in the
bottom 20% of planned revenue for a given year. You used the bottomPercent
function, which included a nested tuple function, and you also used prompts
to make the report dynamic. You identified how the bottomPercent function
behaves.
Demonstration 4
Create a variance calculation with members from different hierarchies of
the same dimension
Demonstration 4:
Create a variance calculation with members from different
hierarchies of the same dimension
Purpose:
Consumers would like to see the revenue variance between the current month
and the last month. These members are available in different hierarchies in
the Time dimension. You will take advantage of support for multiple
hierarchies per dimension to create the variance calculation.
Server: http://vclassbase:9300/bi
User/Password: brettonf/Education1
Package: Team content > Samples_PowerCube > Cubes > Sales and
Marketing (cube)
Report type: Crosstab
Task 1. Create a variance calculation for two members from
the same dimension but different hierarchies.
1. Without saving any previous reports, create a Crosstab report using the Sales
and Marketing (cube) package.
2. In the Data pane, from the Source tab, add the following members to the
crosstab:
• Rows: Products dimension > Products hierarchy > Product line
• Columns:
• Time dimension > Current Month hierarchy > Members folder > Current
Month member
• Time dimension > Last Month hierarchy > Members folder > Last
Month member (as a peer of <#Current Month#>)
• Measures: Measures > Revenue
3. From the Toolbox tab, drag a Query calculation to the Columns drop zone,
as a peer of <#Last Month#>.
4. In the Create calculation dialog box, verify that Calculated member is
selected, and then click OK.
5. In the Calculated Member Expression dialog box, in the Name field, type
Variance, and then create and validate the following expression:
[Current Month]-[Last Month]
Hints:
• Available Components pane > Data Items tab: Current Month, Last Month
In the Information pane a message is displayed about arithmetic calculations
using members from different hierarchies. You are using members from
different hierarchies in the same dimension, and will proceed, as it makes sense
in this specific use case.
6. Click OK to close the Calculated member expression dialog box.
The report layout appears as follows:
The variance between the two months is displayed. You have successfully
created a calculation between two members from different hierarchies in the
same dimension.
8. Close the rendered report tab.
9. Sign out as Frank Bretton.
10. Close the Web browser.
Results:
By taking advantage of support for multiple hierarchies per dimension, you
were able to create a variance calculation between the current month and last
month.
currentMember ([sales_and_marketing].[Products].[Products].[Products])
What is coercion?
Expression:
bottomCount ( set_expression , index_expression , numeric_expression )
a set is expected
What is coercion?
Coercion is the conversion of one dimensional data type to another. With coercion
rules, you can build simpler expressions.
Coercion is sometimes referred to as automatic data type conversion or automatic
casting.
IBM Cognos supports the following types of coercion:
• coercion of an object of one dimensional type into another, such as a level into a
member set
• coercion of a dimensional object into a numeric, date, time, or string value, such
as a numeric measure into a numeric value
Unit summary
• Use IBM Cognos Analytics dimensional functions to create sets and
tuples
• Perform arithmetic operations in OLAP queries
• Identify coercion errors and rules
Unit summary
Unit objectives
• Navigate dimensional data using family functions
Unit objectives
Participants should be familiar with basic concepts of reporting using the dimensional
style and dimensional data sources.
Suggested units to reference:
• Introduction to Dimensional Reporting Concepts
• Introduction to Dimensional Data in Reports
• Focus Your Dimensional Data
• Calculations and Dimensional Functions
Time
FirstChild Parent
2011 2012 Q4
2011 2012
children(member)
Camping Equipment
Mountaineering Equipment
parent(member)
Return descendants
descendants(member|set_expression,level|dista
nce [,{ self|before|beforewithmember|after}])
Cooking Gear
TrailChef Water Bag
TrailChef Canteen
TrailChef Kitchen Kit
TrailChef Cup
TrailChef Cook Set
TrailChef Deluxe Cook Set
TrailChef Single Flame
descendants([sales_and_ TrailChef Double Flame
marketing].[Products]. TrailChef Kettle
line],3,before) Tents
Star Lite
Star Dome
Star Gazer 2
Star Gazer 3
Star Gazer 6
Star Peg
Sleeping Bags
Return descendants
This function returns the set of descendants, at a specified level or distance from the
specified set of members.
You can modify the set of members returned by using the parameters self, before,
beforewithmember, and after. The example above returns the set of members one and
two levels below the level product line due to the parameters 3 and before.
The diagram shows a section of the hierarchy structure, and a section of the results of
the expression used. The diagram does not represent the entire results returned, as it is
too big to fit in this diagram.
Demonstration 1
Create a crosstab report and show descendants of the Products
hierarchy
Demonstration 1:
Create a crosstab report and show descendants of the
Products hierarchy
Purpose:
You will explore the descendants function to determine the members returned
when using different levels of detail in the expression. By creating a variety of
reports based on the Products hierarchy, you can modify the output to display
multiple intermediate levels.
Server: http://vclassbase:9300/bi
User/Password: brettonf/Education1
Package: Team content > Samples_PowerCube > Cubes > Sales and
Marketing (cube)
Report type: Crosstab
Task 1. Show a descendant level.
1. Without saving any previous reports, create a Crosstab report using the Sales
and Marketing (cube) package.
2. From the Data pane, add the following members to the crosstab report object:
• Columns: Time dimension > Time hierarchy > Year
• Measures: Measures > Revenue
3. From the Toolbox pane, under TEXTUAL, drag a Query calculation object to
the Rows drop zone.
4. In the Create calculation dialog box, click Set expression, from the Hierarchy
list, click the Products hierarchy, and then click OK.
5. In the Set expression dialog box, in the Name field, type Descendants of
Products, and then create and validate the following expression:
descendants ([Products],2)
By using 2, you specify that you want to retrieve the set of members that are two
levels below the member (Products) specified in the expression.
Hints:
• Available Components pane > Source tab: Products dimension > Products
hierarchy > Members folder > Products member
The report shows members from two levels below the level of the Products
member. These members are from the Product type level.
8. Close the rendered report tab.
Task 2. Show an intermediate level of descendants.
1. In the report layout, click <Descendants of Products>, click the toolbar
ellipsis, and then click Edit Set.
2. In the Set definition dialog box, double-click Set expression.
3. In the Expression Definition box, modify and validate the expression as
follows:
descendants ([Products],2,before)
This will return members from the levels between the levels specified in the first
and second arguments. In this case, there is only one level: Product line.
4. Click OK to close the Set expression dialog box, and then click OK to close the
Set Definition dialog box.
5. Run the report in HTML.
The results appear as follows:
2. In the Set definition dialog box, double-click Set expression, and then in the
Expression definition box, modify and validate the expression as follows:
descendants ([Products],3,before)
3. Click OK to close the Set expression dialog box, and then click OK to close the
Set definition dialog box.
4. In the report layout, ensure that <Descendants of Products> is selected, and
in the Properties pane, under GENERAL, click the Level Indentation property,
and then click the ellipsis.
5. In the Indentation type section, click the Based on the level in the hierarchy
radio button to select it.
6. In the Indentation length box, type 15, in the Direction section, in the Start
after the following level box, type 1, and then click OK.
7. Run the report in HTML.
A section of the report appears as follows:
The report shows members from the Product type and Product line levels,
indented according to the properties you changed.
8. Close the rendered report tab.
Task 4. Show multiple intermediate levels and the specified
level.
1. In the report layout, click <Descendants of Products>, click the toolbar
ellipsis, and then click Edit Set.
2. In the Set definition dialog box, double-click Set expression, and then in the
Expression definition box, modify and validate the expression as follows:
descendants ([Products],3,before self)
This will return members from the levels between the levels specified in the first
and second arguments, and the members from the level specified in the second
argument.
3. Click OK to close the Set expression dialog box, and then click OK to close the
Set definition dialog box.
4. Run the report in HTML.
A section of the report appears as follows:
The report shows members from the Product line, Product type, and
Product name levels.
5. Close the rendered report tab.
6. Leave the browser open for the exercise.
Results:
You explored the descendants function and determined the members returned
when using different levels of detail in the expression. You created a variety
of reports based on the Products hierarchy, and modified the output to
display multiple intermediate levels.
Ancestor
ancestor (member, level|integer) 2012/Dec
Year level
2012
cousin(member1, member2)
2012
member2
member1 result
Unit summary
• Navigate dimensional data using family functions
Unit summary
Exercise 1
Determine the product line for a product, using the ancestor() function
Exercise 1: Determine the product line for a product, using the ancestor() function
Exercise 1:
Determine the product line for a product, using the ancestor()
function
The marketing staff wants a report that returns the product line for a product, without
having to know the product type information.
To do this, you must:
• Create a list report using the Sales and Marketing (cube) package
• Prompt the user to select a product
• Add a column to display the product line of the selected product
• Test your report by selecting Capri as the product to determine the product line it
will return
Optional Challenge: After creating this report, find another expression using a different
family function that will achieve the same output of displaying the product line of a
specific product.
One possible response to the optional challenge: parent (parent ([Capri]))
For more information about where to work and the exercise results, refer to the Tasks
and Results section that follows. If you need more information to complete a task, refer
to earlier demonstrations for detailed steps.
Exercise 1:
Tasks and Results
Server: http://vclassbase:9300/bi
User/Password: brettonf/Education1
Package: Team content > Samples_PowerCube > Cubes > Sales and
Marketing (cube)
Report type: List
Task 1. Create a list report with a prompt to select a product.
• Create a list report, without saving the previous report.
• Toolbox pane: Drag a Query calculation object to the list report layout.
• Create Calculation dialog box: Use the Set expression and the Products
hierarchy .
• Set expression dialog box: Name the expression Selected Product, and then
create and validate the following expression:
[sales_and_marketing].[Products].[Products].[Product]->?Selected
Product?
• Validate using Aloe Relief.
Task 2. Add a column to display the product line, using the
ancestor function.
• Toolbox pane): Drag a Query calculation object to the right of Selected
Product on the list report layout.
• Create calculation dialog box: Use the Set expression and the Products
hierarchy.
• Set expression dialog box: Name the expression Product Line of Selected
Product, and then create and validate the following expression:
• ancestor([sales_and_marketing].[Products].[Products].[Product]->
?Selected Product?, [sales_and_marketing].[Products].[Products].
[Product line])
The results appear as follows:
• Run the report in HTML, selecting Capri from the prompt list.
The results appear as follows:
The report shows the selected product and the corresponding product line level.
• Close the rendered report tab.
Exercise 2
Create a dynamic crosstab
report with combined
dimensional functions
Exercise 2:
Create a dynamic crosstab report with combined dimensional
functions
The Sales department wants a report on planned revenues from different cities and
countries by order method and by quarter. They want the report to be interactive so that
they can narrow the focus to a selected order method and quarter. In the report, they
want to see the planned revenue for each city and country for the selected order
method and the combined planned revenue for all other methods not selected in the
prompt.
To accomplish this, you must:
• Create a crosstab report using the Sales and Marketing (cube) package, using
Planned revenue as the measure.
• Add a query calculation named Location to the rows. The calculation returns the
descendants of the Region level starting at the Retailer site level. Include the
Retailer site level and the previous level from the hierarchy.
• Format rows to include indentation.
• Add a query calculation named Selected Order Method on columns. The
calculation returns an interactive list of order methods.
• Create a prompt page that includes a value prompt. The value prompt will use
the parameter that is generated by the Selected Order Method query
calculation.
• Add a second value prompt to the page and create a new parameter named
Quarter. Use the Quarter level when creating the parameterized filter for the
parameter, and create a new query.
• Add a query calculation named All Other Order Methods on columns (beside
Selected Order Method). This calculation returns the total planned revenue for
order methods, except for those order methods that are selected in the first
prompt.
• Show the selected quarter from the prompt as a left-justified title on the report
(Additional Challenge).
• Run the report using Web and 2012 Q 4 at the prompts.
For more information about where to work and the exercise results, refer to the Tasks
and Results section that follows. If you need more information to complete a task, refer
to earlier demonstrations for detailed steps.
Exercise 2:
Tasks and Results
Server: http://vclassbase:9300/bi
User/Password: brettonf/Education1
Package: Team content > Samples_PowerCube > Cubes > Sales and
Marketing (cube)
Report type: Crosstab
Task 1. Create a crosstab report that includes the
descendants of the Retailers hierarchy on rows.
• Create a new Crosstab report, without saving the previous report.
• Data pane: drag Measures > Planned revenue to the Measures drop zone.
• Toolbox pane: Drag a Query calculation object to the to the Rows drop zone.
• Create calculation dialog box: Use the Set expression and the Retailers
hierarchy
• Set expression dialog box: Name the expression Location, and then create and
validate the following expression:
descendants ([sales_and_marketing].[Retailers].[Retailers].[Region],
[sales_and_marketing].[Retailers].[Retailers].[Retailer site],self before)
• Properties pane: For the <Location> crosstab node member, under GENERAL,
open the Level Indentation property dialog box.
• Click the Based on the level in the hierarchy button to select it, and then in the
Indentation length box, type 15.
• In the Start after the following level box, type 2, and then click OK.
Relative functions
Unit objectives
• Navigate dimensional data using relative functions
• Navigate dimensional data using relative time functions
Unit objectives
Participants should be familiar with basic concepts of reporting using the dimensional
style and dimensional data sources.
Time dimension
(with Year, Quarter, and Month levels)
Time
2012 2013
2011 2012
Demonstration 1
Use family and relative dimensional functions to focus reports
Demonstration 1:
Use family and relative dimensional functions to focus reports
Purpose:
Using family and relative dimensional functions, you will author a report that
lets consumers select a specific month for which to view the return values
across product lines. You will also compare the results to the previous month,
and to the same month from the previous year.
Server: http://vclassbase:9300/bi
User/Password: brettonf/Education1
Package: Team content > Samples_PowerCube > Cubes > Sales and
Marketing (cube)
Report type: Crosstab
Task 1. Examine the data structure in the Years hierarchy.
You will use the technique shown in this task to view the data structure in the Time
hierarchy. This technique is useful in helping to understand the structure of the data and
provides confidence when navigating the structure with dimensional functions.
1. Create a new Crosstab report, without saving any previous reports.
2. From the Data pane, drag Time dimension > Time hierarchy to the Rows drop
zone.
3. In the Insert hierarchy dialog box, click All members, and then click OK.
4. In the crosstab, click <#Time#>, and in the Properties pane, under GENERAL,
click the Level indentation property, and then click the ellipsis.
5. In the Level indentation dialog box, in the Indentation type section, verify that
the Based on the level in the hierarchy button is selected, in the Indentation
length box, type 15, and then click OK.
The report displays the Time hierarchy, indenting each level fifteen pixels from
the parent level. You can page through the report to ensure the data is
structured in a logical order. In this case it is; therefore, you can safely apply
family and relative functions to navigate the data.
If the data source was a dimensionally modeled relational (DMR) source, the
data would likely not be in a logical structure as seen above, and therefore could
not be navigated with predictability using the dimensional functions.
You can write the same report using the GO Data Warehouse package (a DMR
source) to illustrate that the lowest level values are not sorted. In the case of GO
Data Warehouse, the day dates are not sorted logically and therefore are not
candidates for navigating with dimensional functions. The results would not be
predicable.
7. Close the rendered report tab.
Task 2. Create a crosstab report that prompts the user for a
month.
1. Create a new Crosstab report, using Sales and Marketing (cube), without
saving the previous report.
2. From the Data pane, add the following members to the new crosstab report
object:
• Rows: Products dimension > Products hierarchy > Product line
• Measures: Measures > Returns
3. From the Toolbox pane, drag a Query calculation object to the Columns drop
zone
4. Click Set expression and then, from the hierarchy list, click the Time hierarchy.
The report appears displaying only one column for the month that was selected.
3. Close the rendered report tab.
Task 4. Create a calculation to show values for the previous
month.
1. From the Toolbox pane, drag a Query calculation object to the right of
<Selected Month> column as a peer.
2. In the Create calculation dialog box, click Set expression, from the hierarchy
list, click the Time hierarchy, and then click OK.
3. In the Set expression dialog box, in the Name Field, type Previous Month,
and then create and validate the following expression:
prevMember ([Selected Month])
Hints:
• prevMember: You can type this in the expression, or you can add this
function using the Functions tab > Dimensional Functions under Available
Components which would also provide expected syntax. This particular
function expects a member as a parameter.
• Available Components pane > Data Items tab: Selected Month
4. Click OK to close the Set expression dialog box.
The results appear as follows:
Instead of using the cousin function, you could have used the parallelPeriod
function. They basically do the same thing, but parallelPeriod is considered
more closely related to the time series and is a little more complex. In the
interest of showing a family function, you used the cousin function. The end
result is the same.
4. Click OK to close the Set expression dialog box.
The results appear as follows:
The report displays the selected month followed by the previous month and the
same month from the previous year.
3. Close the rendered report tab.
4. Leave the browser open for the next demonstration.
Results:
Using family and relative dimensional functions, you quickly created reports
to compare different time periods.
openingPeriod parallelPeriod
Time
month level 2013 Q 4
2012 prior year
2012 2013
periodsToDate
2013 Q 3
closingPeriod
month level
2012
closingPeriod(level [,member])
closingPeriod ([sales_and_marketing].[Time].[Time].[Quarter])
closingPeriod ([sales_and_marketing].[Time].[Time].[Quarter],[2012])
Time
2012 2013
periodsToDate(level, member)
periodsToDate([sales_and_marketing].[Time].[Time].[Year],[2013 Q 2])
periodsToDate([sales_and_marketing].[Time].[Time].[Time],[2013 Q 2])
Time
2012 2013
Demonstration 2
Use relative time dimensional functions to focus reports
Demonstration 2:
Use relative time dimensional functions to focus reports
Purpose:
The staff would like to view the latest sales by product line for individual
retailers. They also want to see the sales for the individual retailers for all the
quarters of the year, including the latest quarter, 2013 Q 3.
You will create a dashboard-style report using a Select & Search prompt and
relative time dimensional functions to achieve the desired outcome.
Server: http://vclassbase:9300/bi
User/Password: brettonf/Education1
Package: Team content > Samples_PowerCube > Cubes > Sales and
Marketing (cube)
Report type: Chart
Task 1. Create a gauge chart and a prompt page.
IBM Cognos Analytics now has two charting options. The newest charting style options
are set as the default. You will make use of these new styles to add charts to your
reports.
1. Create a Chart report, using the Sales and Marketing (cube), without saving
any previous report.
2. In the Insert chart dialog box, in the pane on the left, click Gauge, and then
click OK.
3. In the report layout, click the chart gauge to select it.
4. From the Data pane, add the following items to the new gauge chart:
• Default measure (y-axis): Measures dimension > Revenue
• Gauge Axes: Products dimension > Products hierarchy > Product line
• Categories (gauges): Retailers dimension > Retailers hierarchy > Retailer
name
When you run the report, you only want to allow users to select one retailer at a
time. Because the list is long, you will use a Select & Search prompt to allow
users to quickly find the retailer for which they want to view data.
5. In the Navigate pane, click Prompt pages.
6. From the Toolbox pane, drag a Page object to the Prompt pages pane, and
then double-click Prompt page1.
7. From the Toolbox pane, under PROMPTING, drag a Value prompt object to
the prompt page.
The Prompt Wizard dialog appears.
8. In the Create a new parameter box, type Retailer, and then click Next.
9. Beside Package item, click the ellipsis, expand the Retailers dimension >
Retailers hierarchy, select Retailer name level, and then click OK.
10. Click Next, accept the default to create a new query, and then click Finish.
11. Run the report in HTML.
12. From the value prompt, select Falcon Outfitters and then click Finish.
The results appear as follows:
Results are returned for Falcon Outfitters. The values are for all years. You want
to limit this gauge chart to the current month, July 2013.
13. Close the rendered report tab.
Task 2. Create a calculation to return data for the latest
month found in the data.
The data source has data only up to July 2013, but includes all months in 2013.
You will create an expression that will determine the last month of data in the
data source, so that valid results are returned when you run the report.
1. In the Navigate pane, click Page1.
2. From the Toolbox pane, drag a Query calculation object to the Categories
(gauges) drop zone, nested below <#Retailer name#>.
3. In the Create calculation dialog box, click Set expression, from the hierarchy
list, click the Time hierarchy, and then click OK.
4. In the Set expression dialog box, in the Name field, type Latest Month, and
then create and validate the following expression:
item (tail (filter ([sales_and_marketing].[Time].[Time].[Month],
currentMeasure is not null)),0)
Hints:
• Available Components pane > Source tab: Time dimension > Time hierarchy
> Month level
• Available Components pane > Source tab: Time dimension > Time hierarchy
• Validate using 4 Your Eyes
This expression works as follows:
-Access month data: members: [sales_and_marketing].[Time].[Time]. [Month]
-Get the value for the latest year being evaluated and filter it if it has data:
filter ([sales_and_marketing].[Time].[Time]. [Month]), currentMeasure is not null)
-This returns a set of months that has data. Get the last set of month members:
tail (filter ([sales_and_marketing].[Time].[Time]. [Month]), currentMeasure is not
null))
-Get the last month member from the set of members returned by the tail
function:
item (tail (filter ([sales_and_marketing].[Time].[Time]. [Month]), currentMeasure
is not null)),0)
This expression could be re-used to determine latest quarter parent([Latest
Month], or latest year (ancestor([Latest
month],[sales_and_marketing].[Time].[Time].[Year]).
5. Click OK to close the Set Expression dialog box.
6. Run the report in HTML.
7. In the value prompt, click Falcon Outfitters, and then click Finish.
The results appear as follows:
The report now shows values for the last month found in the cube: July 2013.
8. Close the rendered report tab.
You could have used a closingPeriod calculation in this demonstration, but you
must know your data well and ensure that the latest month in the data is not a
future month. In some cases, the data may contain future months for data such
as sales targets and budget forecasts. This data source has data entered up to
July 2013, but includes all the months of the year, so you will have to ensure
that your final expression will accommodate this. If you used the closingPeriod
function, you would have to know the final month of data available to use the
function as follows: closingPeriod([sales_and_marketing].[Time].[Time].[Month],
[2013/Jul])
Using the expression for Latest Month in step 3 will determine what your latest
month of data will be, without you knowing what the last month of data actually
is.
Additional Information:
If the data source defines a Current Month level, this level could be used to
retrieve data for the latest month. This cube has a Current Month level, but if
that was used, you would not be able to use other relative periods, because the
Current Month level is isolated as a single level in its own hierarchy. Therefore,
you could not apply functions such as parallelPeriod and periodsToDate,
because there is no structure to navigate. That structure is in the Time
hierarchy.
You could also use the closingPeriod function on the Quarter level to obtain the
latest quarter, but you will use the parent function on the Latest Month
calculation, because Latest Month is the anchor for the report. This guarantees
that you are using the parent of the latest month in the data. It is possible that
there may be pre-populated quarter members in the data with no months
defined beneath them. If this were the case, you would not get back the
expected results.
8. Click OK to close the Set expression dialog box.
Task 4. Test the final report.
1. Run the report in HTML.
2. In the value prompt, select Falcon Outfitters, and then click Finish.
The results appear as follows:
The report now displays a gauge chart that shows the sales of a retailer in the
latest month as well as a bar graph that shows the sales of the quarters of the
year. Because the latest month with data in the cube is July 2013, the chart only
displays the first, second, and third quarters for 2013. When reviewing the data
for the third quarter, you should consider that only one month of data (July) is
available for reporting, and therefore the quarter figures reflect this.
3. Close the rendered report tab.
4. Leave the browser open for the next demonstration.
Results:
Using relative time dimensional functions, you obtained the latest month in
the data and generated a dashboard-style report. The report showed sales of
a retailer for the latest month, July, and the quarters within this year including
the latest quarter, 2013 Q 3.
Time
2012 2013
parallelPeriod([sales_and_marketing].[Time].[Time].[Quarter],-3,[2012/Feb])
Demonstration 3
Create a periods-to-date report and compare to the previous year
Demonstration 3:
Create a periods-to-date report and compare to the previous
year
Purpose:
Consumers want to select a particular quarter. They want to compare the
revenue and quantity sold for all product lines in this quarter to the same
quarter for the previous year. They also want to see the total for periods, up to
and including the quarter selected.
You will use relative time dimensional functions and the tuple function to
author this report.
Server: http://vclassbase:9300/bi
User/Password: brettonf/Education1
Package: Team content > Samples_PowerCube > Cubes > Sales and
Marketing (cube)
Report type: Crosstab
Task 1. Create a crosstab report with a prompt for the
quarter.
1. Create a new Crosstab report, using the Sales and Marketing (cube)
package, without saving any previous report.
2. From the Data pane, add the following members to the new crosstab report
object:
• Rows: Products dimension > Products hierarchy > Product line
• Measures: Measures dimension > Revenue
3. From the Toolbox pane, drag a Query calculation object to the Columns drop
zone.
4. In the Create calculation dialog box, click Set expression, from the hierarchy
list, click the Time hierarchy, and then click OK.
5. In the Set expression dialog box, in the Name field, type Selected Quarter,
and then create and validate the following expression:
[sales_and_marketing].[Time].[Time].[Quarter]->?Quarter?
Hints:
• Available Components pane > Source tab: Time dimension > Time hierarchy
> Quarter level
• Validate using 2010 Q 1
6. Click OK to close the Prompt dialog box, and then click OK to close the Set
expression dialog box.
The results appear as follows:
You see revenue values for the selected quarter, as well as for the same
quarter from the previous year.
9. Close the rendered report tab.
Task 4. Create tuples to show the quantities sold for the
quarters.
1. From the Navigate pane, click Page1.
2. From the Toolbox pane, drag a Query calculation object to the right of
<Selected Quarter> column, as a peer.
3. In the Create calculation dialog box, click Set expression, from the hierarchy
list, click the Time hierarchy, and then click OK.
4. In the Set expression dialog box, in the Name field, type Quantity Sold for
Selected Quarter, and then create and validate the following expression:
tuple ([Selected Quarter],[Quantity])
Hints:
• Available Components pane > Data Items tab: Selected Quarter
• Available Components pane > Source tab: Measures dimension > Quantity
measure
5. Click OK to close the Set expression dialog box.
6. From the Toolbox pane, drag a Query calculation object to the right of
<Selected Quarter for Previous Year> column, as a peer.
7. In the Create calculation dialog box, click Set expression, from the hierarchy
list, click the Time hierarchy, and then click OK.
8. In the Set expression dialog box, in the Name field, type Quantity Sold for
Selected Quarter Previous Year, and then create and validate the following
expression:
tuple ([Selected Quarter for Previous Year],[Quantity])
Hints:
• Available Components pane > Data Items tab: Selected Quarter for Previous
Year
• Available Components pane > Source tab: Measures dimension > Quantity
measure
9. Click OK to close the Set expression dialog box.
10. Run the report in HTML.
11. At the prompt, click 2013 Q 2, and then click Finish.
The results appear as follows:
6. Repeat steps 2 to 5 to add a Text item to the right of the <Quantity Sold for
Selected Quarter Previous Year> column header:
• Text dialog: press the spacebar, and type Quantity Sold
• Source Type property: Report expression
• Report expression property: [Query1].[Selected Quarter for Previous
Year]
7. On the Application bar, click the ellipsis, and then click Unlocked.
8. Run the report in HTML.
9. In the prompt, click 2013 Q 2, and then click Finish.
The results appear as follows:
The tuple calculation column headers now display more intuitive labels.
10. Close the rendered report tab.
Task 6. Create a calculation to show year-to-period totals.
You will now create a calculation to show us the total values for the year for all quarters
including the selected quarter.
1. From the Toolbox pane, drag a Query calculation object to the right of the
second column, as a peer.
2. In the Create calculation dialog box, click Set expression, from the hierarchy
list, click the Time hierarchy, and then click OK.
3. In the Set expression dialog box, in the Name field, type Year-to-Period, and
then create and validate the following expression:
periodsToDate ([sales_and_marketing].[Time].[Time].[Year],[Selected
Quarter])
Hints:
• Available Components pane > Source tab: Time dimension > Time hierarchy
> Year level
• Available Components pane > Data Items tab: Selected Quarter
4. Click OK to close the Set expression dialog box.
The report returns Q 1, and Q 2 for 2013 as expected. However, you want the
report to only display the totals for these quarters, rather than for each quarter
individually.
7. Close the rendered report tab.
8. In the report layout, click <Year-to-Period>, and on the toolbar, click the
ellipses, and then click Cut.
This removes the calculation from the report layout, but keeps it in the query.
You will use the Year-to-Period expression in the next calculation.
9. From the Toolbox pane, drag a Query calculation object to the right of the
second column, as a peer.
10. In the Create calculation dialog box, click OK to accept the default settings.
11. In the Calculated member expression dialog box, in the Name field, type
Year-to-Period Totals, and then create and validate the following expression:
aggregate (currentMeasure within set[Year-to-Period])
Hints:
• Available Components pane > Data Items tab: Year-to-Period
12. Click OK to close the Calculated member expression dialog box.
The report now shows the cumulative total for revenue from the beginning of the
year to the selected quarter for both the current year and the previous year.
2012/Oct
2012/Nov
lastPeriods(integer_expression, member)
2012/Dec
lastPeriods(6,[2013/Mar])
2013/Jan
2013/Feb
2013/Mar
Demonstration 4
Create a report that spans the past six months based on a selected
month
Demonstration 4: Create a report that spans the past six months based on a selected
month
Demonstration 4:
Create a report that spans the past six months based on a
selected month
Purpose:
Consumers want to select a particular month and see the revenue generated
for all product lines over the previous six months including the selected
month. They also want to see the total values for the months.
You will use the lastPeriods dimensional function to author this report.
Server: http://vclassbase:9300/bi
User/Password: brettonf/Education1
Package: Team content > Samples_PowerCube > Cubes > Sales and
Marketing (cube)
Report type: Crosstab
Task 1. Create a crosstab report with a prompt for the
quarter.
1. Create a new Crosstab report, using Sales and Marketing (cube), without
saving any previous report.
2. From the Data pane, add the following members to the new crosstab report
object:
• Rows: Products dimension > Products hierarchy > Product line
• Measures: Measures dimension > Revenue
3. From the Toolbox pane, drag a Query calculation object to the Columns drop
zone.
4. In the Create calculation dialog box, click Set expression, from the hierarchy
list, click the Time hierarchy, and then click OK.
5. In the Set expression dialog box, in the Name field, type Selected Month, and
then create and validate the following expression:
[sales_and_marketing].[Time].[Time].[Month]->?Month?
Hints:
• Available Components pane > Source tab: Time dimension > Time hierarchy
> Month level
• Validate using 2010/Apr
The report returns the selected month, 2013/Mar, and the prior five months, and
provides a total revenue value for each product line.
Unit summary
• Navigate dimensional data using relative functions
• Navigate dimensional data using relative time functions
Unit summary
Exercise 1
Create a dashboard report to compare various time periods
Exercise 1:
Create a dashboard report to compare various time periods
Senior management wants a dashboard report that shows retailer sales for the latest
month around the globe, and revenue values for product lines during specific time
periods. They have submitted the following requirements for the report that will include
a map report and a column chart centered on the final report:
Map chart:
• display the retailer countries and revenue for latest month
• display tooltips
• no legend required
Column chart:
• Type: Column with 3-D visual effect
• Revenue values for each product line for the following time periods:
• latest month (July 2013)
• parallel month last quarter
• same month previous year
• same month two years ago
• total for months in the latest quarter
• total for the previous quarter
To accomplish this, you must do the following:
• create the requested dashboard report using the Sales and Marketing (cube)
package
• use charts and dimensional functions
• center the report objects on the page and ensure they are formatted to appear in
an appropriate size
For more information about where to work and the exercise results, refer to the Tasks
and Results section that follows. If you need more information to complete a task, refer
to earlier demonstrations for detailed steps.
Exercise 1:
Tasks and Results
Server: http://vclassbase:9300/bi
User/Password: brettonf/Education1
Package: Team content > Samples_PowerCube > Cubes > Sales and
Marketing (cube)
Report type: Map
Task 1. Create a map report.
• Side bar: Open a new Map template without saving any previous reports
• Choose map dialog box: Click OK to accept the default settings.
• Data pane: Add the following member to the new map object:
• Location: Retailers dimension > Retailers hierarchy > Retailer country
• Report layout: Click the map background to select it.
• Properties pane: Set the CHART ANNOTATIONS > Legend property to Hide
• Report layout: Click the report page to select it.
• Style Toolbar: Click Center, and then click Top.
The results appear as follows:
• Toolbox tab: Drag a Query calculation object to the Categories (x-axis) drop
zone, to the right of <#Same Month Previous Quarter#> on the column chart.
• Create calculation dialog box: Click Set expression, from the hierarchy list, click
the Time hierarchy, and then click OK.
• Set expression: In the Name field, type Same Month Previous Year, and then
create and validate the following expression:
parallelPeriod ([sales_and_marketing].[Time].[Time].[Year],1,[Latest
Month])
• Toolbox pane: Drag a Query calculation object to the Categories (x-axis) drop
zone, to the right of <#Same Month Previous Year #> on the column chart.
• Create calculation dialog box: Click Set expression, from the hierarchy list,
click the Time hierarchy, and then click OK.
• Set expression: In the Name field, type Same Month 2 Years Ago, and then
create and validate the following expression:
parallelPeriod ([sales_and_marketing].[Time].[Time].[Year],2,[Latest
Month])
Task 5. Create a calculation called Quarter-to-Period to show
revenue totals.
• Toolbox pane: Drag a Query calculation object to the Categories (x-axis) drop
zone, to the right of <#Same Month 2 Years Ago#> on the column chart.
• Create calculation dialog box: Click Calculated member, from the hierarchy
list, click the Time hierarchy, and then click OK.
• Calculated member expression: In the Name field, type Quarter-to-Period,
and then create and validate the following expression:
aggregate (currentMeasure within set periodsToDate([sales_and_
marketing].[Time].[Time].[Quarter],[Latest Month]))
Task 6. Create a calculation to return the revenue totals for
the previous quarter.
• Toolbox pane: Drag a Query calculation object to the Categories (x-axis) drop
zone, to the right of <#Quarter-to-Period#> on the column chart.
• Create calculation dialog box: Click Set expression, from the hierarchy list, click
the Time hierarchy, and then click OK.
• Set expression: In the Name field, type Total Previous Quarter, and then
create and validate the following expression:
prevMember (parent ([Latest Month]))
The results appear as follows:
Unit objectives
• Understand default drill-up and drill-down functionality
• Identify cases when you need to override default drilling behavior
• Configure advanced drilling behavior to support sophisticated use
cases
• Define member sets to support advanced drilling
• Define member sets to support functions
Advanced drilling techniques and member sets © Copyright IBM Corporation 2016
Unit objectives
Participants should be familiar with basic concepts of reporting using the dimensional
style and dimensional data sources.
Other units from this course that may be useful to reference are:
• Introduction to Dimensional Concepts
• Introduction to Dimensional Data in Reports
• Dimensional Report Context
• Focus Your Dimensional Data
• Calculations and Dimensional Functions
What is drilling?
Retailers
• Drilling lets you navigate the dimensional
hierarchy
Up to higher-level summary information Region
Down to lower-level detail information
Retailer Country
Retailer Name
@
Retailer Site
Advanced drilling techniques and member sets © Copyright IBM Corporation 2016
What is drilling?
Drilling is not on by default, but can be enabled for each report by the report author.
When drilling, the edge expressions are replaced:
• drill-down: replacing the expression with children(MemberDrilled)
• drill-up: replacing the expression with level(parent(MemberDrilled))
If your edge expression is complex and you do not want it replaced, you will need to
configure advanced drilling behavior.
[sales_and_marketing].[Products].[Products].[Product line]
Drill Down
Camping Equipment (New expression created)
Mountaineering
Equipment
Irons
Outdoor Protection
Putters
Personal Accessories
and so on
Advanced drilling techniques and member sets © Copyright IBM Corporation 2016
Advanced drilling techniques and member sets © Copyright IBM Corporation 2016
Demonstration 1
Examine default drilling behavior
Advanced drilling techniques and member sets © Copyright IBM Corporation 2016
Demonstration 1:
Examine default drilling behavior
Purpose:
In order to examine how and why to apply advanced drilling techniques, it is
critical to understand the default drilling behavior. In this demonstration, you
will create a simple crosstab report and drill up and down within multiple
dimensions. You will also examine how default drilling behavior is affected
when there are members from multiple levels of the same hierarchy on the
report.
Server: http://vclassbase:9300/bi
User/Password: hirschb/Education1
Package: Team content > Samples_PowerCube > Cubes > Sales and
Marketing (cube)
Report type: Crosstab
Task 1. Create a basic crosstab report with drilling enabled.
1. Sign in as Branka Hirsch (hirschb > Education1).
2. Create a new Crosstab report, using the Sales and Marketing (cube)
package.
3. From the Data pane, add the following members to the new crosstab report
object:
• Rows: Retailers dimension > Retailers hierarchy > Retailers
• Columns: Time dimension > Time hierarchy > Year
• Measures: Measures dimension > Revenue
4. From the Navigate pane, click Report, and then click Show properties.
5. From the Properties pane, in the DATA section, double-click in the field for
Advanced drill behavior.
6. In the Drill behavior dialog box, on the Basic tab click the Allow drill-up and
drill-down check box to select it, and then click OK.
7. From the Properties pane, in the RUNNING & VALIDATING section, change
Run with full interactivity to No.
Notice that Retailers and the years are underlined. This hyperlink formatting is
one indication that drilling has been enabled.
9. Keep the rendered report tab open for the next task.
Task 2. Explore default drill-down and drill-up behavior.
1. In the rendered report tab, click Retailers.
The report drills down to a lower level of detail and appears as follows:
Retailers is the root member for the Retailers hierarchy, and drilling down
returns the next level in the hierarchy: Region. By default, drilling down changes
the report by replacing the item drilled on with its children. Where the initial
report displayed the Retailers root member, the drilled report displays
children ([Retailers]), or the Region level members.
2. Right-click Asia Pacific and select Drill Down.
The report appears as follows:
Drilling down in the Retailers hierarchy from the Region level produces the next
lowest level: Retailer country. Once again, the default drill-down behavior has
replaced the columns with the new expression children ([Asia Pacific]) resulting
in a list of countries within the Asia Pacific region.
3. On the report, click the measure intersection for Japan and 2010 labeled
75,781,108.33.
Drilling down on the intersection of Japan and 2010 changes the expression for
both the rows and the columns of the report. In the rows, Japan has been
replaced by its children at the Retailer name level. In the columns, 2010 has
been replaced with its children at the Quarter level.
5. Right-click any row edge (retailer name) in the report and click Drill Up.
The report appears as follows:
Since you drilled up on the rows only, the columns remain populated with the
Quarter level. In the rows, the Retailer name level has been replaced with the
level above it in the hierarchy, in this case Retailer country.
6. Close the rendered report tab.
Drilling is enabled for all the members of the Region level, but it is unavailable
for the Retailers root member. By default, when there are members from the
same hierarchy on a report, only the lowest level will have drill down enabled.
4. Click Southern Europe to drill down.
The report appears as follows:
As expected, the report has drilled down from Region to the Retailer country
level. The Southern Europe member has been replaced with its children:
Austria, Italy, and Spain.
Notice also that Retailers has been replaced with its child Southern Europe.
Because the two members from the initial report are from the same dimensional
hierarchy, by default they will drill together. By clicking Southern Europe, you
drilled from Retailers to Region in the top half of the report and from Region to
Retailer country in the second half of the report.
The Retailer country member Spain has been replaced by its children at the
Retailer name level. In addition, because they are in the same hierarchy, the
Region member Southern Europe has been replaced by its child Spain.
6. Close the rendered report tab.
7. Leave the browser open for the next demonstration.
Results:
You have investigated how default drilling behavior allows us to replace a
member on a report with its children, and how drilling up provides us with the
parent level within a hierarchy. You have seen that members in different
dimensions react to drilling independently, while members within the same
dimension will drill together.
Advanced drilling techniques and member sets © Copyright IBM Corporation 2016
Demonstration 2
Configure advanced drill behavior
Advanced drilling techniques and member sets © Copyright IBM Corporation 2016
Demonstration 2:
Configure advanced drill behavior
Purpose:
You need to create a report that shows both the summary data for product
lines as well as the more detailed data for each product type. You want users
to be able to drill down or up on product types, but the product line members
should remain on the report, unchanged by drilling. Since in default drilling
behavior, members within the same hierarchy drill down together, you will
accomplish the desired report by configuring the advanced drill behavior.
Server: http://vclassbase:9300/bi
User/Password: hirschb/Education1
Package: Team content > Samples_PowerCube > Cubes > Sales and
Marketing (cube)
Report type: Crosstab
Task 1. Create a basic crosstab report and examine default
drilling behavior.
1. Create a new Crosstab report, using Sales and Marketing (cube), without
saving any previous report.
2. From the Data pane, add the following members to the crosstab:
• Rows:
• Products dimension > Products hierarchy > Product line
• Products dimension > Products hierarchy > Product type to the right of
<#Product line#>, to nest as a child.
Alternatively, you could click Product line, Ctrl+click Product type, and then drag
them both to the rows drop zone with the same effect.
3. From the Data pane, click View Members Tree , expand the Time folder >
Time root node > 2012 member, and then drag the 2012 Q 1, 2012 Q 2,
2012 Q 3, and 2012 Q 4 members to the Columns drop zone.
4. From the Data pane, from the Measures dimension, drag the Revenue
measure to the Measures drop zone.
5. From the Navigate pane, on the Page explorer, click Report.
6. From the Properties pane, in the DATA section, change Drill-up and drill
down to Yes.
7. From the RUNNING & VALIDATING section, change Run with full
interactivity to No.
Notice that, in keeping with default behavior, the product line Camping
Equipment is replaced with Lanterns and the other Product lines have been
removed from the report. This is not the behavior you want, so you will configure
advanced drilling options.
10. Close the rendered report tab.
Task 2. Configure advanced drilling options.
1. From the Properties pane, in the DATA section, double-click the field for
Advanced drill behavior.
2. Click the Advanced tab, and then ensure Product line is selected.
3. In the Drill-up behavior drop-down list, click Preserve.
4. In the Drill-down behavior drop-down list, click Preserve, and then click OK.
When the user drills on the product type members, the action that will be
performed on the product line is to always preserve the set. Therefore, no
matter where you drill within the product hierarchy, the five product lines will
remain on the report.
Keep the rendered report tab open for the next task.
You can see that while the expression for Lanterns was replaced with the
children of Lanterns, the expression for the Product line set remained the same,
and all five product lines are still visible.
There is no change to the product line level, since you defined its advanced drill
behavior to preserve the expression on drilling up. The list of binoculars
products, on the other hand, still has the default drill-up behavior and returns the
list of product types again.
3. Close the rendered report tab.
4. Leave the browser open for the next demonstration.
Results:
You have successfully created a report in which the higher level of data for
product lines is preserved while the user is allowed to drill up and down on
for more detail at the lower level. To accomplish this, you configured the
advanced drill behavior of Product line to preserve the expression on both
drill up and drill down. You kept the Product type level with the default drill
behavior, and so its expression was replaced during any drill-up or drill-down
actions.
Advanced drilling techniques and member sets © Copyright IBM Corporation 2016
Advanced drilling techniques and member sets © Copyright IBM Corporation 2016
Default Behavior
All levels in the
same hierarchy Camping Equipment Drill Up Only
drill up and Cooking Gear Drill Up or Down
down together
Advanced drilling techniques and member sets © Copyright IBM Corporation 2016
Demonstration 3
Enable independent drilling on members of the same hierarchy
Advanced drilling techniques and member sets © Copyright IBM Corporation 2016
Demonstration 3:
Enable independent drilling on members of the same
hierarchy
Purpose:
You want to create a report that shows revenue and profit margin measures
for the last three months in 2012. You want the report to show both the high
level summary information for retailer regions and the low level details for
each retailer name. You want your users to drill independently on the two
sections of the crosstab to examine different levels of summary and detail
data in the same report. To accomplish this goal, you must override the
default member set structure, create new member sets, and define the drilling
behavior for those sets.
This demonstration is designed to isolate the effect of creating explicit member sets. By
specifying the two member sets for Region and Retailer name, the default link between
them is broken and the levels will no longer drill together simultaneously. Because all
explicit member sets require Advanced Drilling to be configured, you must do that task
as well, but it should be noted that when setting the behavior to Replace Expression,
you are requesting the default drilling behavior.
Server: http://vclassbase:9300/bi
User/Password: hirschb/Education1
Package: Team content > Samples_PowerCube > Cubes > Sales and
Marketing (cube)
Report type: Crosstab
Task 1. Create a crosstab report with two sections.
1. Create a new Crosstab report, using Sales and Marketing (cube), without
saving any previous report.
2. From the Data pane (members tree), expand the Time folder > Time root node
> 2012 member > 2012 Q 4 member.
3. Click and drag the following members to the Columns drop zone as peers:
2012/Oct, 2012/Nov and 2012/Dec.
4. From the Data pane, from the Measures dimension, drag Revenue and
Planned revenue to the Columns drop zone below each month.
The results appear as follows:
7. From the Data items tab, drag Retailer name to the work area below Region
MS, and rename it using the same method as step 6.
Your member set definition should appear as follows:
8. From the Navigate pane, under the Query explorer, click Report.
9. In the Properties pane, in the RUNNING & VALIDATING section, change Run
with full interactivity to No.
10. From the DATA section, double-click on the field for Advanced drill behavior.
11. On the Basic tab, click the Allow drill-up and drill-down check box to select it.
12. On the Advanced tab, in the Data items pane:
• Click Region, and then click Replace Expression for both the Drill-up
behavior and Drill-down behavior lists.
• Click Retailer name, and then click Replace Expression for both the Drill-up
behavior and Drill-down behavior lists.
All explicitly defined member sets must have drill behavior manually defined. By
selecting Replace Expression, you are requesting default drilling behavior.
13. Click OK to close the Drill behavior dialog box.
Both the Regions and the Retailer names have been underlined since drill up
and drill down have been explicitly defined for each of them.
The summary data section has drilled up to the Retailers root member, but the
detail data section remained at the Retailer name level. By explicitly defining two
separate member sets, the two levels drill independently.
3. Click VIP Department Stores to drill down on that retailer.
A section of the report appears as follows:
Once again, IBM Cognos Analytics has drilled down from VIP Department
Stores to show the data at the Retailer site level, but the summary data section
remains at Retailers. The two sections now drill independently.
based on
By default, when you drill
down, the underlying
Product Set Expression expression is replaced,
removing the desired
children([Products]) order
Advanced drilling techniques and member sets © Copyright IBM Corporation 2016
Advanced drilling techniques and member sets © Copyright IBM Corporation 2016
By default, when you drill down on Ordered Product Set, the expression is replaced,
removing the order function and replacing it with the children function.
Instead you want to preserve the Ordered Product Set expression; you can do this in
advanced drill behavior configuration.
Explicit member sets are also needed so that drilling down on Ordered Product Set is
bound to the Product Set expression. When ordered product set is drilled down, its
expression is preserved, but its nested set - the Product Set within it - drills down to
children([Product Set]).
We wish to Point out that the Product Set expression changed from children([Products])
to children ([Camping Equipment]). The Sorted Products expression syntax is
preserved by now sorts on the children of Camping Equipment instead of Products. The
Preserve and Replace Expression labels are the actual setting names in the advanced
drill up and down behavior configuration.
Demonstration 4
Preserve order when drilling up or down
Advanced drilling techniques and member sets © Copyright IBM Corporation 2016
Demonstration 4:
Preserve order when drilling up or down
Purpose:
Report consumers want a report for product revenue that is sorted in
descending order for the latest year in the data. When they drill up or down on
the product items, they want the sort order maintained.
You will use dimensional expressions and member set structures to create a
report that preserves its sort order when drilling up or down.
Server: http://vclassbase:9300/bi
User/Password: hirschb/Education1
Package: Team content > Samples_PowerCube > Cubes > Sales and
Marketing (cube)
Report type: Crosstab
Task 1. Create a crosstab report.
1. Create a new Crosstab report without saving any previous report.
2. From the Data pane, add the following members to the new crosstab report
object:
• Rows: Products dimension > Products hierarchy > Product line
• Columns: Time dimension > Time hierarchy > Year
• Measures: Measures dimension > Revenue
By default, the product lines appear in the report in the order specified by the
cube. You will sort the product lines by revenue in 2012.
4. Close the rendered report.
The desc syntax indicates that items will be sorted in descending order. The
tuple function identifies an intersection within the cube. In the expression above,
the tuple evaluates the Revenue measure value for the combination of each
Products Set member and the year 2012. The tuple function allows us to specify
which year column to use for sorting. Without this reference, the default or root
member of the Years dimension is used (in this case Years, which represents a
roll up of all years).
10. Click OK to close the Set expression dialog box.
11. Run the report in HTML.
The report appears as shown below:
The product lines now appear in descending order by their revenue in 2012.
12. Close the rendered report tab.
Task 3. Create member set structures and configure
advanced drill behavior.
You will use member set structures to bind the Sorted Products and Products
Set data items together. This way, when you drill down on Sorted Products you
can change the underlying Products Set expression. You will use two drill
behavior settings: Replace Expression (for Products Set) and Preserve (for
Sorted Products). By combining the member set structure and advanced drill
behavior configuration, you can maintain the sort order on revenue for 2012
when drilling down on Sorted Products.
1. From the Navigate pane, click the Query explorer tab, and then click Query1.
2. In the Properties pane, under MISCELLANEOUS, rename Query1 as
Preserve Order, and then click Enter.
3. In the Properties pane, under DATA, change the Define member sets
property to Yes.
4. At the bottom of the query work area, click the Member sets tab.
5. In the Data pane, click the Data items tab, and drag Products Set to the
Member sets work area.
6. From the Data items tab, drag Sorted Products on top of the Products Set
member set to nest it.
7. Rename each member set by appending the member set Name property with
MS.
The member set structure appears as shown below:
The underlying data items (Products Set and Sorted Products) are now bound
together. You can now configure advanced drill behaviors for the underlying
data items.
8. From the Navigate pane, in the Query explorer, click Report.
9. From the Properties pane, in the DATA section, double-click the field for
Advanced drill behavior.
10. On the Basic tab click the Allow drill-up and drill-down check box to select it.
11. Click the Advanced tab, and then in the Data items pane, click Products Set.
12. Change the Drill-up behavior and Drill-down behavior to Replace
Expression.
The drill-up and drill-down behavior settings appear as shown below:
13. In the Data items pane, click Sorted Products, and then change the Drill-up
behavior and Drill-down behavior to Preserve.
Now when you drill up or down, the Sorted Products expression is not changed
and the order function remains in place while the Products Set expression
changes and is replaced by the children of the selected member.
14. Click OK to close the Drill behavior dialog box.
15. From the Properties pane, in the RUNNING & VALIDATING section, change
Run with full interactivity to No.
The children of Camping Equipment (at the Product type level) are still sorted by
revenue for 2012.
3. Drill down on Tents.
The report appears as follows:
The children of Tents (at the Product name level) are still sorted by revenue for
2012.
Because Star Dome is at the Product name level, the lowest level in the
hierarchy, drilling down returns the single member alone, and drilling down
further is disabled.
5. Close the rendered report tab.
6. Leave the browser open for the next demonstration.
Results:
Using dimensional expressions in conjunction with member set structures,
you created a report that preserves the sort order when drilling up or down.
Drilling down on
the chart is reflected
in the crosstab
Advanced drilling techniques and member sets © Copyright IBM Corporation 2016
Demonstration 5
Synchronized drill up and drill down behavior
Advanced drilling techniques and member sets © Copyright IBM Corporation 2016
Demonstration 5:
Synchronized drill up and down behavior
Purpose:
Consumers would like a report that synchronizes the drill up and drill down
behavior on a dashboard-style report. In order to achieve this, you will use the
Data Items linking feature.
Server: http://vclassbase:9300/bi
User/Password: hirschb/Education1
Package: Team content > Samples_PowerCube > Cubes > Sales and
Marketing (cube)
Report Type: Chart
Task 1. Create a report with a chart and a crosstab.
1. Create a Chart report, using Sales and Marketing (cube), without saving any
previous report.
2. In the Insert chart dialog box, in the right pane, click Clustered Column with
3-D Effects , and then click OK.
3. Click the chart to select it and, from the Data pane, add the following:
• Default measure (y-axis): Measures dimension > Revenue
• Series (primary axis): Products dimension > Products hierarchy > Product
line
• Categories (x-axis): Time dimension > Time hierarchy > Year
4. From the Navigate pane, click the Query explorer tab, and click Query1.
5. In the Properties pane, under MISCELLANEOUS, rename Query1 to Chart
PLYR.
6. In the Navigate pane, click the Page explorer tab, and then click Page 1.
7. From the Toolbox pane, drag a Crosstab report object below the chart.
8. In the Object and query name dialog box, in the Query Name field, type
Crosstab PLOM, and then click OK.
9. From the Data pane, add the following members to the new Crosstab:
• Rows:
• Products dimension > Products hierarchy > Product line
• Order method dimension > Order method hierarchy > Order method
type (to the right of Product line to nest as a child)
• Columns: Time dimension > Time hierarchy > Year
• Measures: Measures dimension > Revenue
The results appear as follows:
6. Click OK.
Notice that the crosstab now reflects the drill action of the chart.
9. Continue to drill up and down on either the chart or crosstab to observe the
synchronized drill up and down behavior.
10. Close the rendered report tab.
11. Leave the browser open for the next demonstration.
Results:
By enabling drill up and down behavior and linking common data items
between report objects, you were able to provide a dashboard-style report
that synchronizes drill up and down behavior.
Advanced drilling techniques and member sets © Copyright IBM Corporation 2016
Demonstration 6
Apply a single function to multiple member sets
Advanced drilling techniques and member sets © Copyright IBM Corporation 2016
Demonstration 6:
Apply a single function to multiple member sets
Purpose:
Consumers want to see sales revenue ranked for various aspects of the
business. You will use member sets to apply one instance of the rank function
to several member sets.
Server: http://vclassbase:9300/bi
User/Password: hirschb/Education1
Package: Team content > Samples_PowerCube > Cubes > Sales and
Marketing (cube)
Report type: Crosstab
Task 1. Create a crosstab report with multiple levels from
different dimensions.
1. Create a new Crosstab report, using Sales and Marketing (cube), without
saving any previous report.
2. From the Data pane, add the following members to the new crosstab report
object:
• Columns: Time dimension > Time hierarchy > Year
• Measures: Measures dimension > Revenue
3. From the Toolbox pane, drag a Query calculation object to the Rows drop
zone.
4. In the Create calculation dialog box, click Set expression, from the hierarchy
list, click the Products hierarchy, and then click OK.
5. In the Set expression dialog box, in the Name field, type Product Line
Members, and then create and validate the following expression:
members ([sales_and_marketing].[Products].[Products].[Product line])
You apply the members function because the Rank function that will be used
later in the demonstration expects members as a parameter.
Hints:
• Available Components pane > Source tab: Products dimension > Products
hierarchy > Product line level
6. Click OK to close the Set expression dialog box.
7. From the Toolbox pane, drag a Query calculation object to the Rows drop
zone below <Product Line Members>, as a peer.
8. In the Create calculation dialog box, click Set expression, from the hierarchy
list, click the Retailers hierarchy, and then click OK.
9. In the Set expression dialog box, in the Name field, type Region Members,
and then create and validate the following expression:
members ([sales_and_marketing].[Retailers].[Retailers].[Region])
10. Click OK to close the Set expression dialog box.
11. From the Toolbox pane, drag a Query calculation object to the Rows drop
zone below <Region Members>, as a peer.
12. In the Create calculation dialog box, click Set expression, from the hierarchy
list, click the Order method hierarchy, and then click OK.
13. In the Set expression dialog box, in the Name field, type Order Method Type
Members, and then create and validate the following expression:
members ([sales_and_marketing].[Order method].[Order method].[Order
method type])
Hints:
• Available Components pane > Source tab: Order method dimension > Order
method hierarchy > Order method type level
14. Click OK to close the Set expression dialog box.
The results appear as follows:
15. From the Toolbox pane, under Advanced, drag a Crosstab space object to
the Rows zone between <Product Line Members> and <Region Members>.
16. From the Toolbox pane, drag a Crosstab space object to the Rows zone
between <Region Members> and <Order Method Type Members>.
The report appears as follows:
6. In the work area, click Product Line Members, and then in the Properties
pane, under MISCELLANEOUS, rename Product Line Members to MySet.
7. Repeat and rename the remaining member set structures to MySet.
The member set structures appear as shown below:
4. In the Set expression dialog box, in the Name field, type Rank in 2012, and
then create and validate the following expression:
rank (currentMeasure tuple [2012] within set [MySet])
The tuple syntax specifies that the rank of the members in MySet will be based
on the intersection values of currentMeasure and 2012. Notice the reference to
the MySet member set structures you created earlier. This function is applied to
all three underlying member sets that now have the same member set structure
name.
Hints:
• Available Components pane > Source tab (members tree view): Time folder
> Time root node > 2012 member
5. Click OK to close the Set expression dialog box.
6. Run the report in HTML.
The report appears as follows:
Notice that the values for 2012 and Rank are not sorted. You can accomplish
this by using the order function on each individual set of the crosstab rows.
7. Close the rendered report tab.
The values for 2012 are sorted in descending order. The Rank column is also
sorted also since the ranking is based on revenue values for the year 2012.
7. Close the rendered report tab.
8. Leave the browser open for the exercise.
Results:
By renaming member set structures to use a common name, you applied one
instance of the rank function to several members sets.
Unit summary
• Understand default drill-up and drill-down functionality
• Identify cases when you need to override default drilling behavior
• Configure advanced drilling behavior to support sophisticated use
cases
• Define member sets to support advanced drilling
• Define member sets to support functions
Advanced drilling techniques and member sets © Copyright IBM Corporation 2016
Unit summary
Exercise 1
Create a report with drillable complex functions
Advanced drilling techniques and member sets © Copyright IBM Corporation 2016
Exercise 1:
Create a report with drillable complex functions
Channels management requires a report that shows the top three members from the
product hierarchy based on revenue, totals for members not shown in the report, and
overall totals. They want the ability to drill up and down on products.
To do this, you must:
• Use dimensional functions to identify the top three product lines
• Create aggregates for products shown on the report and for products excluded
from the report
• Enable drilling and configure advanced drill behavior such that the dimensional
functions are preserved while the user drills up and down in the product hierarchy
You may rename the queries in this exercise to conform to best practices.
For more information about where to work and the exercise results, refer to the Tasks
and Results section that follows. If you need more information to complete a task, refer
to earlier demonstrations for detailed steps.
Exercise 1:
Tasks and Results
Server: http://vclassbase:9300/bi
User/Password: hirschb/Education1
Package: Team content > Samples_PowerCube > Cubes > Sales and
Marketing (cube)
Report type: Crosstab
Task 1. Create the base crosstab report.
• Data pane: Add the following members to a new crosstab without saving any
previous reports:
• Columns: Time dimension > Time hierarchy > Year
• Measures: Measures dimension > Revenue
The results appear as follows:
• Toolbox pane: Drag a Query calculation to the Rows drop zone, click Set
expression, and then, from the hierarchy list, click the Products hierarchy.
• Set expression dialog box: Name the expression: Products Set, and then
create and validate the following expression:
children ([Products])
Hint:
• Available Components pane > Source tab (members tree view): Products
root node
• Run the report in HTML.
The report appears as shown below:
This expression aggregates the totals of all product members with the exception
of the top three product members and subtracts the value from the summary of
all products.
With large data sets, the Excluded summary expression using the except()
function may perform slowly. If performance becomes an issue, you could
alternately use the calculation below:
[Summary] - aggregate(currentMeasure within set [Top Products])
This expression accomplishes the same result by taking the totals from the top
three products and subtracting them from the totals of all products.
To use this type of expression, you must know your data well to ensure
accurate values are returned. For example, you must know whether the default
roll up for your measures are sum, average, min, and so on, to know what
results to expect. You should also talk to your data modeler (Framework
Manager modeler for DMR and cube modeler for OLAP) to ensure that there
are no configurations in the data source that may return unexpected results.
There are two issues with this report. First, the number of visible items exceeds
three members, which is the limit you set when creating the Top Products
expression. Second, the values for Excluded and Summary did not change
when you drilled down on Camping Equipment.
These expressions directly or indirectly reference the Products Set expression.
The Products Set expression uses the syntax children([Products]).
You have not defined member set structures to bind the expressions together.
You also did not configure advanced drill-up and drill-down behaviors to replace
the Products Set expression while preserving the expressions that reference it.
Currently, when you drill down, you lose the Top Products expression in the
crosstab and simply return the children of the Camping Equipment member.
The Excluded and Total expressions use the original expressions they
reference to retrieve their values, which explains why their values did not
change after you drilled down.
• Close the rendered report tab.
• Drill behavior dialog > Basic tab: Select the check boxes to disable drill-up and
drill-down for Summary and Excluded.
Only three child members from the Camping Equipment member are shown on
the rows of the report.
Values for the Excluded and the Total data items changed to reflect the level to
which you have drilled.
• Close the rendered report tab.
• Sign out as Branka Hirsch.
• Close the Web browser.
Unit objectives
• Navigate from a specific report to a target report
• Drill down to greater detail and then navigate to a target report
• Navigate between reports created using different data sources
Unit objectives
Participants should be familiar with basic concepts of reporting using the dimensional
style and dimensional data sources.
Other units from this course that may be useful to reference are:
• Introduction to Dimensional Concepts
• Introduction to Dimensional Data in Reports
• Dimensional Report Context
• Focus Your Dimensional Data
• Calculations and Dimensional Functions
• Advanced Drilling Techniques and Member Sets
Source Report
Target Report
Target Report
Source Report Drill through to a
target report to (Created in
(Created in view related data IBM Cognos
Reporting)
Analytics)
Target
Report
Package-based drill-through
definition
Set up drill-through reports © Copyright IBM Corporation 2016
Demonstration 1
Set up member-to-member drill-through access
Demonstration 1:
Set up member-to-member drill-through access
Purpose:
The Sales department has requested a report displaying information about the
performance of each order method for different retailers. You will create a
drill-through definition to let users drill through to view data for a particular
retailer type.
Server: http://vclassbase:9300/bi
User/Password: hirschb/Education1
Package: Team content > Samples_PowerCube > Cubes > Sales and
Marketing (cube)
Report type: List
Task 1. Create the target report.
1. Open a new List template without saving any previous report.
2. From the Data pane, add the following columns to the new list report object:
• Retailers dimension > Retailers hierarchy > Retailer name, Retailer site
• Order method dimension > Order method hierarchy > Order method type
• Measures dimension > Revenue, Planned revenue
You will create a parameter that expects one of these members. Since this
target report is based on multidimensional data, you will use a multidimensional
technique to create the parameter. You will create a query calculation that
includes a parameter for Retailer country as the first column of the report.
2. From the Toolbox pane, drag a Query calculation object to the left of Retailer
name column on the report.
3. In the Create calculation dialog box, click Set expression, from the hierarchy
list, click the Retailers hierarchy, and then click OK.
4. In the Set expression dialog box, in the Name field, type Selected Retailer
Country, and then create and validate the following expression:
[sales_and_marketing].[Retailers].[Retailers].[Retailer country]->?Retailer
country?
Hints:
• Available Components pane > Source tab: Retailers dimension > Retailers
hierarchy > Retailer country level
• Validate using Australia
5. Click OK to close the Set expression dialog box.
6. On the report layout, click Selected Retailer Country, Ctrl+click Retailer
name, and Retailer site, and then on the toolbar, click Group / Ungroup.
7. On the report layout, click the Revenue column, on the toolbar click
Summarize, and then in the list click Total.
8. Repeat for Planned Revenue.
A section of the report layout appears as follows:
9. From the File menu, click Save, and then navigate to Team
content/Student_B6061.
10. In the Name field, type 09_Demonstration1_Target, and then click Save.
You will create a drill-through definition to let users drill through to this report
from other reports created using the Sales and Marketing package.
11. Return to the Welcome to IBM Cognos Analytics screen.
Task 3. Create a drill-through definition for the package.
1. From the side bar, click New > Other > Drill-through Definitions.
2. Navigate to Team content > Samples_PowerCube > Cubes > Sales and
Marketing (cube), and then click New Drill-through Definition .
3. In the Name field, type 09 Demonstration 1 Drill-through Definition, and then
click Next.
Since the target report contains a parameter for the Retailer country level, you
want to make sure users can drill through only from cells that have a specific
Retailer country as their context.
4. Click Set the scope, and expand the Retailers dimension.
You can also set the scope to a measure.
5. Click the Retailer country level, and then click OK.
6. Click Set the target, navigate to Team Content > Student_B6061, click
09_Demonstration1_Target, and then click OK.
7. Click Next.
The Specify the target details page appears and displays the retail country
parameter you created in the target report as shown below:
You know that this parameter expects a MUN because the type displayed for
this parameter (in the Type column) is memberUniqueName.
You will specify that when users drill through, a member from the Retailer
country level will be passed to this parameter.
8. Beside the Retailer country parameter, in the Source metadata item list, click
map to metadata .
9. Expand the Retailers dimension, click the Retailer country level, and then click
OK.
In the Source metadata item properties list, because you are working with OLAP
data sources in both reports, there is no need to define the setting of the
properties which will be passed. When drilling through from a dimensional data
source to a dimensional data source, the default is to pass the member unique
name.
10. Click Finish.
You will test this drill-through definition by drilling through from a report created
in IBM Cognos Analytics using the Sales and Marketing (cube) package.
11. Close the Drill-through Definitions tab.
Task 4. Test the drill-through definition.
1. Create a new List report, using Sales and Marketing (cube) package, without
saving any previous report.
2. Add the following columns to the new list.
• Retailers dimension > Retailers hierarchy > Retailer country
• Measures dimension > Quantity.
Before users can drill through from this report to drill-through targets created for
the Sales and Marketing package, you must enable this behavior for the report.
3. In the Navigate pane, click Report, and then click Show properties.
4. In the RUNNING & VALIDATING section, change Run with full interactivity
to No.
5. In the DATA section, double click the field for Advanced drill behavior.
6. On the Basic tab, ensure that Allow this report to be a package-based drill-
through source check box is selected, and then click OK.
7. Run the report in HTML.
You want to navigate to the target report to view more details about sales in
Australia.
8. In the report, right-click Australia, point to Go To, and then click Related Links.
The drill-through definition that you created (09 Demonstration 1 Drill-through
Definition) appears in the list.
Before you click the target to drill through, you can perform some
troubleshooting to identify if the correct parameters will be passed to the target
report.
Because this drill-through passes a member from the source to the target, a
MUN representing the Australia member is passed. In following demonstrations,
be sure to check the passed source values to see what type of data is being
passed.
10. Under Available links, click 09 Demonstration 1 Drill-through Definition.
IBM Cognos drills through to the 09_Demonstration1_Target report.
11. At the bottom of the report, click Bottom and observe that the report displays
data for only Australia.
A section of the results appear as follows:
Demonstration 2
Let users drill down and then drill through
Demonstration 2:
Let users drill down and then drill through
Purpose:
You have been asked to create a chart that compares the quantity of products
sold in different years by each order method. You will create a drill-through
definition to let users navigate to this chart from reports created using the
Sales and Marketing (cube) package. You want to let users explore product
data in source reports at different levels of detail, and then drill through to the
chart. Therefore, you will create a drill-through definition that lets users drill
down, and then drill through.
Server: http://vclassbase:9300/bi
User/Password: hirschb/Education1
Package: Team content > Samples > Cubes > Sales and Marketing (cube)
Report type: Clustered Column Chart
Task 1. Create the target report.
1. Create a new Chart report, using the Sales and Marketing (cube) package,
without saving any previous report.
2. Click OK to accept the default Clustered Column chart.
3. From the Data pane, add the following members to the new Clustered Column
chart report object:
• Default measure (y-axis) drop zone: Measures dimension > Quantity
• Series (primary axis) drop zone: Order method dimension >
Order method hierarchy > Order method type
• Categories (x-axis) drop zone: Time dimension > Time hierarchy > Year
You want users to be able to drill through from a member at any level in the
Products hierarchy. Therefore, you will add a parameter that will accept any
member from the Products hierarchy. Because you are working with
dimensional data, you will build the parameter in a dimensional way.
4. In the Navigate pane, click the Query Explorer tab, and then click Query1.
5. On the Properties pane, under MISCELLANOUS, change Query1 to Drill
Through, and then press Enter.
6. From the Toolbox pane, drag a Slicer member set object to the Slicer pane.
7. Create and validate the following expression:
[sales_and_marketing].[Products].[Products]->?Product?
Hints:
• Available Components pane > Source tab: Products dimension > Products
hierarchy
• Validate using a Products member
8. Click OK to close the Slicer member expression dialog box.
To let users know what data is displayed in this chart, you will add a title that
explains which member from the Products dimension is displayed in the report.
Task 2. Add a descriptive report title.
1. In the Navigate pane, click the Page Explorer tab, and then under Report
Pages click Page1.
2. Double-click the report title field, type Quantity Sold for, press the space bar,
and then click OK.
3. From the Toolbox pane, under TEXTUAL, drag a Layout calculation object to
the end of the report title text.
4. On the Available Components pane, click the Parameters tab, and drag the
Product parameter to the Expression Definition box.
The expression appears as shown below:
ParamDisplayValue('Product')
5. Validate the expression to ensure there are no errors, and then click OK to
close the Report Expression dialog box.
You will format the layout calculation text to match the report title text, and left
align the title.
6. In the report title area, click the Quantity Sold for text, and on the toolbar click
Pick up style .
7. In the report layout header, click the Layout calculation, and then on the
toolbar click Apply style .
8. Click the header block, and then on the toolbar click Left.
The results appear as follows:
6. Click Next.
The Specify the target details page appears and displays the parameter from
the 09_Demonstration2_Target report as shown below:
You want this parameter to receive members from any level in the Products
hierarchy.
7. Beside the Product parameter, in the Source metadata item column, click
map to metadata, click the Products dimension, and then click OK.
8. Click Finish.
9. Close the Drill-through Definitions browser tab.
Task 4. Test the drill-through definition.
1. Create a new List report, and add the following columns.
• Products dimension > Products hierarchy > Product line
• Measures dimension > Revenue
2. In the Navigate pane, click Report.
3. On the Properties pane, in the RUNNING & VALIDATING section, set Run
with full interactivity to No.
4. In the DATA section, set Drill-up and drill-down to Yes.
5. Run the report in HTML.
The report appears as follows:
6. Click Golf Equipment to drill down to view details about golf equipment product
types.
The report appears as follows:
7. Click Irons to drill down to view details about each product in the Irons product
type.
The report appears as follows:
You will drill through to view information about the quantity sold for the Hailstorm
Steel Irons by each order method during different order years.
8. In the Hailstorm Steel Irons row, right-click the value in the Revenue column
(58,805,377.39), point to Go To, and then click Related Links.
The report displays data for the product from which you drilled through in the
source report (Hailstorm Steel Irons).
You were able to drill down in the Products hierarchy, and then drill through to
the target report. Drill-through access works as expected.
10. Close both rendered report tabs.
11. Leave the browser open for the next demonstration.
Results:
You created a drill-through definition that lets users drill down within a
hierarchy, and then drill through to a target report from members at any level
in the hierarchy.
Product Golf
Line Equipment
Data Drill through to view
detailed data for the Golf
Data
Report Created Using Equipment product line Report Created
OLAP Data Using
Relational Data
When you set up drill-through access between reports created from different data
sources, you must use one of the combinations that are supported in IBM Cognos.
The item users drill through from and the item used for the target parameter must mean
the same thing, and must be based on the same data. This is required so that the target
report displays the data expected by users when they drill through. To determine
whether this is the case, you must ask the data modelers who created the packages.
* Member-to-member drill through is supported only when the MUN structures for each
data source are the same.
If the source and target items are based on different data, the target report may show
unexpected results. For example, a product code passed from a source report may
correspond to the code for a different product in the target report data. This would mean
that when users drill through, they would see data for the wrong product.
Member-to-member
Dimension
Hierarchy
Level
Member-to-member
Member-to-Member drill-through access between different data sources uses MUNs to
pass members.
In IBM Cognos, each member is uniquely identified by a Member Unique Name
(MUN). The MUN is different from the caption you see for each member in the
Insertable Objects pane. MUNs describe the position of each member in the
hierarchical structure.
When you drill through to a target parameter that expects a member, the parameter
uses the MUN to identify which member is passed. In order for member-to-member drill
through between different OLAP data sources to succeed, the source and target MUNs
must match. Before you set up drill-through access between members from different
packages, consult with the data modeler(s) who created the packages to determine
whether the source and target members have matching MUNs.
Demonstration 3
Drill through from members to a parameter expecting a business key
Demonstration 3:
Drill through from members to a parameter expecting a
business key
Purpose:
The Sales department has requested a map report that displays the revenue
generated in different countries. You must create this report using the
relational package, GO Data Warehouse (query). You want to let users drill
through to this report from Order method members in reports created using a
DMR source: the GO Data Warehouse (analysis) package. Users should be
able to drill through to view data for a specific order method.
The data modeler who created these packages tells us that there is a query
item in the GO Data Warehouse (query) package (Order method key) with
business key values that match the business keys that will be passed by the
members from Order method type level in the GO Data Warehouse (analysis)
package. Therefore, in the target report, you will create a parameter using the
Order method key query item.
Portal: http://vclassbase:9300/bi
User/Password: hirschb/Education1
Package: Team content > Samples > Models > GO Data Warehouse
(query)
Report Type: Map
Folder: Sales and Marketing (query)
Namespace: Sales (query)
Task 1. Create the target report.
1. Create a new Map report, using the GO Data Warehouse (query) package,
without saving any previous report.
2. In the Choose map dialog, set the Display layers to Oceans, and then click
OK.
3. From the Data pane, navigate to Sales and Marketing (query) > Sales
(query), and then add the following items to the map:
• Color drop zone: Sales fact > Revenue
• Location drop zone: Retailers query subject > Retailer country
You will specify that this report should run even if some retail territories in the
map file do not match those in our data source.
4. Click the map report background, in the Properties pane under DATA, change
the Ignore Data With No Features property to Yes.
You will add a parameter so that when users drill through the report displays
only data for the order method they drill through from. You will use the Order
method key query item, which has business key values that match those
passed by the Order method members in the GO Data Warehouse (analysis)
package. Because the target report is from a relational data source, you will use
a relational technique for building the parameter.
5. On the toolbar, click Filters, click Edit Filters, and then on the Detail Filters
tab, click Add.
6. In the Create filter dialog box, click Advanced, and then click OK.
7. In the Expression Definition pane, create and validate the following
expression:
[Sales (query)].[Order method].[Order method key]=?Order method?
Hints:
• Available Components pane > Source tab: Sales and Marketing (query)
folder > Sales (query) namespace > Order method query subject > Codes >
Order method key
• Validate by typing 602 at the prompt
8. Click OK to close the Prompt dialog box, and then click OK to close the Detail
filter expression dialog box.
9. Click OK to close the Filters dialog box.
Task 2. Add two layout calculations, and then save the report.
You will add two layout calculations to the report to show the Display value and
the Use value that are passed to this target parameter when users drill through.
The Display value is the value that users would select in the prompt if a prompt
appeared for the parameter. The Use value is the value that is passed to the
target parameter.
1. From the Toolbox pane, drag a Table object to the right of the block holding the
report title text.
2. In the Number of columns box type 1, in the Number of rows box type 2, and
then click OK.
3. From the Toolbox pane, drag a Text item object to the top table cell, type
Parameter Display Value:, click the Space bar, and then click OK.
4. From the Toolbox pane, drag a Layout calculation object to the right of the
text in the top table cell.
5. In the Available Components pane, click the Parameters tab, and drag the
Order method parameter to the Expression Definition pane.
The expression appears as follows:
ParamDisplayValue('Order method')
6. Validate the expression, using the value 1, and then click OK to close the
Report expression dialog box.
7. From the Toolbox pane, drag a Text item object to the bottom table cell, type
Parameter Use Value:, click the Space bar, and then click OK.
8. From the Toolbox pane, drag a Layout calculation object to the right of the
text in the bottom table cell.
9. In the Available Components pane, click the Parameters tab, drag the Order
method parameter to the Expression Definition box.
10. In the expression, delete Display.
The expression appears as shown below:
ParamValue('Order method')
11. Validate the expression to ensure there are no errors, and then click OK to
close the Report expression dialog box.
12. To change the object in focus, click the chart background to select it, and then
press Esc to deselect it.
A section of the result appears as follows:
When users drill through, values from members in the Order method level must
be passed to the target parameter.
7. Beside the Order method parameter, in the Source metadata item column
click map to metadata.
8. Expand the Sales and Marketing (analysis) folder > Sales namespace >
Order method dimension, click the Order method type level, and then click
OK.
9. In the Source metadata item properties list, click Business Key, and then
click Finish.
10. Close the Drill-through Definitions tab.
You will drill through to view details about telephone sales in each country.
7. In the list report, right-click Telephone, point to Go To, and then click Related
Links.
This report displays the revenue generated by sales made by telephone in each
country. The top layout calculation indicates that the display value for the
member passed to the target parameter is Telephone. The bottom layout
calculation indicates that the business key for the Telephone member (602) was
passed to the target parameter. Drill-through access works as expected.
9. Close both rendered report tabs.
10. Leave the browser open for the next demo.
Results:
You set up drill-through access to let users drill through from members to
values. You created a parameter that expects business key values. The
business key values expected by the target parameter match the business
keys passed from members when users drill through.
Demonstration 4
Drill through from member captions to values
Demonstration 4:
Drill through from member captions to values
Purpose:
The Sales department has requested a chart that compares revenue
generated by different order methods for each product line. You must use the
Sales and Marketing package, published from OLAP data, to create this chart.
You have been asked to let users drill through from this chart to a detailed
target report based on GO Data Warehouse (query), a relational data source.
The target report contains a parameter that expects Product line values. Our
modeler told us that the caption properties for the Product line members in
the Sales and Marketing package match the Product line values expected by
the target parameter. Therefore, you will set up drill-through access to pass
the caption value for Product line members when users drill through.
Portal: http://vclassbase:9300/bi
User/Password: hirschb/Education1
Package: Team content > Samples > Models > GO data warehouse (query)
Report Type: List
Folder: Sales and Marketing (query)
Namespace: Sales (query)
Task 1. Create the target report.
1. Create a new List report, using the GO data warehouse (query) package,
without saving any previous report.
2. From the Data pane, navigate to Sales and Marketing (query) > Sales
(query), and add the following query items to the new list report object:
• Products: Product line, Product type, Product
• Sales fact: Revenue
3. In the report layout, click Product line, Ctrl+click Product type, and then on the
toolbar, click Group / Ungroup.
4. In the report layout, click the Revenue column, on the toolbar click Summarize,
and then click Total.
Your report layout appears as follows:
Because this target report is based on relational data, you will use a detail filter,
which is a relational technique, to pass the drill-through parameters.
5. On the toolbar click Filters, click Edit Filters, and then on the Detail filters tab,
click Add.
6. In the Create filter dialog box, click Advanced, and then click OK.
7. Create and validate the following expression:
[Sales (query)].[Products].[Product line]=?Product line?
Hints:
• Available Components pane > Source tab: Sales and Marketing (query)
folder > Sales (query) namespace > Products query subject > Product line
• Validate using Camping Equipment
8. Click OK to close the Prompt dialog box, click OK to close the Detail filter
expression dialog box, and then click OK to close the Filters dialog box.
9. Save the report in Team content > Student_B6061 as
09_Demonstration4_Target.
You know that the parameter in the target report expects string values, and not
the business keys that will be passed by the Product line members. Our data
modeler told us that the captions for each Product line member match the
values expected by the target parameter. Therefore, you will define a drill-
through definition to specify that for each Product line member, its caption
property be passed rather than its MUN.
You will now set up drill-through access to the target report.
Task 3. Set up report-based drill-through access.
You want to let users drill through from the product lines listed in the rows.
1. In the report, click <#Product line#>, click the ellipsis on the toolbar, and then
click Drill-Through Definitions.
2. In the Drill-through definitions dialog box, click New Drill-Through
Definition.
3. Beside the Report box, click the ellipsis, navigate to Team content >
Student_B6061, click 09_Demonstration4_Target, and then click Open.
You will specify that the caption for the Product line be passed to the target
parameter.
4. Under Parameters, click Edit.
5. For the Product line parameter, in the Method list, click Pass data item value,
in the Value list, click Product line, and then in the Property to Pass list, click
Member caption.
6. Click OK to close the Parameters dialog box, and then click OK to close the
Drill-through definitions dialog box.
Notice that the appearance of <#Product line#> in the crosstab has changed to
indicate the drill-through definition has been applied.
This member
represents a
date range
Unit summary
• Navigate from a specific report to a target report
• Drill down to greater detail and then navigate to a target report
• Navigate between reports created using different data sources
Unit summary
End-to-end exercise
Exercise 1:
End-to-end exercise
Your company would like a report that will allow the corporate office of each country to
assess their sales promotions and determine the effectiveness of promotional
campaigns of the channels (retailers). By identifying effectiveness of promotions, the
corporate offices can make decisions on where to make more investment in
promotional advertising, or make other changes to the campaigns to try to improve the
revenue results.
• The initial report will be based on the Sales and Marketing (cube) package. The
report will prompt the user to select:
• a Retailer country
• any part of the Products hierarchy
• The report will have a summary level chart comparing total promotional sales
revenue for each quarter of the current year to the quarters of the previous year,
including the following requirements:
• 3-D clustered column chart
• quarters of current year and quarters of previous year in the series
• revenue for promotional sales only (non-Regular Sale)
• The report will also have a detailed crosstab that examines revenue for each
campaign, for each retailer within the selected country. The crosstab will also
include:
• revenue for each promotional (non-Regular Sale) campaign, for each retailer
name
• a calculation to display the promotional sales percent of the total sales
• current year totals
• previous year totals
• quarter by quarter totals for the current year
• a filter to eliminate rows with no promotional sales in the current or past year
• sorting of campaigns by total revenue in the current year
• The report must have drilling enabled. Ensure that the calculations, filters, and
sorting are all maintained when the user drills up or down.
• Finally, the report will be configured with a drill-through definition. From the initial
report, the user will be able to drill-through from Retailer name to a report based
on the Go Data Warehouse (query) package. The target report will include:
• a parameter to filter based on the retailer that is selected in the initial report
• Retailer, Campaign name, and Product
• Quantity, Revenue, and Unit Cost
You can name the queries according to best practices.
For more information about where to work and the exercise results, refer to the Tasks
and Results section that follows. If you need more information to complete a task, refer
to earlier demos for detailed steps.
Exercise 1:
Tasks and Results
Server: http://vclassbase:9300/bi
User/Password: hirschb/Education1
Package: Team content > Samples_PowerCube > Cubes > Sales and
Marketing (cube)
Report type: Crosstab
Task 1. Build a crosstab and include a prompt for Retailer
country.
• Create a Crosstab report, using the Sales and Marketing (cube) package.
• Data pane: Add the following to the new crosstab:
• Measures: Measures dimension > Revenue
• Toolbox pane: Drag a Query calculation to the Rows area of the report layout
as a Set expression of the Retailers hierarchy.
• Set expression dialog box: Name the expression Selected Retailer Country,
and then create and validate the following expression:
[sales_and_marketing].[Retailers].[Retailers].[Retailer
country]->?Country?
• Validate using Australia
• Toolbox pane: Drag a Query calculation as a peer of <Selected Retailer
Country> as a Set expression of the Retailers hierarchy.
• Set expression dialog box: Name the expression Retailer Names, and then
create and validate the following expression:
children ([Selected Retailer Country])
• Report layout: Click <Selected Retailer Country>, click the toolbar ellipsis, and
click Cut.
This action will remove Selected Retailer Country from the report layout, but
leave the query in the report.
The results appear as follows:
• Selected classes pane: click Crosstab fact cell (calculated member), and click
the left arrow to remove it from the list.
• Global classes pane: double-click Crosstab fact cell (inner total nested) to
add it to the Selected classes pane, and then click OK.
• Toolbox pane: Drag a Query calculation, as a peer to Aggregate(Promotional
Campaigns), as a Calculated member of the Promotions hierarchy.
• Calculated member expression dialog box: Name the expression Total All
Campaigns, and then create and validate the following expression:
aggregate(currentMeasure within set
[sales_and_marketing].[Promotions]. [Promotions].[Campaign])
The results appear as follows:
• Report layout: Click <Retailer Names>, click the toolbar ellipsis, click Edit Set,
and then double-click Set expression.
• Set Expression dialog box: Create and validate the following expression:
filter (children ([Selected Retailer Country]), tuple ([Current
Year],[Aggregate(Promotional Campaigns)])<>null or tuple ([Total
Previous Year],[Aggregate(Promotional Campaigns)])<>null)
• Set Definition dialog box: Click OK to close the Set expression dialog box, and
then click OK to close the Set definition dialog box.
• Report layout: Click <Promotional Campaigns>, click the toolbar ellipsis, and
then click Cut.
The results appear as follows:
• Work area:
• Click Promotional Campaigns, and then in the Properties pane under
Miscellaneous, rename to Promotional Campaigns MS.
• Repeat the previous step to rename the remaining member set structures to
add MS to the end of each name.
The results appear as follows:
• Report layout:
• Click Retailer name, Ctrl+click Campaign name and Product, and then on
the toolbar, click Group / Ungroup.
• Click Retailer name, and then on the toolbar click Section / unsection.
Task 14. Create a detail filter to provide the parameter for the
target report and save the report.
• Report layout: Select the List object.
• Toolbar: Click Filters > Edit Filters,
• Filters dialog box: Click Add, click Advanced, and then click OK.
• Detail filter expression dialog box: Create and validate the following expression:
[Sales (query)].[Retailers].[Retailer key]=?Retailer?
• Retailer key is located in Sales and Marketing (cube) > Sales (query) >
Retailers > Codes folder.
• Validate using 7351 at the prompt
• Save the report with the name End-to-End Exercise Target in Team content >
Student_B6061.
• Run the report in HTML.
• Use 7351 at the prompt.
A section of the report appears as follows: