Download as pdf or txt
Download as pdf or txt
You are on page 1of 397

www.exitcertified.

com

IBM Cognos Analytics - Author Reports with


Multidimensional Data (V11.0) (B6061G)

Presented To David Lashbrook

Course: B6061G David Lashbrook Indianapolis, IN


Class ID: 141991 enrollments@tcworkshop.com
Dates: 2020/01/27-2020/01/28
®

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.

© Copyright IBM Corp. 2007, 2016 P-2


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Preface

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

© Copyright IBM Corp. 2007, 2016 P-3


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Preface

Creating sets for members ............................................................................... 2-20


Tuples in IBM Cognos Analytics ....................................................................... 2-21
Automatically create sets and tuples ................................................................ 2-22
Creating an individual tuple easily .................................................................... 2-23
Manually create sets and tuples ....................................................................... 2-24
Query calculations ............................................................................................ 2-25
Using set definitions ......................................................................................... 2-26
The tuple() function .......................................................................................... 2-27
Demonstration 3: Identify sets and tuples in reports ......................................... 2-29
Unit summary ................................................................................................... 2-35
Dimensional report context .................................................................. 3-1
Unit objectives .................................................................................................... 3-3
What is report context?....................................................................................... 3-4
Root members .................................................................................................... 3-5
Default members ................................................................................................ 3-6
Current members ............................................................................................... 3-9
Default measures ............................................................................................. 3-10
Current measures............................................................................................. 3-11
Demonstration 1: Use the default measure to create a summarized
column in a report ......................................................................................... 3-13
Unit summary ................................................................................................... 3-19
Focus your dimensional data............................................................... 4-1
Unit objectives .................................................................................................... 4-3
How do relational data sources behave? ............................................................ 4-4
How do dimensional data sources behave? ....................................................... 4-5
DMR - Relational or dimensional? ...................................................................... 4-7
Creating efficient dimensional queries ................................................................ 4-8
Filtering techniques ............................................................................................ 4-9
Using dimensional objects and expressions ..................................................... 4-10
The except() function ........................................................................................ 4-11
Demonstration 1: Focus your report by excluding members of a defined set .... 4-12
topCount() and bottomCount() .......................................................................... 4-17
topPercent() and bottomPercent() .................................................................... 4-18
Demonstration 2: Create a crosstab report showing the top two retailers ......... 4-19
Filter based on measure values........................................................................ 4-23
The filter() function ........................................................................................... 4-24
Detail filters ...................................................................................................... 4-25
Demonstration 3: Compare the use of the filter() function to a detail filter ......... 4-26
Slicers .............................................................................................................. 4-36
Slicer example .................................................................................................. 4-37

© Copyright IBM Corp. 2007, 2016 P-4


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Preface

Demonstration 4: Filter dimensional data using slicers ..................................... 4-38


Prompt for dimensional data ............................................................................. 4-42
Unit summary ................................................................................................... 4-43
Exercise 1: Create a set using a prompt and the except() function ................... 4-44
Calculations and dimensional functions ............................................. 5-1
Unit objectives .................................................................................................... 5-3
IBM Cognos Analytics dimensional functions ..................................................... 5-4
Explore available components ............................................................................ 5-5
Reusing, prompting, and combining in dimensional expressions ........................ 5-7
The total() and aggregate() functions.................................................................. 5-8
Aggregate values in crosstabs.......................................................................... 5-10
Show excluded member totals.......................................................................... 5-11
Demonstration 1: Show totals and exclude members ....................................... 5-13
Perform arithmetic operations........................................................................... 5-19
Demonstration 2: Create a percent of base calculation .................................... 5-20
Sorting dimensional data .................................................................................. 5-24
Ranking dimensional data ................................................................................ 5-25
Demonstration 3: Nest dimensional functions to create a dynamic
bottomPercent report .................................................................................... 5-26
Support for multiple hierarchies per dimension ................................................. 5-34
Demonstration 4: Create a variance calculation with members from
different hierarchies of the same dimension ................................................. 5-35
Common errors in expressions ......................................................................... 5-38
What is coercion? ............................................................................................. 5-39
Unit summary ................................................................................................... 5-40
Functions for navigating dimensional hierarchies ............................. 6-1
Unit objectives .................................................................................................... 6-3
Use family functions to navigate data ................................................................. 6-4
Return child members ........................................................................................ 6-5
Return parent member ....................................................................................... 6-6
Return descendants ........................................................................................... 6-7
Demonstration 1: Create a crosstab report and show descendants of the
Products hierarchy.......................................................................................... 6-8
Return ancestor members ................................................................................ 6-13
Return cousin members ................................................................................... 6-14
Unit summary ................................................................................................... 6-15
Exercise 1: Determine the product line for a product, using the ancestor()
function......................................................................................................... 6-16
Exercise 2: Create a dynamic crosstab report with combined dimensional
functions ........................................................................................................... 6-20

© Copyright IBM Corp. 2007, 2016 P-5


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Preface

Relative functions ................................................................................. 7-1


Unit objectives .................................................................................................... 7-3
Use functions to navigate data ........................................................................... 7-4
Dimensional structures (review) ......................................................................... 7-5
Use relative functions to navigate data ............................................................... 7-6
Demonstration 1: Use family and relative dimensional functions to focus
reports ............................................................................................................ 7-7
Use relative time functions to navigate data (overview) .................................... 7-13
The closingPeriod function ............................................................................... 7-14
The periodsToDate function ............................................................................. 7-15
Demonstration 2: Use relative time dimensional functions to focus reports ...... 7-16
The parallelPeriod function ............................................................................... 7-23
Demonstration 3: Create a periods-to-date report and compare to the
previous year ................................................................................................ 7-24
The lastPeriods function ................................................................................... 7-33
Demonstration 4: Create a report that spans the past six months based
on a selected month ..................................................................................... 7-34
Unit summary ................................................................................................... 7-38
Exercise 1: Create a dashboard report to compare various time periods .......... 7-39
Advanced drilling techniques and member sets ................................ 8-1
Unit objectives .................................................................................................... 8-3
What is drilling? .................................................................................................. 8-4
Default drill up and down behavior ..................................................................... 8-5
Members within same hierarchy ......................................................................... 8-6
Demonstration 1: Examine default drilling behavior ............................................ 8-7
Cases for overriding default .............................................................................. 8-13
Demonstration 2: Configure advanced drill behavior ........................................ 8-14
Define member set structures........................................................................... 8-20
When explicit member sets are needed............................................................ 8-21
Independent drill up and down.......................................................................... 8-22
Demonstration 3: Enable independent drilling on members of the same
hierarchy ....................................................................................................... 8-23
Bind report expressions .................................................................................... 8-30
Demonstration 4: Preserve order when drilling up or down............................... 8-32
Synchronized drill up and down with multiple queries ....................................... 8-39
Demonstration 5: Synchronized drill up and drill down behavior ....................... 8-40
Apply one function to member sets .................................................................. 8-45
Demonstration 6: Apply a single function to multiple member sets ................... 8-46
Unit summary ................................................................................................... 8-53
Exercise 1: Create a report with drillable complex functions ............................. 8-54

© Copyright IBM Corp. 2007, 2016 P-6


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Preface

Set up drill-through reports.................................................................. 9-1


Unit objectives .................................................................................................... 9-3
What is drill-through access?.............................................................................. 9-4
Drill-through access from a report ...................................................................... 9-5
Drill-through access for a package ..................................................................... 9-6
Steps to set up a package-based drill-through definition .................................... 9-7
Specify the values passed to target parameters ................................................. 9-8
Member-to-member drill-through access ............................................................ 9-9
Demonstration 1: Set up member-to-member drill-through access ................... 9-10
Drill down then drill through .............................................................................. 9-16
Demonstration 2: Let users drill down and then drill through ............................ 9-17
Drill through to different data sources ............................................................... 9-24
Member-to-member .......................................................................................... 9-26
From OLAP members to DMR members .......................................................... 9-27
From members to values .................................................................................. 9-28
Demonstration 3: Drill through from members to a parameter expecting a
business key................................................................................................. 9-29
Demonstration 4: Drill through from member captions to values ....................... 9-36
Drilling to different data sources ....................................................................... 9-41
Drill through from dates .................................................................................... 9-42
Unit summary ................................................................................................... 9-43
End-to-end exercise ......................................................................... 10-1

© Copyright IBM Corp. 2007, 2016 P-7


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Preface

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

© Copyright IBM Corp. 2007, 2016 P-8


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Preface

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

© Copyright IBM Corp. 2007, 2016 P-9


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Preface

Optional configuration for the IBM Cognos Analytics


11.0 course environment
The environment provided has been configured and tested to work with the
demonstrations and exercises in this course. For instructors teaching in an ILT or
ILO environment, or for students in a Self-paced Virtual Classroom (SPVC)
environment, there is an optional configuration that can be performed. This
configuration provides access to a wide range of templates that can be used to
create reports in the new IBM Cognos Analytics - Reporting environment. For the
course environment, this change impacts the IBM Cognos Analytics - Reporting
user interface and the initial steps used to create reports.

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.

© Copyright IBM Corp. 2007, 2016 P-10


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Preface

The optional configuration includes the deployment of the Templates.zip


deployment archive. This can be performed using the following steps in the course
environment:
1. In Internet Explorer, log on to IBM Cognos Analytics as
admin\Education1.
2. On the side panel (left pane), click Manage, and then click Administration
console.
3. Click the Configuration tab, and then click Content Administration.
4. On the toolbar, click New Import.
5. On the Select a deployment archive page, select the Templates archive,
and then click Next.
6. On the Specify name and description page, click Next.
7. On the Public folders, directory and library content page, select the
Templates check box, and then click Next.
8. On the Specify the general options page, click Next.
9. On the Review the summary page, click Next.
10. On the Select an action page, ensure Save and run once is selected, and
then click Finish.
11. On the Run with options page, ensure Now is selected, click Run, and
then click OK.
12. Close the IBM Cognos Administration tab.

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.

© Copyright IBM Corp. 2007, 2016 P-11


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Preface

3. Click Report.
The user interface now appears as follows:

You are presented with a list of templates to choose from.


4. Select a template. Note: there are various layouts to choose from. In most
instances, you will be successful with current steps using the "1 column"
option (1st column, 2nd row). If issues are encountered, the "Blank" option
is also available.
5. In the report layout on the right, click +, and then choose the report type
(List, Crosstab, Chart), or object (Table, Text item, Block)
6. Continue creating the report as scripted in the demonstration or exercise.
Note: some screen captures may appear different than what is presented in
the demonstration or exercise.

© Copyright IBM Corp. 2007, 2016 P-12


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Preface

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.

© Copyright IBM Corp. 2007, 2016 P-13


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Preface

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.

© Copyright IBM Corp. 2007, 2016 P-14


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Preface

Additional training resources


• Visit IBM Analytics Product Training and Certification on the IBM website for
details on:
• Instructor-led training in a classroom or online
• Self-paced training that fits your needs and schedule
• Comprehensive curricula and training paths that help you identify the courses
that are right for you
• IBM Analytics Certification program
• Other resources that will enhance your success with IBM Analytics Software
• For the URL relevant to your training requirements outlined above, bookmark:
• Information Management portfolio:
http://www-01.ibm.com/software/data/education/
• Predictive and BI/Performance Management/Risk portfolio:
http://www-01.ibm.com/software/analytics/training-and-certification/

© Copyright IBM Corp. 2007, 2016 P-15


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Preface

IBM product help


Help type When to use Location

Task- You are working in the product and IBM Product - Help link
oriented you need specific task-oriented help.

Books for You want to use search engines to Start/Programs/IBM


Printing find information. You can then print Product/Documentation
(.pdf) out selected pages, a section, or the
whole book.
Use Step-by-Step online books
(.pdf) if you want to know how to
complete a task but prefer to read
about it in a book.
The Step-by-Step online books
contain the same information as the
online help, but the method of
presentation is different.

IBM on the You want to access any of the


Web following:

• IBM - Training and Certification • http://www-01.ibm.com/


software/analytics/training-
and-certification/
• Online support • http://www-947.ibm.com/
support/entry/portal/
Overview/Software
• IBM Web site • http://www.ibm.com

© Copyright IBM Corp. 2007, 2016 P-16


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Introduction to dimensional reporting concepts

Introduction to dimensional
reporting concepts

IBM Cognos Analytics 11.0

© Copyright IBM Corporation 2016


Course materials may not be reproduced in whole or in part without the written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 1 Introduction to dimensional reporting concepts

© Copyright IBM Corp. 2007, 2016 1-2


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 1 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

Introduction to dimensional reporting concepts © Copyright IBM Corporation 2016

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).

© Copyright IBM Corp. 2007, 2016 1-3


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 1 Introduction to dimensional reporting concepts

Data sources and model types


• You can work with both relational and dimensional data sources in IBM
Cognos Analytics
• To support these data sources, there are three model types:
 Relational
 Dimensionally modeled relational (DMR)
 OLAP

Introduction to dimensional reporting concepts © Copyright IBM Corporation 2016

Data sources and model types


Relational models have a basic metadata structure that looks like tables and columns in
a database.
Dimensionally Modeled Relational (DMR) models are built from relational data sources,
but are modeled with a dimensional structure (like OLAP) consisting of measures and
dimensions.
Online Analytical Processing (OLAP) models point to multidimensional data sources
such as IBM Cognos PowerCubes or MSAS cubes, which in turn are built using their
own modeling tools. PowerCubes are built using Transformer typically using relational
data as a source.
In IBM Cognos Analytics, the metadata from DMR and OLAP models is shown in a
dimensional structure comprised of dimensions, hierarchies, and measures.

© Copyright IBM Corp. 2007, 2016 1-4


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 1 Introduction to dimensional reporting concepts

Examining OLAP data structures


Fax
Telephone Camping Equipment
Members Mail
E-Mail Golf Equipment
Web
Cell
Outdoor Protection
Order Methods

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

Introduction to dimensional reporting concepts © Copyright IBM Corporation 2016

Examining OLAP data structures


The OLAP structure consists of the following elements:
• Dimensions - logical groupings of members
• Members - data entities that provide context to cell values
• Hierarchies - provide context to the level structures they contain
• Levels - provide structure for the members of a hierarchy
• Attributes - provide additional information for members
• Cells - are intersection points containing values (measures) for various members
from different dimensions (also referred to as tuples)

© Copyright IBM Corp. 2007, 2016 1-5


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 1 Introduction to dimensional reporting concepts

Describe IBM Cognos dynamic cubes


• Designed for interactive analytics over large data warehouses
• Dimensional view of a star or snowflake schema based on a single fact
table; defines relationships between dimensions and measures
• A dynamic cube can be deployed as an OLAP data source to Content
Manager

Introduction to dimensional reporting concepts © Copyright IBM Corporation 2016

Describe IBM Cognos dynamic cubes


Dynamic cubes have managed caches; support for dimensional calculated
members/measures, relative time, virtual cubes, and can handle large volumes of data.
Dynamic cubes introduce a performance layer in the Cognos query stack to allow low-
latency, high-performance OLAP analytics over large relational data warehouses. By
using the power and scale of a relational database, dynamic cubes can provide OLAP
analytics over terabytes of warehouse data.
Dynamic cubes are created in IBM Cognos Cube Designer, and are published as data
sources in Content Manager. Dynamic cubes are listed as data sources in IBM Cognos
Administration, and are configured and administered within the Query Service in IBM
Cognos Administration.
To work with a deployed dynamic cube in the IBM Cognos Analytics, you must also
publish a package for it, configure the cube as a data source, and start the cube.

© Copyright IBM Corp. 2007, 2016 1-6


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 1 Introduction to dimensional reporting concepts

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.

© Copyright IBM Corp. 2007, 2016 1-7


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 1 Introduction to dimensional reporting concepts

The dimensional structure in IBM Cognos Analytics

Dimension
Hierarchy

Level

Quantity <#Year#> <#Year#>


Member
<#Insect Repellents#> <#1234#> <#1234#>
<#Sunscreen#> <#1234#> <#1234#>

Child
Members Members used as data
items for a report

Attribute

Introduction to dimensional reporting concepts © Copyright IBM Corporation 2016

The dimensional structure in IBM Cognos Analytics


IBM Cognos Analytics show members in their metadata trees and let you work directly
with the members as report data items.
IBM Cognos Analytics planning cubes do not have levels.
There will be a performance impact if you use large numbers of individual members to
populate the edges. This is due to the high number of requests that will be generated
as a result of evaluating each member.
Members of a given level may have attributes (for example Product line code). Because
they are associated only with members, they have no hierarchical structure; therefore
you cannot drill down or drill up on these items in a report.

© Copyright IBM Corp. 2007, 2016 1-8


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 1 Introduction to dimensional reporting concepts

Differentiate data entities

OLAP/DMR Relational

Product
TrailChef Water Bag
Members TrailChef Canteen
TrailChef Kitchen Kit

Product
Aloe Relief
Values Astro Pilot
Auto Pilot

Introduction to dimensional reporting concepts © Copyright IBM Corporation 2016

Differentiate data entities


OLAP and DMR data entities are different from relational data entities:
• members (OLAP and DMR)
• values (relational)
When you create a report using a dimensional model, you work with the metadata or
the members. Each member has certain properties such as a member key and
member caption. Report authors and consumers see the member caption. Each
member is defined and identified by its member unique name (MUN), which describes
its position in the dimensional structure.

© Copyright IBM Corp. 2007, 2016 1-9


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 1 Introduction to dimensional reporting concepts

What is a dimensional query?


• A dimensional query in IBM Cognos Analytics:
 Runs against dimensional structures including dimensions, hierarchies,
levels, members, member sets, and measures
 Uses dimensional expressions and possibly functions that understand and
exploit the dimensional structures
 Returns a dimensional structure that has edges and intersecting values

Introduction to dimensional reporting concepts © Copyright IBM Corporation 2016

What is a dimensional query?


A dimensional query returns a dimensional structure that has edges, such as columns
and rows, which contain members from a level in a dimension. A dimensional query
also contains intersecting values, or tuples, which represent the intersection points
between the members on the edges.

© Copyright IBM Corp. 2007, 2016 1-10


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 1 Introduction to dimensional reporting concepts

The dimensional approach to queries


• The most common presentation of dimensional data is the crosstab

Expression Expression

Quantity Fax Mail Web Special


Expression

Camping Equipment 413958 348058 19230179 203528


Mountaineering Equipment 292408 81259 7642306 93856
Personal Accessories 359414 115208 31043721 117758

Introduction to dimensional reporting concepts © Copyright IBM Corporation 2016

The dimensional approach to queries


The dimensional approach to querying is based on the premise that you include the
items you want in your query rather than filtering out unwanted items. Populating the
rows and columns with members is an inclusive process of specifying the required
items rather than filtering items that are not required.
Rows and columns define the basic structure and determine cell values.
You can give further context to the cell values by restricting them to specific members
from dimensions, which typically are not shown on the edges of the report (slicer).
In the slide example, the crosstab report uses three sets of expressions to populate the
rows, columns, and cells.

© Copyright IBM Corp. 2007, 2016 1-11


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 1 Introduction to dimensional reporting concepts

The query model in IBM Cognos Analytics


• Queries:
 Specify how data should be retrieved for reports
 Can contain data items to retrieve data, filters to restrict specific data, and
calculations to specify how data is retrieved

Introduction to dimensional reporting concepts © Copyright IBM Corporation 2016

The query model in IBM Cognos Analytics


IBM Cognos Analytics automatically creates the queries you need as you build reports
in the layout. If necessary, you can modify these queries or create your own queries to
get the results you require.
You may need to include a data item in a query even though this item will not appear in
the report layout. Instead of working in the report layout, you can add data items and
filters directly to the query using the Query explorer. You can use Query explorer to
view queries, and their components including data items, filters, and slicers, and to
modify the properties for these objects.

© Copyright IBM Corp. 2007, 2016 1-12


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 1 Introduction to dimensional reporting concepts

The IBM Cognos Analytics query language


• You can manage the complexities of building queries through:
 A drag-and-drop interface with automatic expression creation, providing
faster development time
 The use of IBM Cognos Analytics dimensional functions in expressions

children([Asia Pacific])

Dimensional expression using


IBM Cognos Analytics query language

Introduction to dimensional reporting concepts © Copyright IBM Corporation 2016

The IBM Cognos Analytics query language


You can use the IBM Cognos Analytics query language to build custom calculations,
dynamically show data, and provide interactive data driven functionality to the end user.
The expressions you write or that are generated automatically are written using IBM
Cognos Analytics query language. The IBM Cognos Analytics query language is then
converted at run time to the appropriate vendor-specific language and syntax (MDX or
SQL).

© Copyright IBM Corp. 2007, 2016 1-13


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 1 Introduction to dimensional reporting concepts

Data items and data item properties

Introduction to dimensional reporting concepts © Copyright IBM Corporation 2016

Data items and data item properties


When you use the Reporting layout to drag dimensional items onto your report,
extended data items are created. The properties for the data items are visible in the
Properties pane. These extended data items can be used as objects within both the
report layout and query.
If you prefer to view and use the IBM Cognos Analytics expressions for data items
instead of the extended data items objects, you can set the default in the Tools menu.
The preferred and default method of adding data items to reports is with these new
extended data items.
All demonstrations and exercises in this course use the default setting.

© Copyright IBM Corp. 2007, 2016 1-14


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 1 Introduction to dimensional reporting concepts

Identify dimensional expressions


• Hierarchy expression
[sales_and_marketing].[Products].[Products]

• Level expression
[sales_and_marketing].[Products].[Products].[Product line]

• Member expression (alias)


[Camping Equipment]

• Attribute expression
[sales_and_marketing].[Products].[Products].[Product line]. [Product line - Long
Name]

Introduction to dimensional reporting concepts © Copyright IBM Corporation 2016

Identify dimensional expressions


Members can be expressed with their full Member Unique Name (MUN) or with an
alias.
• MUN - [sales_and_marketing].[Products].[Products].[Product line]->:[PC].
[@MEMBER].[991]
• Alias - [Camping Equipment]

© Copyright IBM Corp. 2007, 2016 1-15


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 1 Introduction to dimensional reporting concepts

Differentiate from SQL and MDX


• SQL
 Used for relational data sources
• MDX
 Used for OLAP data sources
• IBM Cognos Analytics query language
 Used by report authors
 Converted to MDX or SQL at runtime

Introduction to dimensional reporting concepts © Copyright IBM Corporation 2016

Differentiate from SQL and MDX


It is important to understand the difference between the various query languages. As a
report author, you will use IBM Cognos Analytics query language. It will be
automatically converted at run time to the vendor-specific MDX or SQL.

© Copyright IBM Corp. 2007, 2016 1-16


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 1 Introduction to dimensional reporting concepts

Demonstration and exercise start point information


The beginning of each demonstration and exercise contains a section that identifies the
specific variables you will use for the tasks that you will perform. The format appears as
follows:
Portal: http://vclassbase:9300/bi
User/Password: brettonf/Education1
Package: Team content > Samples > Models > GO data warehouse (query)
Report Type: List
Folder: Sales and Marketing (query)
Namespace: Sales (query)
This section specifies the user ID and password, package, and report type you will use,
as well as the folder and namespace that contain the items you require to build the
report. For example, if your demonstration provided the start point information above,
you would do the following steps to create the report:
1. From the Start menu, click All Programs > Internet Explorer to launch a
browser session.
2. In the Address box, type the portal address http://vclassbase:9300/bi and
then press Enter.
The Log On to IBM Cognos Analytics window appears in a browser tab, with a
Log on dialog box prompting for a User ID and Password. You will log on with
the credentials listed in the start point information.
3. In the User ID box type brettonf, in the Password box type Education1, and
then click Sign in.
The IBM Cognos Analytics software page displays, the features of the
application that your user has permission to use are displayed.

4. Click New and then click Report .


You are prompted to select a package to author your reports with and also to
select a reporting object, such as a List or a Crosstab.
5. Click the ellipsis to the right of the Package text box.
6. Click Samples > Models > GO data warehouse (query), and then click Open.
The New dialog box displays the package you will work with, and the report
objects that you will begin to author your report. You can select one object from
the list, and then click OK, or you can double-click an object to select it and
launch the new report. The start point information in this example requires a list
report template.

7. Click List and then click OK.

© Copyright IBM Corp. 2007, 2016 1-17


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 1 Introduction to dimensional reporting concepts

Most demonstrations and exercises will require a new report. If your


demonstration or exercise requires you to use an existing report, you will be
provided with a report name and location in the start point information. Because
this start point example lists a Report type, this is your cue that a new report is
required.

8. Click Data in the side panel on the left.


This opens two tabs: Source and Data items. The Source tab includes a
package explorer for using the data in the package that you have selected,
while the Data items tab contains a list of data items that are in use in your
report.
9. Expand the Sales and Marketing (query) folder.
The expanded folder displays the namespaces that are available to you in this
package. The starting point information in this example will work with the Sales
(query) namespace.
10. Expand the Sales (query) namespace.
The results appear as follows:

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.

© Copyright IBM Corp. 2007, 2016 1-18


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 1 Introduction to dimensional reporting concepts

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.

© Copyright IBM Corp. 2007, 2016 1-19


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 1 Introduction to dimensional reporting concepts

Demonstration 1
Explore the dimensional data tree

Introduction to dimensional reporting concepts © Copyright IBM Corporation 2016

Demonstration 1: Explore the dimensional data tree

© Copyright IBM Corp. 2007, 2016 1-20


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 1 Introduction to dimensional reporting concepts

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)

Task 1. Using a DMR data source, identify reporting objects in


the 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 hirschb, in the Password box,
type Education1, and then click Sign in.
3. On the Welcome page, click New > Report from the side panel.
4. In the New dialog, click the ellipsis, navigate to Team content > Samples >
Models > GO Sales (analysis), and click Open.
5. In the New dialog, click Crosstab, and then click OK.
The results appear as follows:

© Copyright IBM Corp. 2007, 2016 1-21


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 1 Introduction to dimensional reporting concepts

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.

© Copyright IBM Corp. 2007, 2016 1-22


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 1 Introduction to dimensional reporting concepts

• Expand the Products hierarchy.


It contains a hierarchical structure consisting of the Products, Product line,
Product type, Product, and Product details levels. The Products level
represents the top level of the hierarchy and, when used in a query or report
along with a measure, represents the aggregate total for the lower levels of the
hierarchy.
• Expand the Product line, Product type, and Product levels.
Each level contains attributes that describe the parent level. Attributes can be
used in queries or reports to provide information about a particular level.
• Expand the Time dimension, hierarchy and levels.
• Expand the Sales measure dimension.
It contains the measures that are in scope with all the dimensions within the
Sales namespace.
You will now identify the differences between some of these objects when they
are used to create reports.
Task 2. Use the highest level in a hierarchy to create a report.
1. In the Data pane:
• Drag the Time level to the Columns drop zone of the report.
Time is the highest level in the Time hierarchy, and although not currently
visible, has a single member that is called the root member. This same root
member is also known as the root member for the hierarchy.
• Right-click the Time level and then click Properties.
The Properties dialog box for the Time level data item appears, and the
following expression appears in the Ref field:
[Sales (analysis)].[Time].[Time].[Time]
[Sales (analysis)] represents the namespace, and [Time].[Time].[Time]
represents the dimension, hierarchy, and level (in this case the root level,
which is a rollup for all years) of the selected item.
2. In the Properties dialog box, click Close.

© Copyright IBM Corp. 2007, 2016 1-23


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 1 Introduction to dimensional reporting concepts

3. In the Data pane:


• From the Products dimension > Products hierarchy, drag the Products level
to the Rows drop zone of the report.
• From the Sales measure dimension, drag the Revenue measure to the
Measures drop zone of the report.
Measures can also be used on the columns or row edges of a report.
The results appear as follows:

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].

© Copyright IBM Corp. 2007, 2016 1-24


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 1 Introduction to dimensional reporting concepts

3. Click Close, and then run the report in HTML.


The results appear as follows:

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:

© Copyright IBM Corp. 2007, 2016 1-25


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 1 Introduction to dimensional reporting concepts

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.

© Copyright IBM Corp. 2007, 2016 1-26


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 1 Introduction to dimensional reporting concepts

Task 5. Use an attribute to create a report.


1. In the report layout, ensure that <#Products#> is selected, and then delete it.
2. In the Data pane:
• Drag the Product line level to the Rows drop zone.
• Expand the Product line level, and then drag the Product line code
attribute to the rows to the right of <#Product line#> to nest as a child.
3. In the Insert member property dialog box, accept the default Insert property
only option, and then click OK.
4. In the report, click <Product line code>.
In the Properties pane, the DATA ITEM section appears as follows:

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.

5. On the application bar, click More and then click Locked .


6. In the report layout, click the <Product line code> text item to refresh its
properties.
The DATA ITEM section of the Properties pane appears as follows:

This is the data item for the Product line code attribute.

7. On the application bar, click More and then click Unlocked .

© Copyright IBM Corp. 2007, 2016 1-27


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 1 Introduction to dimensional reporting concepts

8. Run the report in HTML.


The results appear as follows:

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.

© Copyright IBM Corp. 2007, 2016 1-28


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 1 Introduction to dimensional reporting concepts

Report authoring styles


• The Relational Style lets report authors:
 Work with metadata only
 Create both list reports and crosstabs
• The Dimensional Style lets report authors:
 Work with members in addition to metadata
 Create crosstabs and charts
 Take advantage of dimensional capabilities on DMR and OLAP data
sources
 Achieve more control and flexibility over how data is retrieved

Introduction to dimensional reporting concepts © Copyright IBM Corporation 2016

Report authoring styles


The Relational Style lets report authors apply relational techniques to relational, DMR,
and OLAP data sources. Some examples of relational techniques are detail filters,
summary filters, and string functions.
The Dimensional Style lets report authors apply dimensional techniques to DMR and
OLAP data sources. Dimensional techniques include dimensional functions and slicers.
With the Dimensional Style authors can work with members and take advantage of
dimensional capabilities on DMR and OLAP data sources.

© Copyright IBM Corp. 2007, 2016 1-29


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 1 Introduction to dimensional reporting concepts

Apply report authoring styles

Data Source

Relational DMR OLAP

Relational √
√ √
√ √*

Authoring
Style √ √
Dimensional √* √

Introduction to dimensional reporting concepts © Copyright IBM Corporation 2016

Apply report authoring styles


It is recommend that only advanced authors use a style that does not match its data
source, or use two different styles in the same query. It is important to understand the
rules, impact, and limitations of these techniques before employing them.
Be careful using relational authoring style with OLAP data sources (including Dynamic
cubes), or using dimensional authoring style with DMR data sources.
Best practice is to use optimal style for data source. Mixing both styles within a single
query, indicated by the red boxes, is not recommended as it can lead to both
performance issues and unexpected results.
An example of mixing styles in the same query would be, if you were querying an OLAP
data source, and you used a caption function on a member to return its caption, and
then applied a string function such as substring. It is crucial that report authors learn to
distinguish between reporting styles and to apply dimensional styles to their
dimensional data.

© Copyright IBM Corp. 2007, 2016 1-30


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 1 Introduction to dimensional reporting concepts

Other reports in IBM Cognos Analytics


• You can:
 Identify and learn more about the dimensional and relational style authoring
techniques applied in these reports
 Apply style and augment the reports

Introduction to dimensional reporting concepts © Copyright IBM Corporation 2016

Other reports in IBM Cognos Analytics

© Copyright IBM Corp. 2007, 2016 1-31


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 1 Introduction to dimensional reporting concepts

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

Introduction to dimensional reporting concepts © Copyright IBM Corporation 2016

Unit summary

© Copyright IBM Corp. 2007, 2016 1-32


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Introduction to dimensional data in reports

Introduction to
dimensional data in reports

IBM Cognos Analytics 11.0

© Copyright IBM Corporation 2016


Course materials may not be reproduced in whole or in part without the written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 2 Introduction to dimensional data in reports

© Copyright IBM Corp. 2007, 2016 2-2


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 2 Introduction to dimensional data in reports

Unit objectives
• Work with members
• Identify sets and tuples in IBM Cognos Analytics

Introduction to dimensional data in reports © Copyright IBM Corporation 2016

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.

© Copyright IBM Corp. 2007, 2016 2-3


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 2 Introduction to dimensional data in reports

What makes up a member?

Data source table

Product Product Introduction


Description Color
Code Name Date
Lightweight,
Member TrailChef collapsible Blue
1 Feb 15, 1995
source Water Bag bag to carry and red
liquids easily
Aluminum
Member TrailChef
source 2 canteen that Silver Feb 15, 1995
Canteen
holds 2 liters

Member key Member Attributes


caption

Introduction to dimensional data in reports © Copyright IBM Corporation 2016

What makes up a member?


In the example above, each row is a data entity that contains the data used to make up
a member. The member key is used to identify a particular member in a dimensional
structure. The member caption is the name that appears for the member. Members
may also have attributes, such as alternate member names or other descriptive
information.
The data that makes up a member is also described as the properties of a member.
Member properties are defined in their originating data source.

© Copyright IBM Corp. 2007, 2016 2-4


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 2 Introduction to dimensional data in reports

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

© Copyright IBM Corp. 2007, 2016 2-5


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 2 Introduction to dimensional data in reports

What is a Member Unique Name?


• A Member Unique Name (MUN):
 Uniquely identifies a member
• A MUN is referenced in an expression when a member data entity is
used:
 In a report
 In a filter or calculation
 For drill-through access

Introduction to dimensional data in reports © Copyright IBM Corporation 2016

What is a Member Unique Name?


MUNs are not intended to be readable or constructible by users.
Member unique names are similar in concept to business keys which can be used to
find records within a relational table. For example, where Product line code is 1,
Product line is Camping Equipment.
Why are MUNs important for drill-through? The MUN or a portion of the MUN is passed
as a parameter from multidimensional source reports.
In any report scenario, if a MUN for a member, used in a report, changes, the report
breaks. This can occur when the member key changes.
MUNs also identify a measure because a measure is a member in a measure
dimension. However, they have a simpler appearance.

© Copyright IBM Corp. 2007, 2016 2-6


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 2 Introduction to dimensional data in reports

What makes up a MUN?


• A MUN is not defined in the same way for different OLAP vendors.
However, it is typically defined as:
level unique name ->: path consisting of keys or alternate method of uniquely
identifying the member

• MUN from a PowerCube data source:


[sales_and_marketing].[Products].[Products].[Product type]->: [PC].[@MEMBER].[952]

• MUN from a Framework Manager DMR data source:


[Product forecast].[Products].[Products].[Product type]->[Products].[991].[952]

Introduction to dimensional data in reports © Copyright IBM Corporation 2016

What makes up a MUN?


MUN formats are dependent on the data source.

© Copyright IBM Corp. 2007, 2016 2-7


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 2 Introduction to dimensional data in reports

Changes that impact a MUN


• When MUNs change, members referenced in expressions or as drill-
through parameters can no longer be found.
• MUNs can change when:
 Hierarchies or levels change
 Member keys change
 Members no longer exist in the data source
 A production environment has more members than in the test environment

Introduction to dimensional data in reports © Copyright IBM Corporation 2016

Changes that impact a MUN


Identifying which changes affect MUNs will help modelers to model metadata
appropriately so that reports created in the test/development environment will function
without issue in the production environment.
When MUNs change, they impact the reports that directly reference the members they
point to. Those MUNs must be identified and fixed. If a report references a level that
returns all members, then a changed MUN will not affect the report. Levels are not
members and therefore do not have MUNs.
During the initial design phase, an organization may use a smaller data set to build
cubes in a test environment than they typically would in their production environment.
This can produce a MUN change when moving from test to production because
production will have more members than test and the references may change. This
may also be the case when trying to convert one environment, such as MSAS, to
another, such as IBM Cognos PowerCube, or vice versa.
There are MUN change management techniques available that will help with fixing
reports that are broken as a result of changing MUNs. These techniques are beyond
the scope of this course.

© Copyright IBM Corp. 2007, 2016 2-8


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 2 Introduction to dimensional data in reports

Demonstration 1
Use members to create reports

Introduction to dimensional data in reports © Copyright IBM Corporation 2016

Demonstration 1: Use members to create reports

© Copyright IBM Corp. 2007, 2016 2-9


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 2 Introduction to dimensional data in 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.

© Copyright IBM Corp. 2007, 2016 2-10


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 2 Introduction to dimensional data in reports

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]

© Copyright IBM Corp. 2007, 2016 2-11


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 2 Introduction to dimensional data in reports

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.

19. Click View Metadata Tree .


Task 2. Create a report using levels.
1. In the Data pane, drag the Product line level to the Rows drop zone, and then
drag the Product type level to rows to the right of <#Product line#>.
Product type is nested as a child of Product line.
2. Expand the Time dimension and the Time hierarchy, and then drag the Year
level to the Columns drop zone.
3. Drag the Month level to columns under <#Year#>.
Month is nested as a child of Year.
4. Expand the Measures dimension; drag the Revenue measure to the Measures
drop zone.
When creating reports with levels, a level may have thousands of members,
and this would impact the report output.
The results appear as follows:

© Copyright IBM Corp. 2007, 2016 2-12


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 2 Introduction to dimensional data in reports

5. Run the report in HTML.


A section of the report appears as follows:

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.

© Copyright IBM Corp. 2007, 2016 2-13


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 2 Introduction to dimensional data in reports

8. In the Data pane, in the Measures dimension, drag Revenue to the Measures
drop zone in the report.
The results appear as follows:

9. Run the report in HTML.


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.

© Copyright IBM Corp. 2007, 2016 2-14


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 2 Introduction to dimensional data in reports

Demonstration 2
Explore MUNs

Introduction to dimensional data in reports © Copyright IBM Corporation 2016

Demonstration 2: Explore MUNs

© Copyright IBM Corp. 2007, 2016 2-15


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 2 Introduction to dimensional data in reports

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.

© Copyright IBM Corp. 2007, 2016 2-16


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 2 Introduction to dimensional data in reports

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.

© Copyright IBM Corp. 2007, 2016 2-17


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 2 Introduction to dimensional data in reports

Inserting members and children

<#Time#>

<#2010#>
<#2011#>
<#2012#>
<#2013#>

<#2010#>
<#2011#>
<#2012#>
<#2013#>
<#Time#>

Introduction to dimensional data in reports © Copyright IBM Corporation 2016

Inserting members and children


By default, when you insert members from the source tree into your report, single
members are inserted without any details or children. You can change how members
are inserted. For example, you may want to insert a member along with all its children
or insert only its children.
When you double-click a member in your report layout, by default its children are
automatically inserted after the parent member.
When you double-click a member in your report, you can control whether the children
are inserted before or after, nested, or not inserted at all.

© Copyright IBM Corp. 2007, 2016 2-18


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 2 Introduction to dimensional data in reports

Using sets in IBM Cognos Analytics


In the [Year] level, the
members 2010, 2011,
and 2012 are a set of
members.

Revenue 2010 2011 2012


Camping Equipment
If individual Golf Equipment
members
were used, Outdoor Protection
how many
sets would Personal Accessories
exist?
Mountaineering Equipment

In the [Product line] level, the members Camping Equipment, Golf


Equipment, Outdoor Protection, Personal Accessories, and
Mountaineering Equipment, are a set of members.

Introduction to dimensional data in reports © Copyright IBM Corporation 2016

Using sets in IBM Cognos Analytics


A set refers to a group of one or more members from a single hierarchy. Sets can be
generated automatically by dragging members to the report layout, or created manually
by either using a Query Calculation object and creating a set expression, or by using
the Create Sets for Members button and dragging multiple members (from within the
same hierarchy) to include in the set to the report layout.
A set can be sorted and summarized.
To create the crosstab structure shown in the graphic you could drag the Product line
level to the rows, and then drag the Year level to the columns edge. These would be
examples of generating sets automatically.
In the example in the diagram above, the answer to the question is 5 sets.

© Copyright IBM Corp. 2007, 2016 2-19


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 2 Introduction to dimensional data in reports

Creating sets for members

Insert Individual Members Create Sets for Members


(default mode)

<#Camping Equipment#>
<#Mountaineering Equipment#> <#Set - Products#>

Camping Equipment Camping Equipment


Mountaineering Equipment Mountaineering Equipment

Introduction to dimensional data in reports © Copyright IBM Corporation 2016

Creating sets for members


When you drag a member to the report layout, the mode you are using will determine
what result will be in the layout, the query, and the final report.
In the diagram, you can see the effect of each mode when dragging Golf Equipment
and Mountaineering Equipment members to the report layout, followed by the resulting
data items created in the query, followed by the resulting report.

© Copyright IBM Corp. 2007, 2016 2-20


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 2 Introduction to dimensional data in reports

Tuples in IBM Cognos Analytics

Revenue 2010 2011 2012

Camping Equipment 332,986,338.06 402,757,573.17 500,382,422.83


Mountaineering Equipment 0.00 107,099,659.94 161,039,823.26
Personal Accessories 391,647,093.61 456,323,355.90 594,009,408.42
Outdoor Protection 36,165,521.07 25,008,574.08 4,471,025.26
Golf Equipment 153,553,850.98 168,006,427.07 230,110,270.55

Introduction to dimensional data in reports © Copyright IBM Corporation 2016

Tuples in IBM Cognos Analytics


The result set of a dimensional query contains tuples, which refer to the measure
values at the intersections of members from different dimensions.
To return the tuples, a dimensional query also uses the default member from all
dimensions that are not explicitly referenced in the query.
In queries where default members are implicitly used, dimensions with more than one
hierarchy will typically use the default member from the first hierarchy in the natural
order of the dimension. Certain data source vendors may have different behaviors.
The tuple [Golf Equipment], [2011], [Revenue] returns the revenue measure value for
golf equipment in 2011 and for all order methods, retailers, promotions, and so on.

© Copyright IBM Corp. 2007, 2016 2-21


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 2 Introduction to dimensional data in reports

Automatically create sets and tuples


Blank crosstab layout
Columns

Rows Measures

Drag the Year level to


the Columns drop zone.

Drag the Revenue <#Year#> <#Year#> Drag the Revenue


Product line
level to the <#Product line#> <#1234#> <#1234#> measure to the
Rows drop <#Product line#> <#1234#> <#1234#> Measures drop zone.
zone.

Set
Revenue 2010 2011 2012

Camping Equipment 332,986,338.06 402,757,573.17 500,382,422.83

Mountaineering Equipment 107,099,659.94 161,039,823.26

Set Personal Accessories Set 391,647,093.61 456,323,355.90 594,009,408.42

Outdoor Protection 36,165,521.07 2,008,574.08 10,349,175.84

Golf Equipment 153,553,850.98 168,006,427.07 230,110,270.55

Tuple values

Introduction to dimensional data in reports © Copyright IBM Corporation 2016

Automatically create sets and tuples


IBM Cognos Analytics provides a graphical design interface for creating reports using
sets, tuples, and individual members. For example, in a crosstab report, measure
values are placed in the measures drop zone, while sets are added to the column and
row drop zones. You can implicitly create a set by dragging a single member such as
Camping Equipment to the columns or rows edge, to a collection of members, such as
2011 Q 1, and 2011 Q 2, to a level, or to a hierarchy.
A tuple references a value defined by the intersection of dimensions both in and out of
the query. Therefore, 107,099,659.94 (highlighted) is the revenue value of not only the
tuple [Mountaineering Equipment],[2011] but also for the default member of all other
hierarchies of other dimensions not included in the query (all Product brands, all
Retailers, all Order methods, and so on)
By dragging in the [Product line] level, the report shows the [Revenue] for each member
of [Product line]. That is, [Product line] represents the set of members [Camping
Equipment] through [Mountaineering Equipment]. If another dimension level is added to
the columns, such as [Year] after [Product line], the report would return the [Revenue]
value for each [Product line] member for each [Year] member.

© Copyright IBM Corp. 2007, 2016 2-22


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 2 Introduction to dimensional data in reports

Creating an individual tuple easily

Select multiple
members from
data tree

Right-click, and drag to The tuple is created in the


report layout report layout

2011,Golf Equipment,Revenue

2011,Golf Equipment,Revenue 168,006,427.07

Run the report to display


results

Introduction to dimensional data in reports © Copyright IBM Corporation 2016

Creating an individual tuple easily


In the data tree, select multiple members from different hierarchies, and right-click while
you drag the items to the report layout. A tuple cannot contain more than one member
from a hierarchy.

© Copyright IBM Corp. 2007, 2016 2-23


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 2 Introduction to dimensional data in reports

Manually create sets and tuples


• You can use IBM Cognos Analytics dimensional expressions and
functions to manually create sets and tuples.
• Create expressions using:

Add to the report layout


and query

Add to the query

Introduction to dimensional data in reports © Copyright IBM Corporation 2016

Manually create sets and tuples


Create expressions that contain dimensional functions using:
• an Intersection (Tuple) object, or Query calculation object from the Page explorer,
which results in a data item being added to both the query and the report layout
• a Query calculation object, Intersection (Tuple) object, or a Data item object from
the Query explorer, which results in a data item being added to only the query
and not to the report layout
• existing expressions, which you can access from the report layout or the Data
items pane of the Query explorer

© Copyright IBM Corp. 2007, 2016 2-24


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 2 Introduction to dimensional data in reports

Query calculations
• Create:
[2011]- [2010]
 calculated member
 calculated measure [Revenue]- [Planned Revenue]

 set expression children([2011])


 other expression localtime

Introduction to dimensional data in reports © Copyright IBM Corporation 2016

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.

© Copyright IBM Corp. 2007, 2016 2-25


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 2 Introduction to dimensional data in reports

Using set definitions


• A set definition allows the following operations:
 Exclude members
 Move members to the top or bottom of a set
 Join multiple sets
 Filter the set
 Expand and collapse a member within a set

Introduction to dimensional data in reports © Copyright IBM Corporation 2016

Using set definitions


The set definition graphically displays the history of operations performed on the base
set. It lets you edit the operations performed on the set, such as add or remove
operations, and reorder the operations, with no manual change required to the syntax
of the function expression.
The set definition in the slide represents the set of product lines, excluding
Mountaineering Equipment, that are the top 10% based on revenue in 2012. Set
definition operations will be explored in more detail later in the course.

© Copyright IBM Corp. 2007, 2016 2-26


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 2 Introduction to dimensional data in reports

The tuple() function

tuple(member {,member})

Revenue Quantity Returns


tuple([Fax],[2012]) 13,445,559.93 249234 8856

Introduction to dimensional data in reports © Copyright IBM Corporation 2016

The tuple() function


A tuple identifies a cell location (intersection) based on the specified members, each of
which must be from a different dimension. You can also include a measure from a
measure dimension. A tuple implicitly includes the current member from all dimensions
that are not specified in the arguments or the report.
Returned values are in context of other members in the report layout.
Similar to "tuple", completeTuple identifies a cell location (intersection) based on the
specified members, each of which must be from a different dimension. However,
completeTuple implicitly includes the default member from all dimensions not otherwise
specified in the arguments, rather than the current member.

© Copyright IBM Corp. 2007, 2016 2-27


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 2 Introduction to dimensional data in reports

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.

© Copyright IBM Corp. 2007, 2016 2-28


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 2 Introduction to dimensional data in reports

Demonstration 3
Identify sets and tuples in reports

Introduction to dimensional data in reports © Copyright IBM Corporation 2016

Demonstration 3: Identify sets and tuples in reports

© Copyright IBM Corp. 2007, 2016 2-29


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 2 Introduction to dimensional data 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.

© Copyright IBM Corp. 2007, 2016 2-30


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 2 Introduction to dimensional data in reports

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:

© Copyright IBM Corp. 2007, 2016 2-31


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 2 Introduction to dimensional data in reports

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.

© Copyright IBM Corp. 2007, 2016 2-32


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 2 Introduction to dimensional data in reports

5. Run the report in HTML.


A section of the report appears as follows:

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 Native MDX is shown. It is generated automatically by dragging and


dropping items in the user interface.
8. Close the Generated SQL dialog box.

© Copyright IBM Corp. 2007, 2016 2-33


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 2 Introduction to dimensional data in reports

Task 3. Create a tuple manually.


1. Without saving the previous report, create a new Crosstab report using the
Sales and Marketing (cube) package.
2. In the Data pane, expand the following items:
• Time dimension > Time hierarchy > Year level > Members folder
• Order method dimension > Order method hierarchy > Order method type
level > Members folder
• Measures dimension
3. Click the 2010 member, Ctrl+click the Telephone member and the Revenue
measure, and then right-click and drag to the Columns drop zone.
4. Click Insert as Tuple.
5. Run the report as HTML.
The results appear as follows:

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.

© Copyright IBM Corp. 2007, 2016 2-34


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 2 Introduction to dimensional data in reports

Unit summary
• Work with members
• Identify sets and tuples in IBM Cognos Analytics

Introduction to dimensional data in reports © Copyright IBM Corporation 2016

Unit summary

© Copyright IBM Corp. 2007, 2016 2-35


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 2 Introduction to dimensional data in reports

© Copyright IBM Corp. 2007, 2016 2-36


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Dimensional report context

Dimensional report context

IBM Cognos Analytics 11.0

© Copyright IBM Corporation 2016


Course materials may not be reproduced in whole or in part without the written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


U n i t 3 D i m e n s i o n a l r e p o r t c o n t e xt

© Copyright IBM Corp. 2007, 2016 3-2


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


U n i t 3 D i m e n s i o n a l r e p o r t c o n t e xt

Unit objectives
• Understand the purpose of report context
• Understand how data is affected by default and root members
• Identify default measure and current measure

Dimensional report context © Copyright IBM Corporation 2016

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)

© Copyright IBM Corp. 2007, 2016 3-3


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


U n i t 3 D i m e n s i o n a l r e p o r t c o n t e xt

What is report context?


• Dimensional reports aggregate measures at different levels within
hierarchies
• Report context defines which measure and which dimensional
members impact the cell values of each intersection in a report
• Understanding report context helps you to understand what will happen
to data in a report when you filter, drill, and summarize

Dimensional report context © Copyright IBM Corporation 2016

What is report context?


As we continue to work with dimensional functions throughout the course, it will become
increasingly important that report authors understand the context of the report and each
intersection calculation.

© Copyright IBM Corp. 2007, 2016 3-4


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


U n i t 3 D i m e n s i o n a l r e p o r t c o n t e xt

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

Dimensional report context © Copyright IBM Corporation 2016

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().

© Copyright IBM Corp. 2007, 2016 3-5


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


U n i t 3 D i m e n s i o n a l r e p o r t c o n t e xt

Default members (1 of 3)
• The default member is typically the root member, or in some cases can
be specified by the modeler

Time is the default member


for the Time dimension

Dimensional report context © Copyright IBM Corporation 2016

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.

© Copyright IBM Corp. 2007, 2016 3-6


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


U n i t 3 D i m e n s i o n a l r e p o r t c o n t e xt

Default members (2 of 3)

Quantity <#Order method type#> <#Order method type#>

<#Campaign#> <#1234#> <#1234#>


<#Campaign#> <#1234#> <#1234#>

Dimension Member Used


Promotions Campaign
Order method Order method type
Time Time (default member)
Products Products (default member)
Retailers Retailers (default member)
Product brand Product brand (default member)

Dimensional report context © Copyright IBM Corporation 2016

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.

© Copyright IBM Corp. 2007, 2016 3-7


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


U n i t 3 D i m e n s i o n a l r e p o r t c o n t e xt

Default members (3 of 3)

A filter is applied to show order method


types with revenue over 150,000,000

Revenue 2010 2011 2012 2013 Total

Telephone 178,793,580.36 107,160,284.09 37,199,842.80 17,832,073.81 340,985,781.06


Sales visit 101,072,721.10 79,721,524.37 73,918,652.38 55,481,936.15 310,194,834.00
Web 473,771,464.65 881,315,747.68 1,339,714,172.77 1,017,434,523.30 3,712,235,908.40
E-mail 95,402,796.21 44,318,886.43 23,701,042.57 16,420,318.95 179,843,044.16

There are seven order Default


method types. Only four Which Time value is the member
meet the condition. condition being tested against? (Time) values

Dimensional report context © Copyright IBM Corporation 2016

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.

© Copyright IBM Corp. 2007, 2016 3-8


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


U n i t 3 D i m e n s i o n a l r e p o r t c o n t e xt

Current members

• The current member is the member of the hierarchy returned during


an iteration

In iteration 1, the current member


for the Month level is 2012/Oct,
and for iteration 2, it is 2012/Nov.

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

Golf Equipment 1,794,878.00 1,734,154.24 652,757.44 605,564.36

Dimensional report context © Copyright IBM Corporation 2016

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.

© Copyright IBM Corp. 2007, 2016 3-9


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


U n i t 3 D i m e n s i o n a l r e p o r t c o n t e xt

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

Golf Equipment 1,794,878.00 1,734,154.24 652,757.44 605,564.36

Dimensional report context © Copyright IBM Corporation 2016

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.

© Copyright IBM Corp. 2007, 2016 3-10


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


U n i t 3 D i m e n s i o n a l r e p o r t c o n t e xt

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

Golf Equipment 1,794,878.00 1,734,154.24 652,757.44 605,564.36

Dimensional report context © Copyright IBM Corporation 2016

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.

© Copyright IBM Corp. 2007, 2016 3-11


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


U n i t 3 D i m e n s i o n a l r e p o r t c o n t e xt

Current measures (2 of 2)
• The current measure is the current intersection (tuple) for the members
defined on the edges during an iteration

Revenue 2010 2011 2012 2013 Total for All Years


Camping Equipment 332,986,338.06 402,757,573.17 500,382,422.83 352,910,329.97 1,589,036,664.03
Personal Accessories 391,647,093.61 456,323,355.90 594,009,408.42 443,693,449.85 1,885,673,307.78
Outdoor Protection 36,165,521.07 25,008,574.08 4,471,025.26 4,471,025.26 75,994,296.25
Golf Equipment 153,553,850.98 168,006,427.07 230,110,270.55 174,740,819.29 726,411,367.89
Mountaineering Equipment 107,099,659.94 161,039,823.26 141,520,649.70 409,660,132.90

Current aggregate(currentMeasure within set


Measure [Year])

Dimensional report context © Copyright IBM Corporation 2016

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.

© Copyright IBM Corp. 2007, 2016 3-12


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


U n i t 3 D i m e n s i o n a l r e p o r t c o n t e xt

Demonstration 1
Use the default measure to create a summarized column in a report

Dimensional report context © Copyright IBM Corporation 2016

Demonstration 1: Use the default measure to create a summarized column in a report

© Copyright IBM Corp. 2007, 2016 3-13


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


U n i t 3 D i m e n s i o n a l r e p o r t c o n t e xt

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.

© Copyright IBM Corp. 2007, 2016 3-14


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


U n i t 3 D i m e n s i o n a l r e p o r t c o n t e xt

Task 2. Summarize the rows.


1. In the report layout, click <#Year#>, on the toolbar, click Summarize, and then
click Default Summary from the list.
Default Summary will use the aggregate function to summarize the data.
2. In the report layout, click Summary.
In the Properties pane, in the Data Item section, notice that the Aggregation
Method the value is set to Aggregate, and the Name value is Summary(Year).
The same result could be achieved by using the expression
aggregate(currentMeasure within set [Year]).
You will run the report to identify the context for the current measure.
3. Run the report in HTML.
The report appears as shown below:

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.

© Copyright IBM Corp. 2007, 2016 3-15


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


U n i t 3 D i m e n s i o n a l r e p o r t c o n t e xt

Task 3. Add measures on the columns and then aggregate on


the rows.
1. On the Data pane, from the Measures dimension, drag the Quantity measure
to columns to nest as a child under <#Year#>.
You will run the report to identify the context for the current measure.
2. Run the report in HTML.
The report appears as follows:

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.

© Copyright IBM Corp. 2007, 2016 3-16


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


U n i t 3 D i m e n s i o n a l r e p o r t c o n t e xt

Task 4. Add measures on the rows and aggregate on rows.


1. In the report layout, drag <#Quantity#> from the columns, and drop it under
<#Product line#> on rows as a peer.
You will run the report to identify the context for the current measure.
2. Run the report in HTML.
The report appears as follows:

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.

1. In the crosstab, click the Container selector .


2. In Application bar, click Properties, and in the DATA section, click the Default
measure property, and then from the list, click Quantity.
3. In the report layout, click Revenue, and then on the toolbar, click the ellipsis,
and then click Cut.
You will run the report to identify the context for the current measure.

© Copyright IBM Corp. 2007, 2016 3-17


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


U n i t 3 D i m e n s i o n a l r e p o r t c o n t e xt

4. Run the report in HTML.


The report appears as shown below:

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.

© Copyright IBM Corp. 2007, 2016 3-18


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


U n i t 3 D i m e n s i o n a l r e p o r t c o n t e xt

Unit summary
• Understand the purpose of report context
• Understand how data is affected by default and root members
• Identify default measure and current measure

Dimensional report context © Copyright IBM Corporation 2016

Unit summary

© Copyright IBM Corp. 2007, 2016 3-19


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


U n i t 3 D i m e n s i o n a l r e p o r t c o n t e xt

© Copyright IBM Corp. 2007, 2016 3-20


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Focus your dimensional data

Focus your dimensional data

IBM Cognos Analytics 11.0

© Copyright IBM Corporation 2016


Course materials may not be reproduced in whole or in part without the written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 4 Focus your dimensional data

© Copyright IBM Corp. 2007, 2016 4-2


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 4 Focus your dimensional data

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

Focus your dimensional data © Copyright IBM Corporation 2016

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

© Copyright IBM Corp. 2007, 2016 4-3


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 4 Focus your dimensional data

How do relational data sources behave?


• Relational models return a result based on relationship cardinality
between items in the query

2 out of 7 Revenue 2010 2011 2012 2013

order methods 1 for 1 Sports shop Fax 775,128.03


Web 1,002,725.61 1,841,265.46 1,715,812.95 1,097,318.27
are returned
4 Golf only Sales visit 1,081,439.08 1,260,903.27
Web 586,195.45 614,326.06 1,472,511.68
4 Your Eyes Sales visit 135,201.76
Web 737,820.6
Aarhus Sport Sales visit 250,847.75 189,400.37
3 out of 7 Telephone 145,102.25
Web 712,494.7 1,025,420.15 2,506,561.08 1,170,080.59
Accapamento Web 1,711,149.2 2,613,580.91 1,752,647.69

1 out of 7

Focus your dimensional data © Copyright IBM Corporation 2016

How do relational data sources behave?


Queries run against relational data sources return data based on relationship
cardinality. Depending on the cardinality, if there are no matching records between the
queried tables, rows may or may not be returned. Typically, the relationships are
modeled with a cardinality of 1..n (inner join), so only matching records are returned.
The data source for the report in the slide example is the GO Data Warehouse (query)
package.

© Copyright IBM Corp. 2007, 2016 4-4


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 4 Focus your dimensional data

How do dimensional data sources behave?

Revenue 2010 2011 2012 2013


1 for 1 Sports shop Telephone
Sales visit
Web 1,002,725.61 1,841,265.46 1,715,812.95 1,097,318.27
Special
Mail
E-mail
Fax 775,128.03
4 Golf only Telephone
All order Sales visit 1,081,439.08 1,260,903.27
methods are Web 586,195.45 614,326.06 1,472,511.68
returned for Special

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

Focus your dimensional data © Copyright IBM Corporation 2016

How do dimensional data sources behave?


Typically, queries run against dimensional data sources return all members whether
they have measure values or not. When there is nesting in a crosstab or chart, all
members are returned for each level of nesting. This is true whether the levels of
nesting are from the same dimension or from another dimension.
Large dimensional structures without proper filtering can lead to large, inefficient
reports.
In the screen capture, the data source for the dimensional report is the sample Sales
and Marketing (cube) package. Students may ask why the sorting of the data in the
report is not the same as the report on the previous slide. This is because the sort order
for the cube is different from what is defined in the relational source. For presentation
and comparison purposes, we have sorted the first column (Retailer name) in this
report, to return the same order that was achieved in the report on the previous slide.

© Copyright IBM Corp. 2007, 2016 4-5


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 4 Focus your dimensional data

The behavior of nested levels differs as follows:


• Nested levels from different dimensions: results are as seen in slide with cross
products shown in slide. Each order method is displayed for each retailer.
• Nested levels from the same dimensions: members displayed will reflect the
actual parent-descendant relationships. If you nest Product type in Product line,
Tents will only be shown in Camping Equipment; no cross products are
displayed.

© Copyright IBM Corp. 2007, 2016 4-6


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 4 Focus your dimensional data

DMR - Relational or dimensional?

Revenue 2011 2013 2010 2012


1 for 1 Sports shop Web 1,841,265.46 1,097,318.27 1,002,725.61 1,715,812.95
E-mail
Telephone
Sales visit
Mail
Fax 775,128.03
Special
4 Golf only Web 586,195.45 1,472,511.68 614,326.06

All order methods E-mail

are returned for Telephone

each instance of a Sales visit 1,081,439.08 1,260,903.27

retailer. Mail
Fax
Why? Special
4 Your Eyes Web 737,820.6
E-mail
Telephone
Sales visit 135,201.76
Mail
Fax
Special

Focus your dimensional data © Copyright IBM Corporation 2016

DMR - Relational or dimensional?


To identify when a query against a DMR model returns all members and when it does
not, you need to understand the behavior of DMR models.
The underlying data source for a DMR model is relational. At run time, a relational
query is processed and the result is based on the relationship cardinality of the queried
items. At run time, the IBM Cognos Analytics server generates a temporary cube to
return the dimensional structure. To build the dimensional structure of the cube, the
resulting values of the relational query are used to generate the required members.
If there are no combinations of values returned from the relational query, then the rows
are dropped and the members are not generated when building the cube.
In the screen capture, the data source for the DMR report is the sample Go Data
Warehouse (analysis) model. To explain why members are sometimes returned, you
can use the slide example. As soon as one instance of a retailer, order method, year,
and a measure value is returned by the relational query, the values are used to
generate the members for building the temporary cube. Alternately, if there was no
revenue for Fax in any year for any retailer, the Fax rows would be eliminated from the
report. In other words, the resulting cube structure is presented in the crosstab rows
and columns, based on the members that are generated from the query.

© Copyright IBM Corp. 2007, 2016 4-7


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 4 Focus your dimensional data

Creating efficient dimensional queries


• Filter dimensional queries to:
 Avoid large, slow reports
 Condense blank data for easier viewing
• When designing filters:
 Use dimensional filtering techniques, not relational
 Use a building block approach
 Develop against realistic data volumes and data distribution

Focus your dimensional data © Copyright IBM Corporation 2016

Creating efficient dimensional queries


The key to creating efficient queries is to limit, or filter, the number of items examined in
the data source, while still meeting the report requirements. The goal of any filter
operation is to ensure that the user gets the desired data without impacting
performance.
Use a building block approach to author your reports. Add one data item at a time, filter
that item down to the smallest number of members, and then test the report before
proceeding to the next data item. By using a building block approach, you ensure that
your report is not unnecessarily large at any stage, thereby reducing intermediate
testing times, resource consumption, and the possibility of failures. Your motto should
be "Filter Early, Filter Often".
Develop your reports using data sources with realistic data volumes and data
distribution. Reports that run quickly in the development environment may exhibit poor
performance in the production environment when run against large data volumes. Often
a snapshot of production data (or sterilized data) can be used to ensure an equitable
development environment. If it is not possible or practical to make production data
volumes available in the development environment, then you should perform
performance and final tests in the production environment prior to declaring the report
ready for production.

© Copyright IBM Corp. 2007, 2016 4-8


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 4 Focus your dimensional data

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)

Focus your dimensional data © Copyright IBM Corporation 2016

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.

© Copyright IBM Corp. 2007, 2016 4-9


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 4 Focus your dimensional data

Using dimensional objects and expressions


• Use dimensional objects such as:
 Hierarchies
 Levels
 Individual members
• Use expressions containing dimensional functions such as:
 set(), children(), descendants()
 except()
 topCount(), bottomCount(), topPercent(), bottomPercent()

Focus your dimensional data © Copyright IBM Corporation 2016

Using dimensional objects and expressions


Use dimensional objects directly from the data tree to determine what will be returned
by a dimensional query.
Because dimensional functions such as set, children, descendants, and except provide
a greater degree of control over what is returned by a dimensional query, they are often
used in more complex calculations which return a specific set of members. You can
also modify a set definition of a base set for results like exclude, top and bottom count
and percent.

© Copyright IBM Corp. 2007, 2016 4-10


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 4 Focus your dimensional data

The except() function

except(set_expression1, set_expression2 [,all])


except([sales_and_marketing].[Order method].[Order method].[Order method type], set([Mail],[E-mail], [Fax]))

Quantity 2010 2011 2012 2013

Telephone 3979898 2251898 684667 336381


All order method types Sales visit 2640065 1778941 1411468 982938
except those defined in
Web 10050830 17507323 23054131 17846021
the second set
expression. Special 340021 252429 13622 30730

Alternatively, use Set


Definition to exclude
members.

Focus your dimensional data © Copyright IBM Corporation 2016

The except() function


Use the except() function to exclude a set of members from a defined set. This function
returns the members of the first set expression that are not in the second set
expression.
The example in the slide displays order method types that are typically handled on an
individual person-to-person contact such as telephone and sales visits, and excludes
order method types that can be handled through bulk processing such as mail and fax.
Use the syntax provided in the callout to describe how the except() function behaves.
A common use of except() is to combine it with the topCount or bottomCount functions.
For example, you want to return the top two [Product type]’s sold in conjunction with the
members that are not part of the top two [Product type]’s sold.
When creating a new set by combining sets (the except(), union(), and intersect()
functions do this), use of the ALL argument will always keep duplicates in the resulting
set. If the optional keyword ALL is supplied as the third argument, duplicates are
retained. For example, if set A includes (w,x,y,x,y,z) and set B includes (w,x), then
union(A,B) returns (w,x,y,z) but union(A,B, All) returns (w,x,y,x,y,z,w,x). Intersect(A,B)
returns (w,x) but intersect(A,B, All) returns (w,x,x). Finally, to return to the except
function: except(A,B) returns (y,z) but except(A,B, All) returns (y,y,z).

© Copyright IBM Corp. 2007, 2016 4-11


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 4 Focus your dimensional data

Demonstration 1

Focus your report by excluding members of a defined set

Focus your dimensional data © Copyright IBM Corporation 2016

Demonstration 1: Focus your report by excluding members of a defined set

© Copyright IBM Corp. 2007, 2016 4-12


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 4 Focus your dimensional data

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.

© Copyright IBM Corp. 2007, 2016 4-13


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 4 Focus your dimensional data

5. Run the report in HTML.


A section of the report appears as follows:

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.

© Copyright IBM Corp. 2007, 2016 4-14


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 4 Focus your dimensional data

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.

© Copyright IBM Corp. 2007, 2016 4-15


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 4 Focus your dimensional data

11. Run the report in HTML.


A section of the report appears as follows:

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.

© Copyright IBM Corp. 2007, 2016 4-16


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 4 Focus your dimensional data

topCount() and bottomCount()

topCount(set_expression, index_expression, numeric_expression)

topCount([sales_and_marketing].[Products].[Products].[Product line], 2, [Revenue])

Quantity Revenue Quantity


Only the top
Personal Accessories 1,885,673,307.78 34907705
two Product
lines Camping Equipment 1,589,036,664.03 27301149
are returned.

Alternatively, use Set


Definition to define top or
bottom count.

Focus your dimensional data © Copyright IBM Corporation 2016

topCount() and bottomCount()


The topCount() function sorts a set according to the cell values of a specified measure
and returns the top specified number of members.
For the example above, the topCount() function returns the top two revenue-generating
product lines.

© Copyright IBM Corp. 2007, 2016 4-17


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 4 Focus your dimensional data

topPercent() and bottomPercent()

bottomPercent(set_expression, numeric_expression1, numeric_expression2)


bottomPercent([sales_and_marketing].[Products].[Products].[Product type], 3, tuple([2012],[Planned Revenue]))

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

Alternatively, use Set


Definition to define top or
bottom percent.

Focus your dimensional data © Copyright IBM Corporation 2016

topPercent() and bottomPercent()


The bottomPercent() function sorts the second numeric expression for the
corresponding member of a set expression, and picks up the bottommost elements
whose cumulative total is equal to or less than the first numeric expression percent of
the total.
For the example above, the bottomPercent() function returns the bottom product types
by planned revenue in 2012, whose total contributes 3 % of the total for all product
types.

© Copyright IBM Corp. 2007, 2016 4-18


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 4 Focus your dimensional data

Demonstration 2

Create a crosstab report showing the top two retailers

Focus your dimensional data © Copyright IBM Corporation 2016

Demonstration 2: Create a crosstab report showing the top two retailers

© Copyright IBM Corp. 2007, 2016 4-19


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 4 Focus your dimensional data

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.

© Copyright IBM Corp. 2007, 2016 4-20


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 4 Focus your dimensional data

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:

Task 2. Determine the top two counts.


1. In the crosstab, click <#Retailer name#>, click the ellipsis on the toolbar, and
then click Edit Set.
2. In the Set definition dialog box, click New, and then click Top.
3. In the Top or Bottom dialog box, in the Count box type 2.

4. In the Based on intersection (tuple) box, click the ellipsis .


5. In the Available members and measures pane, expand Time folder > Time
node, click the 2012 member, and then click the right arrow to add it to the
Intersection members and measures pane.
6. Repeat step 5 to add Measures > Revenue to the Intersection members and
measures pane, and then click OK to close the Members dialog box.
The Top or Bottom dialog box indicates that you want a top two count of items
based on the tuple (2012, Revenue).

© Copyright IBM Corp. 2007, 2016 4-21


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 4 Focus your dimensional data

7. Click OK to close the Top or bottom dialog box.


The Set Definition dialog box indicates that for the set based on the level
Retailer name, there is a top 2 count applied.

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:

Only the top two retailers for 2012 are returned.


10. Close the rendered report tab.
11. Leave the browser open for the next demonstration.
Results:
You used the top count set definition functionality to create a crosstab report
that returns the top two retailers for 2012, their revenue, quantity, profit
margin, and their all-time revenue total.

© Copyright IBM Corp. 2007, 2016 4-22


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 4 Focus your dimensional data

Filter based on measure values


• Determine which members are returned by the query by testing the
values of a measure.
• The most common options for filtering on measure values are:
 Filter() function or set definition filter (dimensional style)
 Detail filters (relational style)

Focus your dimensional data © Copyright IBM Corporation 2016

Filter based on measure values


Both options filter data but they behave in different ways based on the dimensional
structure of reports. They should be used appropriately to return the desired data with
little performance degradation.
There is potential for performance degradation when running complex dimensional
reports against dimensional data sources, and relational filters are used to filter
measure values,. For example, if there are multiple levels of nesting, or if there are
many expressions that contain dimensional functions.

© Copyright IBM Corp. 2007, 2016 4-23


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 4 Focus your dimensional data

The filter() function


filter(set_expression, boolean_expression)

filter([sales_and_marketing].[Order method].[Order method].[Order method type], [Revenue]>150000000)

Revenue 2010 2011 2012 2013 Total

Telephone 178,793,580.36 107,160,284.09 37,199,842.80 17,832,073.81 340,985,781.06


Sales visit 101,072,721.10 79,721,524.37 73,918,652.38 55,481,936.15 310,194,834.00
Web 473,771,464.65 881,315,747.68 1,339,714,172.77 1,017,434,523.30 3,712,235,908.40
E-mail 95,402,796.21 44,318,886.43 23,701,042.57 16,420,318.95 179,843,044.16

There are seven order Which values is this


method types. Only four condition is being tested Default member
meet the condition. against? values

Alternatively, use Set


Definition to define a filter.

Focus your dimensional data © Copyright IBM Corporation 2016

The filter() function


Use the filter() function to reduce the number of members on an edge by testing cell
values. The filter() function returns the set of members of a specified set which fulfill the
boolean condition.
In the slide example, the expression returns the order methods whose revenue for the
total of all time exceeds 150,000,000.
The cell values that are evaluated can be further controlled by nesting dimensional
functions, such as the tuple() function, in the Boolean condition of the expression.
The measures being tested by the filter expression are in fact the values for the default
member of the Time hierarchy. In this case the default member is Time which is a roll
up for all years in the data source. This may not always be the case, so report authors
should be aware of what the default member is. See the unit Multidimensional Report
Context for more information on the default member.

© Copyright IBM Corp. 2007, 2016 4-24


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 4 Focus your dimensional data

Detail filters

[Revenue]> 150000000

Only two Revenue 2010 2011 2012 2013


order Telephone 178,793,580.36
method types
Web 473,771,464.65 881,315,747.68 1,339,714,172.77 1,017,434,523.30
meet the
condition.

No value is returned for Telephone in the years 2011,


2012, and 2013 because Telephone based revenue
was less than 150,000,000 during those years.

Focus your dimensional data © Copyright IBM Corporation 2016

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.

© Copyright IBM Corp. 2007, 2016 4-25


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 4 Focus your dimensional data

Demonstration 3

Compare the use of the filter() function to a detail filter

Focus your dimensional data © Copyright IBM Corporation 2016

Demonstration 3: Compare the use of the filter() function to a detail filter

© Copyright IBM Corp. 2007, 2016 4-26


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 4 Focus your dimensional data

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

© Copyright IBM Corp. 2007, 2016 4-27


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 4 Focus your dimensional data

The results appear as follows:

3. Run the report as PDF.


This report may take an exceptionally long time to run.
A section of the report appears as follows:

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.

© Copyright IBM Corp. 2007, 2016 4-28


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 4 Focus your dimensional data

Task 2. Apply the filter function to filter out nulls.


1. In the report layout, click <#Campaign#>, and then press the Delete key.
You will replace it with a query calculation.

2. On side menu, click Toolbox and, under TEXTUAL, drag Query


calculation to the right of <#Order method type#>.
3. Click the Set expression radio button, and from the Hierarchy list, click the
Promotions hierarchy, and then click OK.
While you could leave the Hierarchy setting as Automatic, if you know the
hierarchy you want to use, it is best to declare it.
4. In the Set expression dialog box, in the Name field, type Non-null
Campaigns.
5. Create and validate the following expression:
filter ([sales_and_marketing].[Promotions].[Promotions].[Campaign],
[Revenue]<>null)
Hints:
• Available Components pane > Source tab: Promotions dimension >
Promotions hierarchy > Campaign level
• Available Components pane > Data Items tab: Revenue
6. Click OK to close the Set expression dialog box.
7. Run the report in PDF.
The report runs in PDF again, but this time more quickly.
A section of the report appears as follows:

© Copyright IBM Corp. 2007, 2016 4-29


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 4 Focus your dimensional data

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.

2. In the Set definition dialog box, double-click Set expression .


3. In the Set expression box, delete the filter function that was applied in Task 2.
4. Create and validate the following expression:
[sales_and_marketing].[Promotions].[Promotions].[Campaign]
Hints:
• Available Components pane > Source tab: Promotions dimension >
Promotions hierarchy > Campaign level
This removes the filter function that is applied to the edge expression for the
rows.
5. Click OK to close the Set expression dialog box, and then click OK to close the
Set definition dialog box.
You will now create a detail filter using the relational style to achieve the same
result as in Task 2. Detail filters in the relational style typically present no issues
for zero suppression but are not recommended for threshold filters.
6. On the toolbar, click Filters, and then click Edit Filters.

7. In the Filters dialog box, click Add , in the Create filter dialog box, click
Advanced, and then click OK.

© Copyright IBM Corp. 2007, 2016 4-30


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 4 Focus your dimensional data

8. Create and validate the following expression:


[Revenue]<>null
Hints: Available Components pane > Data Items tab: Revenue
9. Click OK to close the Detail filter expression dialog box, and then click OK to
close the Filters dialog box.
10. Run the report in PDF.
The report contains the same results as before. It is 34 pages long and the null
values have been filtered. For each product, only campaigns and order methods
with revenue for at least one of the years are shown.
The detail filter affects lowest level items on both the crosstab rows and
columns (Campaign and Year). Each individual cell is evaluated rather than the
overall totals for Year. The initial filter function you created only evaluated the
totals for row items (Campaign).
To this point there is no significant difference between using the filter function
and a relational style detail filter, but you will see the difference in the following
two tasks.
11. Close the rendered report tab.
Task 4. Nest an additional set on the rows edge and filter on
details.
1. From the Data pane, expand the Retailers dimension > Retailers hierarchy,
and then drag the Region level to the right of <Non-null Campaigns> on the
rows.
The detail filter is still applied.

© Copyright IBM Corp. 2007, 2016 4-31


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 4 Focus your dimensional data

2. Run the report in PDF.


The report takes longer to run.
A section of the report appears as follows:

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.

© Copyright IBM Corp. 2007, 2016 4-32


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 4 Focus your dimensional data

7. Run the report in PDF.


A section of the report appears as follows:

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.

© Copyright IBM Corp. 2007, 2016 4-33


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 4 Focus your dimensional data

5. Create and validate the following expression:


filter ([sales_and_marketing].[Retailers].[Retailers].[Region],
[Revenue]<>null)
Hints:
• Available Components pane > Source tab: Retailers dimension > Retailers
hierarchy > Region level
• Available Components pane > Data Items tab: Revenue
6. Click OK to close the Set expression dialog box.
7. Run the report in PDF.
A section of the report appears as follows:

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).

© Copyright IBM Corp. 2007, 2016 4-34


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 4 Focus your dimensional data

8. Close the rendered report tab.


9. Leave the browser open for the next demonstration.
Results:
You created a crosstab report, and then applied the filter function on the edge
expressions. You also applied the relational style detail filter to the same
report. You identified the result sets and the performance characteristics in
each scenario.

© Copyright IBM Corp. 2007, 2016 4-35


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 4 Focus your dimensional data

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

Focus your dimensional data © Copyright IBM Corporation 2016

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.

© Copyright IBM Corp. 2007, 2016 4-36


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 4 Focus your dimensional data

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

Focus your dimensional data © Copyright IBM Corporation 2016

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.

© Copyright IBM Corp. 2007, 2016 4-37


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 4 Focus your dimensional data

Demonstration 4
Filter dimensional data using slicers

Focus your dimensional data © Copyright IBM Corporation 2016

Demonstration 4: Filter dimensional data using slicers

© Copyright IBM Corp. 2007, 2016 4-38


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 4 Focus your dimensional data

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

3. Run the report in HTML.


A section of the report appears as follows:

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.

© Copyright IBM Corp. 2007, 2016 4-39


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 4 Focus your dimensional data

4. Close the rendered report tab.

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.

© Copyright IBM Corp. 2007, 2016 4-40


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 4 Focus your dimensional data

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.

© Copyright IBM Corp. 2007, 2016 4-41


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 4 Focus your dimensional data

Prompt for dimensional data


Prompt
Style Syntax Where to use syntax
Returned
Relational [data item] = ?p? single select detail and summary
filter expressions only
Relational [data item] in ?p? multiselect detail and summary
filter expressions only
Dimensional [level or hierarchy]-> ?p? single select edge and slicer
expressions
Dimensional set ([level or hierarchy]-> ?p?) multiselect edge and slicer
expressions

Note: “p” represents the parameter name

Focus your dimensional data © Copyright IBM Corporation 2016

Prompt for dimensional data


You can add prompts to assist users in filtering dimensional data.
You can add prompt pages to a report. Each prompt page can contain one or more
prompt controls, such as a value prompt or a date prompt. You can configure the
prompt appearance and behavior by setting their properties.
In the case of SAP BW, if variables are defined in the BEx query, IBM Cognos Analytics
will automatically generate the appropriate prompt type for the SAP BW variable.
SAP BW variables can be included on a prompt page if you use generated prompts.
As an example of changing a prompt control behavior, you can configure a value
prompt as a drop-down list or a radio button group.

© Copyright IBM Corp. 2007, 2016 4-42


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 4 Focus your dimensional data

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

Focus your dimensional data © Copyright IBM Corporation 2016

Unit summary

© Copyright IBM Corp. 2007, 2016 4-43


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 4 Focus your dimensional data

Exercise 1
Create a set using a prompt and the
except() function

Focus your dimensional data © Copyright IBM Corporation 2016

Exercise 1: Create a set using a prompt and the except() function

© Copyright IBM Corp. 2007, 2016 4-44


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 4 Focus your dimensional data

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.

© Copyright IBM Corp. 2007, 2016 4-45


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 4 Focus your dimensional data

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:

© Copyright IBM Corp. 2007, 2016 4-46


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 4 Focus your dimensional data

• Run the report in HTML.


The prompt appears 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.

• Close the rendered report tab.


Task 2. Modify the prompt to include the except function.
Next, you will modify the prompt so that the report displays returns for all product types
except the ones selected in the prompt.
• In the report layout, click <Selected Product Types>, and then click the ellipsis
and click Edit Set.
• In the Set Definition dialog box, right-click Set expression, click Edit, and then
create and validate the following expression:
except ([sales_and_marketing].[Products].[Products].[Product type],
set ([sales_and_marketing].[Products].[Products].[Product type]->?pt?))
The except function returns all members of the first set expression that are not
in the second set expression. In this case, the second set expression uses a
prompt to fulfill the expression.
• Close the dialog boxes.
• Run report as HTML.

© Copyright IBM Corp. 2007, 2016 4-47


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 4 Focus your dimensional data

• 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:

• Close the rendered report tab.


• Sign out Frank Bretton.
• Close the Web browser.

© Copyright IBM Corp. 2007, 2016 4-48


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Calculations and dimensional functions

Calculations and dimensional


functions

IBM Cognos Analytics 11.0

© Copyright IBM Corporation 2016


Course materials may not be reproduced in whole or in part without the written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 5 Calculations and dimensional functions

© Copyright IBM Corp. 2007, 2016 5-2


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 5 Calculations and dimensional functions

Unit objectives
• Use IBM Cognos Analytics dimensional functions to create sets and
tuples
• Perform arithmetic operations in OLAP queries
• Identify coercion errors and rules

Calculations and dimensional functions © Copyright IBM Corporation 2016

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

© Copyright IBM Corp. 2007, 2016 5-3


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 5 Calculations and dimensional functions

IBM Cognos Analytics dimensional functions


• There are many dimensional functions available which can be loosely
categorized as:
 Family functions
− children, descendants, ancestor, parent
 Top and bottom functions
− topCount, bottomCount, topPercent, bottomPercent
 Filter functions
− filter, except
 Intersection functions
− tuple, completeTuple
 Member and summary functions
− aggregate, total
 Set functions
− set, head, tail

Calculations and dimensional functions © Copyright IBM Corporation 2016

IBM Cognos Analytics dimensional functions


The function category depends on the scenario in which it is applied. For example, the
topCount function could be considered a type of filter function because it returns what is
desired based on the defined parameters only.
Many of the functions listed above are available in the set definition.
The functions mentioned above that are explained in this unit are: total, aggregate.
In addition, other functions mentioned above that are referenced in demonstrations in
this unit (but explained in more detail in other units of this course) are: children,
topCount, except, set, tuple, bottomPercent.
For more information on these and other dimensional functions, there is a document
titled "IBM Cognos BI Dimensional Functions" available from IBM developerWorks:
Information Management: Technical library view
The categories described in this slide are subjective and may be described differently
by different subject matter experts.

© Copyright IBM Corp. 2007, 2016 5-4


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 5 Calculations and dimensional functions

Explore available components

Calculations and dimensional functions © Copyright IBM Corporation 2016

Explore available components


The expression editor shows the expression components that are supported by the
data source in which the metadata is stored.
Not all data sources support functions the same way. The data modeler can set a
quality of service indicator on functions to give a visual clue about the behavior of the
functions. Report authors can use the quality of service indicators to determine which
functions to use in a report.
The data modeler can set a quality of service indicator for relational and DMR models
(not packages that use cubes).

© Copyright IBM Corp. 2007, 2016 5-5


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 5 Calculations and dimensional functions

The quality of service indicators are:


• not available (X): This function is not available for any data source in the
package.
• limited availability (!!): The function is not available for some data sources in the
package.
• poor performance (!):The function is available for all data sources in the package
but is not naturally supported for that data source. IBM Cognos uses a local
approximation for that function. Because an approximation is used, performance
can be poor and the results may not be what you expect.
• unconstrained (no symbol): The function is available for all data sources.
• If you import metadata from an Oracle data source, the expression editor shows
only the elements that are supported in Oracle.

© Copyright IBM Corp. 2007, 2016 5-6


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 5 Calculations and dimensional functions

Reusing, prompting, and combining in dimensional


expressions

topCount (set ([sales_and_marketing].[Retailers].


[Retailers].[Retailer country]->?RetailerCountry?),3,
tuple ([Selected Year],[Planned revenue]))

Calculations and dimensional functions © Copyright IBM Corporation 2016

Reusing, prompting, and combining in dimensional expressions


Use techniques such as prompting, combining, and the reuse of existing expressions to
create more complex expressions.
This example expression in the diagram includes:
• reuse of the [Selected Year] calculation, which is defined by the expression:
[sales_and_marketing].[Time].[Time].[Year]->?Year?
• set ([sales_and_marketing].[Retailers].[Retailers].[Retailer country]-
>?RetailerCountry?) prompt syntax, which at run time will provide a value the first
argument in the topCount function
• tuple, which returns a value for the last argument of the topCount function

© Copyright IBM Corp. 2007, 2016 5-7


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 5 Calculations and dimensional functions

The total() and aggregate() functions

Revenue 2012 Time

Products 1,495,891,101 4,686,775,769


Camping Equipment 500,382,423 1,589,036,664
Personal Accessories 161,039,823 409,660,133
Outdoor Protection 594,009,408 1,885,673,308
Golf Equipment 10,349,176 75,994,296
Mountaineering Equipment 230,110,271 726,411,368
Total 2,991,782,202 9,373,551,538
Summary 1,495,891,101 4,686,775,769

Calculations and dimensional functions © Copyright IBM Corporation 2016

The total() and aggregate() functions


The total and aggregate functions are summary functions that return value calculations
based on a set of members.
The total function calculates either the total for the currentMeasure or a value defined
by the expression argument. The same applies for the aggregate function, except that
this function aggregates according to the rollup rules defined in the data source. As
stated earlier in the course, the Automatic Summary option in IBM Cognos Analytics
uses this aggregate function.
You should use the aggregate function rather than the total function, to take advantage
of the default settings defined in your model.

© Copyright IBM Corp. 2007, 2016 5-8


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 5 Calculations and dimensional functions

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.

© Copyright IBM Corp. 2007, 2016 5-9


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 5 Calculations and dimensional functions

Aggregate values in crosstabs


Quantity
Camping Equipment Cooking Gear 13400351
Lanterns 4826755
Packs 2756540
Sleeping Bags 3153218
Tents 3164285
Golf Equipment Golf Accessories 3119747
Irons 391445
Putters 1284570
Woods 317939
Outdoor Protection First Aid 829354
Insect Repellents 5800964
Sunscreen 5384127
Personal Accessories Binoculars 1075087
Eyewear 20311396
Knives 7229314
Navigation 1992713
Watches 4299195
Mountaineering Equipment Climbing Accessories 5850251
Rope 418560
Safety 1135194
Tools 2496086
Average(Product line) - within set 17847418
Average(Product line) - within detail 4249385
Average(Product line) - within aggregate 4040007

Calculations and dimensional functions © Copyright IBM Corporation 2016

Aggregate values in crosstabs


In crosstabs, aggregated values are calculated using one of the following aggregate
expressions:
• aggregate ([measure] within set [data item]): aggregates the member values from
the data source within the current content
• aggregate ([measure] within detail [data item]): aggregates the lowest level of details
in the report
• aggregate ([measure] within aggregate [data item]): aggregates each level of details
in the report
You decide which aggregate expression is used by setting the aggregation mode.
In the example:
• within set: This summary is the average of the product type values rolled up into
sets at the product line level.
• within detail: This summary is the average of the detail values in the crosstab.
• within aggregate: For each product line, the average of the detail values is
calculated; this summary is the average of the product type averages.

© Copyright IBM Corp. 2007, 2016 5-10


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 5 Calculations and dimensional functions

Showing excluded member totals


• Some reports display limited sets, such as reports that return the top or
bottom count
• Consumers may want to see the totals for members not included in the
limited set
• To accomplish this, authors can use the following expression:

aggregate (currentMeasure within set except([Product line],[Top Two Product Lines]))

The except function reduces the product


line set by filtering out the top products

Calculations and dimensional functions © Copyright IBM Corporation 2016

Show excluded member totals


The expression above aggregates the totals of all product line members with the
exception of the top product line members. By doing this you return the totals for all
product members not shown in the report.
With large data sets, this expression may perform slowly. If performance becomes an
issue and these values are required in your report, you can instead use the following
calculation: aggregate (currentMeasure within set [Product line]) -
aggregate(currentMeasure within set [Top Products]). This expression accomplishes
the same result by taking the totals from the top products and subtracting them from the
totals of all products.

© Copyright IBM Corp. 2007, 2016 5-11


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 5 Calculations and dimensional functions

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.

© Copyright IBM Corp. 2007, 2016 5-12


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 5 Calculations and dimensional functions

Demonstration 1
Show totals and exclude members

Calculations and dimensional functions © Copyright IBM Corporation 2016

Demonstration 1: Show totals and exclude members

© Copyright IBM Corp. 2007, 2016 5-13


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 5 Calculations and dimensional functions

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.

© Copyright IBM Corp. 2007, 2016 5-14


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 5 Calculations and dimensional functions

7. In the Available members and measures pane, expand Measures, click


Revenue, click the right arrow to add it to the Intersection members and
measures pane, and then click OK to close the Members dialog box.
The Top or Bottom dialog box indicates that you want a top two count of items
based on the tuple (Revenue).
8. Click OK to close the Top or bottom dialog box.
The Set definition dialog box indicates that for the set expression, there is a top
two count applied.
9. Click OK to close the Set definition dialog box.
You will rename the Product line set definition to clearly identify the content in
this customized set.
10. In the top menu click Show properties.
11. In the Properties pane, under the DATA ITEM section, change the Name
property to Top Two Product Lines, and then press Enter.
12. Run the report in HTML.
The results appear as follows:

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.

© Copyright IBM Corp. 2007, 2016 5-15


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 5 Calculations and dimensional functions

4. Run the report in HTML.


The results appear as follows:

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.

© Copyright IBM Corp. 2007, 2016 5-16


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 5 Calculations and dimensional functions

7. Run the report in HTML.


The results appear as follows:

8. Close the rendered report tab.


Task 4. Add and label the totals for all products.
1. From the Data pane, expand Products dimension > Products hierarchy >
Members folder, and then drag the Products member to the rows under
Excluded as a peer.
Remember, Products is the root member for the Products hierarchy and will
show the totals for all products.
The results appear as follows:

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.

© Copyright IBM Corp. 2007, 2016 5-17


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 5 Calculations and dimensional functions

8. In the Properties pane, under MISCELLANEOUS, click the Classes property,


and then click the ellipsis.
9. In the Global classes pane, double-click Crosstab fact cell (outer total, not
nested) to add it to the Selected classes pane, and then click OK.
10. Run the report in HTML.
The results appear as follows:

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.

© Copyright IBM Corp. 2007, 2016 5-18


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 5 Calculations and dimensional functions

Performing arithmetic operations

• Perform simple arithmetic operations in OLAP queries, such as +, -, *,


and /
• Use these operators with members from the same hierarchy
Camping Equipment Mountaineering Camping Equipment +
Equipment Mountaineering Equipment
89,713,990.92 20,891,350.60 110,605,341.52

• Apply arithmetic operators to measures


[Revenue]/tuple ([Revenue],[Products])

Calculations and dimensional functions © Copyright IBM Corporation 2016

Perform arithmetic operations


The report above uses the following calculation for the last column:
• [Camping Equipment]+[Mountaineering Equipment]
• The Camping Equipment and Mountaineering Equipment members are summed,
which causes their corresponding values to be summed to provide a total value.
The expression [Revenue]/tuple ([Revenue],[Products]) takes revenue for all time and
divides it by the intersection values of Revenue for all time and all Products (the root
member for the Products hierarchy). This expression can be used to show the
percentage that particular members contributed to the overall revenue total, in other
words, a percent of base calculation.
Aggregate functions are often preferable to using simple arithmetic operators between
members of a single hierarchy.

© Copyright IBM Corp. 2007, 2016 5-19


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 5 Calculations and dimensional functions

Demonstration 2
Create a percent of base calculation

Calculations and dimensional functions © Copyright IBM Corporation 2016

Demonstration 2: Create a percent of base calculation

© Copyright IBM Corp. 2007, 2016 5-20


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 5 Calculations and dimensional functions

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

© Copyright IBM Corp. 2007, 2016 5-21


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 5 Calculations and dimensional functions

4. Click OK to close the Calculated measure expression dialog box.


If the report is run now, the Revenue measure values will not appear because a
new calculation has taken the place of Revenue in the report layout. You will
add it back into the report layout.
5. In the Data pane, click the Data Items tab, and drag Revenue to the columns,
to the left of % of Base as a peer.
You will format the values returned by the % of Base calculation.
6. In the layout report, click % of Base under <#Year#>, click the ellipsis on the
toolbar, and then click Select Member Fact Cells.
7. In the Properties pane, under DATA, click the Data format property, and then
click the ellipsis.
8. In the Format type list, click Percent, and then click OK.
9. Run the report as HTML.
The results appear as follows:

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

© Copyright IBM Corp. 2007, 2016 5-22


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 5 Calculations and dimensional functions

3. Click OK to close the Calculated measure expression dialog box.


4. From the Data Items tab, drag % of Base to the columns under <#Time#> to
nest as a child.
When placing a calculation in another location in the layout, it automatically
picks up the context of that location in the report at run time.
5. From the Data Items tab, drag Revenue under <#Time#> and to the left of
<#% of Base#> as a peer.
The results appear as follows:

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.

© Copyright IBM Corp. 2007, 2016 5-23


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 5 Calculations and dimensional functions

Sorting dimensional data


Sort by Label
Unsorted Sort by Label - Ascending Sort by Label - Descending

Camping Equipment Camping Equipment Personal Accessories


Golf Equipment Golf Equipment Outdoor Protection
Outdoor Protection Mountaineering Equipment Mountaineering Equipment
Personal Accessories Outdoor Protection Golf Equipment
Mountaineering Equipment Personal Accessories Camping Equipment

Sort by Value
Sort by Value - Ascending Sort by Value - Descending

Revenue 2011 Revenue 2011


Star Peg 1,324,840.70 Star Lite 52,517,671.08
Tents Star Dome 28,721,600.42 Tents Star Dome 28,721,600.42
Star Lite 52,517,671.08 Star Peg 1,324,840.70
Husky Rope 60 5,635.713.50 Husky Rope 100 17,671,847.80
Rope Husky Rope 50 8,887,288.00 Rope Husky Rope 50 8,887,288.00
Husky Rope 100 17,671,847.80 Husky Rope 60 5,635.713.50

Calculations and dimensional functions © Copyright IBM Corporation 2016

Sorting dimensional data


By default, IBM Cognos Analytics retrieves items in the order defined in the data
source.
With dimensional data, you can sort a set of members based on their label or caption,
or by value of a member or measure you select. By default, when you select Sort by
Label - Ascending or Descending, sets are sorted based on captions.
Before you can perform set sorting, you must create sets for the members in your
report. For example, a set contains product lines, and you sort the product lines within
the set in descending alphabetical order.
If you use dimensional data, you can sort members in the sets on the opposite axis
based on the value of a member or measure that you select.
This type of sorting is performed in the query.
You cannot sort data items from different dimensions that are intermixed. For example,
you cannot sort on Data_Item1_Dimension1, Data_Item1_Dimension2, and
Data_Item2_Dimension1.
Also, you cannot apply set sorting and layout sorting at the same time. Sorting applied
to an item will overwrite any previous sorting that was applied.

© Copyright IBM Corp. 2007, 2016 5-24


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 5 Calculations and dimensional functions

Ranking dimensional data

rank (numeric_expression [ASC|DESC] [tuple member_expression


{ , member_expression }] within set set_expression)

Revenue Quantity Sold


Revenue Revenue Quantity
Ranking Ranking
Personal Accessories 1,885,673,307.78 1 34,907,705 1
Camping Equipment 1,589,036,664.03 2 27,301,149 2
Golf Equipment 726,411,367.89 3 5,113,701 5
Mountaineering Equipment 409,660,132.90 4 9,900,091 4
Outdoor Protection 75,994,296.25 5 12,014,445 3

Calculations and dimensional functions © Copyright IBM Corporation 2016

Ranking dimensional data


Use the rank function to determine the relative position of each member of the specified
set based on the value of the numeric expression. The option ASC or DESC (default)
assigns rank 1 to the member with the lowest or highest value.
In the example above, the Revenue Ranking column used the expression:
rank ([Revenue]). The Quantity Sold Ranking column used the expression:
rank ([Quantity]). The option of ASC or DESC was not declared, therefore, the default
DESC was applied to the results.
In the diagram, we can see that Golf Equipment ranked third in revenue, but ranked fifth
for quantity of items sold.
If two or more rows have the same ranking, then there is a gap in the sequence of
ranked values (also known as Olympic ranking).
The For option defines the scope of the function. The At option defines the level of
aggregation and can only be used in the context of relational data sources. Null values
are ranked last.
Additional Information: Rank can cause performance issues when you have a large set
of members returned from an OLAP data source. Rank can only be processed locally
when you access an OLAP data source.

© Copyright IBM Corp. 2007, 2016 5-25


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 5 Calculations and dimensional functions

Demonstration 3
Nest dimensional functions to create a dynamic bottomPercent report

Calculations and dimensional functions © Copyright IBM Corporation 2016

Demonstration 3: Nest dimensional functions to create a dynamic bottomPercent report

© Copyright IBM Corp. 2007, 2016 5-26


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 5 Calculations and dimensional functions

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

© Copyright IBM Corp. 2007, 2016 5-27


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 5 Calculations and dimensional functions

7. Click OK to close the Prompt dialog box.


8. Click OK to close the Data item expression dialog box.
9. From the Toolbox tab, drag a Query calculation object to the report layout, to
the right of Selected Year.
10. In the Create calculation dialog box, click Set expression, and then, from the
Hierarchy list, click the Retailers hierarchy and then click OK.
11. In the Set expression dialog box, in the Name field type Selected Countries,
and then create and validate the following expression:
set ([sales_and_marketing].[Retailers].[Retailers].[Retailer country]->?C?)
Hints:
• Available Components pane > Source tab: Retailers dimension > Retailers
hierarchy > Retailer country level
• Validate using Australia
If you do not select a hierarchy, an error will be displayed.
12. Click OK to close the Prompt dialog box.
13. Click OK to close the Set expression dialog box.
14. In the report layout, click Selected Countries, and then click Cut.
You do not want this in your report layout at this time, but you want it to remain
in the query.
15. From the Toolbox tab, drag a Query calculation object to the report layout, to
the right of Selected Year.
16. In the Create calculation dialog box, click Set expression, and then click OK.
17. In the Set expression dialog box, in the Name field type Bottom 20% Planned
Revenue, and then create and validate the following expression:
bottomPercent ([Selected Countries], 20, tuple ([Selected Year],[Planned
revenue]))
Within this expression, you have combined functions, reused items, and
included prompts.
Hints:
• Available Components pane > Data Items tab: Selected Countries
• Available Components pane > Data Items tab: Selected Year
• Available Components pane > Source tab: Measures dimension > Planned
revenue measure
18. Click OK to close the Set expression dialog box.

© Copyright IBM Corp. 2007, 2016 5-28


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 5 Calculations and dimensional functions

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.

© Copyright IBM Corp. 2007, 2016 5-29


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 5 Calculations and dimensional functions

Task 2. Aggregate the Revenue column.


1. In the report layout, click the Revenue column.
2. On the toolbar, click Summarize, click Default summary, and then run the
report in HTML.
3. In the Retailer country list, click Brazil, and then Ctrl+click Canada, Mexico,
and United States.
4. In the Year list, click 2012, and then click OK.
The results appear as follows:

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.

© Copyright IBM Corp. 2007, 2016 5-30


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 5 Calculations and dimensional functions

Task 4. Investigate the bottomPercent function.


1. From the Toolbox pane, drag a List object under the block in the report layout.
2. In the Object and query name dialog box, under Query Name select Query 1
from the list, and then click OK.
This will allow you to use items from Query1 in this list.
3. From the Data pane, drag the Planned revenue data item to the list report.
4. Click <Planned revenue>, on the toolbar, click Summarize, and then in the list,
click Total.
5. With <Planned revenue> selected, on the toolbar click Sort, and then in the
list, click Ascending.
6. From the Data items tab, drag Selected Countries to the left of the Planned
revenue column.
This will reuse the query values supplied by the prompt in the first list report.
7. In the Data pane, from the Data items tab, drag Selected Year to the left of
Selected Countries.
To be aware of what is happening during the bottomPercent calculation, you will
include two columns to display the % of Total Planned Revenue, and a running
total of these values.
8. From the Toolbox pane, drag a Query calculation object to the report layout,
to the right of the Planned revenue column.
9. In the Create calculation dialog box, click Calculated measure, and then click
OK.
10. In the Calculated measure expression dialog box, in the Name field type % of
Total Planned Revenue, and then create and validate the following expression:
[Planned revenue]/ aggregate ([Planned revenue] within set [Selected
Countries])
Hints:
• Available Components pane > Data Items tab: Planned revenue
• Available Components pane > Data Items tab: Selected Countries
11. Click OK to close the Calculated measure expression dialog box.
12. Click the <% of Total Planned Revenue> list column body, in the Properties
pane, under DATA, click the Data format property, click the ellipsis, in the
Format type list, click Percent, and then click OK.
13. With <% of Total Planned Revenue> selected, in the Properties pane, under
FONT & TEXT, change the Horizontal alignment to be Right.
14. On the toolbar, click Summarize, and then click Total.

© Copyright IBM Corp. 2007, 2016 5-31


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 5 Calculations and dimensional functions

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.

© Copyright IBM Corp. 2007, 2016 5-32


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 5 Calculations and dimensional functions

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.

© Copyright IBM Corp. 2007, 2016 5-33


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 5 Calculations and dimensional functions

Support for multiple hierarchies per dimension


• Supported for PowerCubes and DMR

Revenue Current Month Last Month Variance

Camping Equipment 53,939,284.40 48,024,982.91 5,914,301.49


Personal Accessories 65,031,507.03 70,842,142.54 -5,810,635.51
Outdoor Protection 706,920.16 612,309.66 94,610.50
Golf Equipment 25,129,748.14 22,859,849.97 2,269,898.17
Mountaineering Equipment 21,634,522.83 19,656,444.46 1,978,078.37

Variance calculation based on two members from different


hierarchies in the same dimension

Calculations and dimensional functions © Copyright IBM Corporation 2016

Support for multiple hierarchies per dimension


You can reference multiple hierarchies from the same dimension in one query. For
example, you can place members from one hierarchy on one edge of a crosstab, and
members from another hierarchy from the same dimension on the other edge of the
crosstab.
With respect to the time dimension from a PowerCube, you can create calculations
based on members from different hierarchies of the time dimension. As seen in the
slide example, you can subtract the Last Month member from the Current Month
member to see the variance between the two.

© Copyright IBM Corp. 2007, 2016 5-34


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 5 Calculations and dimensional functions

Demonstration 4
Create a variance calculation with members from different hierarchies of
the same dimension

Calculations and dimensional functions © Copyright IBM Corporation 2016

Demonstration 4: Create a variance calculation with members from different hierarchies of


the same dimension

© Copyright IBM Corp. 2007, 2016 5-35


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 5 Calculations and dimensional functions

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

© Copyright IBM Corp. 2007, 2016 5-36


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 5 Calculations and dimensional functions

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:

7. Run the report in HTML.


The results appear 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.

© Copyright IBM Corp. 2007, 2016 5-37


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 5 Calculations and dimensional functions

Common errors in expressions


• A common authoring error is to provide a dimensional function with the
wrong parameter type

currentMember ([sales_and_marketing].[Products].[Products].[Products])

Calculations and dimensional functions © Copyright IBM Corporation 2016

Common errors in expressions


When constructing the syntax for dimensional functions, authors will often provide the
wrong parameter type for satisfying the arguments of a function. An example is
inserting a level when a hierarchy is required, or inserting a hierarchy when a member
is required.
As a best practice, you should validate each new function added to check for errors.
Otherwise, it may be difficult to locate the error later.
The common error we are showing in the slide is an example of breaking a coercion
rule. The author supplied a level as the parameter for the currentMember function,
when a hierarchy is required.

© Copyright IBM Corp. 2007, 2016 5-38


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 5 Calculations and dimensional functions

What is coercion?

level member set


numeric measure numeric value

Expression:
bottomCount ( set_expression , index_expression , numeric_expression )

a set is expected

bottomCount (set ([Camping Equipment],[Personal Accessories],[Outdoor Protection], [Golf


Equipment],[Mountaineering Equipment]), 3, tuple ([2012],[Quantity]))

instead, a level can be used, following coercion rules


bottomCount ([sales_and_marketing].[Products].[Products].[Product line], tuple ([2012],[Quantity]))

Calculations and dimensional functions © Copyright IBM Corporation 2016

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

© Copyright IBM Corp. 2007, 2016 5-39


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 5 Calculations and dimensional functions

Unit summary
• Use IBM Cognos Analytics dimensional functions to create sets and
tuples
• Perform arithmetic operations in OLAP queries
• Identify coercion errors and rules

Calculations and dimensional functions © Copyright IBM Corporation 2016

Unit summary

© Copyright IBM Corp. 2007, 2016 5-40


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Functions for navigating dimensional hierarchies

Functions for navigating


dimensional hierarchies

IBM Cognos Analytics 11.0

© Copyright IBM Corporation 2016


Course materials may not be reproduced in whole or in part without the written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 6 Functions for navigating dimensional hierarchies

© Copyright IBM Corp. 2007, 2016 6-2


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 6 Functions for navigating dimensional hierarchies

Unit objectives
• Navigate dimensional data using family functions

Functions for navigating dimensional hierarchies © Copyright IBM Corporation 2016

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

© Copyright IBM Corp. 2007, 2016 6-3


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 6 Functions for navigating dimensional hierarchies

Using family functions to navigate data

Time
FirstChild Parent
2011 2012 Q4
2011 2012

2011 2011 2011 2011 2012 2012 2012 2012


Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4

2011/Jan 20115/Feb 2011/Mar 2011/Oct 2011/Nov 2011/Dec


FirstSibling
2012 Q 4
Cousins Ancestor
2011/Jan, 2005 Q 4 2011/Dec
3 levels up

Functions for navigating dimensional hierarchies © Copyright IBM Corporation 2016

Use family functions to navigate data


These types of functions let you navigate the structure vertically as well as horizontally.

© Copyright IBM Corp. 2007, 2016 6-4


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 6 Functions for navigating dimensional hierarchies

Return child members

children(member)

Camping Equipment
Mountaineering Equipment

children([Products]) Personal Accessories


Outdoor Protection
Golf Equipment

Functions for navigating dimensional hierarchies © Copyright IBM Corporation 2016

Return child members


This function returns the set of child members of a specified member.

© Copyright IBM Corp. 2007, 2016 6-5


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 6 Functions for navigating dimensional hierarchies

Return parent member

parent(member)

parent([Eyewear]) Personal Accessories

Functions for navigating dimensional hierarchies © Copyright IBM Corporation 2016

Return parent member


This function returns the parent member of a specified member.
Most OLAP data sources only provide one parent member.

© Copyright IBM Corp. 2007, 2016 6-6


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 6 Functions for navigating dimensional hierarchies

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

[Products].[Product TrailChef Utensils

line],3,before) Tents
Star Lite
Star Dome
Star Gazer 2
Star Gazer 3
Star Gazer 6
Star Peg
Sleeping Bags

Functions for navigating dimensional hierarchies © Copyright IBM Corporation 2016

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.

© Copyright IBM Corp. 2007, 2016 6-7


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 6 Functions for navigating dimensional hierarchies

Demonstration 1
Create a crosstab report and show descendants of the Products
hierarchy

Functions for navigating dimensional hierarchies © Copyright IBM Corporation 2016

Demonstration 1: Create a crosstab report and show descendants of the Products


hierarchy

© Copyright IBM Corp. 2007, 2016 6-8


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 6 Functions for navigating dimensional hierarchies

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

© Copyright IBM Corp. 2007, 2016 6-9


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 6 Functions for navigating dimensional hierarchies

6. Click OK to close the Set expression dialog box.


7. Run the report in HTML.
A section of the report appears as follows:

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:

The report shows members from the Product line level.


6. Close the rendered report tab.
Task 3. Show multiple intermediate levels.
1. In the layout report, click <Descendants of Products>, click the toolbar
ellipsis, and then click Edit Set.

© Copyright IBM Corp. 2007, 2016 6-10


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 6 Functions for navigating dimensional hierarchies

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)

© Copyright IBM Corp. 2007, 2016 6-11


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 6 Functions for navigating dimensional hierarchies

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.

© Copyright IBM Corp. 2007, 2016 6-12


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 6 Functions for navigating dimensional hierarchies

Return ancestor members

Ancestor
ancestor (member, level|integer) 2012/Dec
Year level
2012

2012 2012 2012 2012


Q1 Q2 Q3 Q4

2012/Jan 2012/Feb 2012/Mar 2012/Oct 2012/Nov 2012/Dec

Functions for navigating dimensional hierarchies © Copyright IBM Corporation 2016

Return ancestor members


With the ancestor function you can return the ancestor member from any level above
the specified member.
In this function syntax:
• member is the source member
• level indicates from which level to retrieve the ancestor
• integer is an alternative to specifying an explicit level (you can indicate how many
levels to go above the specified member)
For example, ancestor ([2012/Dec],[sales_and_marketing].[Time].[Time].[Year]) would
return [2012]. You could also use ancestor ([2012/Dec],2) to obtain the same result.
The ancestor function is useful in many scenarios. For example, with a staff dimension,
you can use the ancestor function to quickly identify which Vice President a sales
representative works for by bypassing the manager and director levels. The same
applies for a product dimension in which you may want to know which product line a
product belongs to by bypassing the product type level.

© Copyright IBM Corp. 2007, 2016 6-13


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 6 Functions for navigating dimensional hierarchies

Return cousin members

cousin(member1, member2)

2012
member2

2012 2012 2012 2012


Q1 Q2 Q3 Q4

2012/Jan 2012/Feb 2012/Mar 2012/Oct 2012/Nov 2012/Dec

member1 result

Functions for navigating dimensional hierarchies © Copyright IBM Corporation 2016

Return cousin members


In this function syntax, member1 is the source member, and member2 is the ancestor
of the cousin you wish to retrieve.
For example, cousin ([2012/Jan],[2012 Q 4]) will return [2012/Oct].
• The cousin function returns a member that is in the same relative position under a
specified ancestor as the source member is under its ancestor.
• member2 could be at any logical level above member1. For example, the cousin
of Jan 2012 for the member 2011 would return Jan 2011.
Another way to explain the cousin function: finds the child of member2 with the same
position of member1 under its parent.
Practical applications for the cousin function include finding relative periods in a time
dimension or relative people or items in an organizational structure. For example, you
may use the cousin function to find out who reports to a director in another part of the
organization relative to another person's position. The cousin function can be used in
combination with other functions. For example, you may want to find out the total
revenue for the same relative month in another quarter. You could write the following
calculation to find the total revenue for the first month of 2012 Q 4:
aggregate ([Revenue] within set cousin ([2012/Jan],[2012 Q 4]))20122012.

© Copyright IBM Corp. 2007, 2016 6-14


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 6 Functions for navigating dimensional hierarchies

Unit summary
• Navigate dimensional data using family functions

Functions for navigating dimensional hierarchies © Copyright IBM Corporation 2016

Unit summary

© Copyright IBM Corp. 2007, 2016 6-15


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 6 Functions for navigating dimensional hierarchies

Exercise 1
Determine the product line for a product, using the ancestor() function

Functions for navigating dimensional hierarchies © Copyright IBM Corporation 2016

Exercise 1: Determine the product line for a product, using the ancestor() function

© Copyright IBM Corp. 2007, 2016 6-16


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 6 Functions for navigating dimensional hierarchies

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.

© Copyright IBM Corp. 2007, 2016 6-17


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 6 Functions for navigating dimensional hierarchies

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:

© Copyright IBM Corp. 2007, 2016 6-18


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 6 Functions for navigating dimensional hierarchies

• 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.

© Copyright IBM Corp. 2007, 2016 6-19


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 6 Functions for navigating dimensional hierarchies

Exercise 2
Create a dynamic crosstab
report with combined
dimensional functions

Functions for navigating dimensional hierarchies © Copyright IBM Corporation 2016

Exercise 2: Create a dynamic crosstab report with combined dimensional functions

© Copyright IBM Corp. 2007, 2016 6-20


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 6 Functions for navigating dimensional hierarchies

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.

© Copyright IBM Corp. 2007, 2016 6-21


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 6 Functions for navigating dimensional hierarchies

• 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.

© Copyright IBM Corp. 2007, 2016 6-22


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 6 Functions for navigating dimensional hierarchies

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.

© Copyright IBM Corp. 2007, 2016 6-23


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 6 Functions for navigating dimensional hierarchies

• Toolbar: Run the report in HTML.


A section of the report appears as follows:

• Close the rendered report tab.


Task 2. Add a prompt for Order Method.
• Toolbox tab: Drag a Query calculation object to the Columns drop zone, as a
Set expression, using the Order method hierarchy.
• Set expression dialog box: Name the set expression Selected Order Method,
and then create and validate the following expression:
[sales_and_marketing].[Order method].[Order method].[Order method
type]->?Order Method?
• Validate using Web as the Order method type.
• Navigate pane: click Prompt pages.
• Toolbox pane: drag a Page object to the Prompt pages pane.
• Prompt Pages pane: double-click Prompt Page1.
• Toolbox pane: Under PROMPTING, drag a Value Prompt object to the prompt
page of the report.
• Prompt Wizard: Click Use existing parameter, select Order Method, and click
Next, and then click Finish.
• Run the report in HTML.

© Copyright IBM Corp. 2007, 2016 6-24


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 6 Functions for navigating dimensional hierarchies

• Prompt: Click Web, and then click Finish.


A section of the report appears as follows:

• Close the rendered report tab.


Task 3. Add a prompt for Quarter.
• Toolbox pane: Drag a Value prompt object to the prompt page to the right of the
existing Value prompt control.
• Prompt Wizard: In the Create a new parameter field, type Quarter, and then
click Next.
• Ensure the Create a parameterized filter check box is selected, and then to the
right of the Package item box, click the ellipsis.
• Choose Package Item dialog box: Expand the Time dimension > Time
hierarchy, click the Quarter level, and then click OK.
• Click Next, accept the default selection, click Next, accept the default
selections, and then click Finish.

© Copyright IBM Corp. 2007, 2016 6-25


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 6 Functions for navigating dimensional hierarchies

• Run the report in HTML.


• 1st Prompt: Click Web.
• 2nd Prompt: Click 2012 Q 4 from the list, and then click Finish.
A section of the report appears as follows:

• Close the rendered report tab.


Task 4. Create an expression that returns the total gross
profit for order methods for each location, except for
the order methods that are chosen in the prompt.
• Navigate pane: click Page1.
• Toolbox pane: Drag a Query calculation object to the columns, to the right of
<Selected Order Method>, as a peer, set as a Calculated member, using the
Order method hierarchy,
• Calculated member expression dialog box: Name the expression All Other
Order Methods, and then create and validate the following expression:
aggregate (currentMeasure within set except ([sales_and_marketing].
[Order method].[Order method].[Order method type],[Selected Order
Method]))
• Validate using 2012 Q 4
The results appear as follows:

© Copyright IBM Corp. 2007, 2016 6-26


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 6 Functions for navigating dimensional hierarchies

• Run the report in HTML.


• 1st Prompt: Click Web.
• 2nd Prompt: From the Quarter list, click 2012 Q 4, and then click Finish.
A section of the report appears as follows:

• Close the rendered report tab.


Task 5. Show the chosen quarter from the second prompt, as
a title on the report (Additional Challenge).
• Report layout: click the header Text Item object (which currently states Double-
click to edit text).
• Properties pane: Change the Source type property to Report expression.
• Report layout: Double-click the header to open the report expression.
• Report expression dialog box: Create and validate the following expression:
ParamDisplayValue('Quarter')

© Copyright IBM Corp. 2007, 2016 6-27


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 6 Functions for navigating dimensional hierarchies

• Run the report in HTML.


• 1st Prompt: Web.
• 2nd Prompt: 2012 Q 4.
The results appear as follows:

• Close the rendered report tab.


• Sign off as Frank Bretton.
• Close the Web browser.

© Copyright IBM Corp. 2007, 2016 6-28


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Relative functions

Relative functions

IBM Cognos Analytics 11.0

© Copyright IBM Corporation 2016


Course materials may not be reproduced in whole or in part without the written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 7 Relative functions

© Copyright IBM Corp. 2007, 2016 7-2


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 7 Relative functions

Unit objectives
• Navigate dimensional data using relative functions
• Navigate dimensional data using relative time functions

Relative functions © Copyright IBM Corporation 2016

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

© Copyright IBM Corp. 2007, 2016 7-3


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 7 Relative functions

Use functions to navigate data


• Reporting authors have access to several functions that allow them to
navigate dimensional structures.
• These functions fall into several categories:
 family (such as parent, children, siblings, cousin)
 relative (such as currentMember, nextMember, prevMember, lag)
 relative time (such as closingPeriod, parallelPeriod, periodsToDate)

Relative functions © Copyright IBM Corporation 2016

Use functions to navigate data

© Copyright IBM Corp. 2007, 2016 7-4


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 7 Relative functions

Dimensional structures (review)

Time dimension
(with Year, Quarter, and Month levels)

Time

2012 2013

2012 2013 2013 2013 2013 2013 2013 2013


Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4

2012/Jan 2012/Feb 2012/Mar 2012/Oct 2012/Nov 2012/Dec

Relative functions © Copyright IBM Corporation 2016

Dimensional structures (review)

© Copyright IBM Corp. 2007, 2016 7-5


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 7 Relative functions

Use relative functions to navigate data

prevMember(member) lag(member, index_expression)


Time
nextMember(member) lead(member, index_expression)

2011 2012

2011 2011 2011 2011 2012 2012 2012 2012


Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4

2011/Jan 2011/Feb 2011/Mar 2011/Oct 2011/Nov 2011/Dec

prevMember nextMember lag lead


2011/Feb 2011/Feb 2012 Q2 one 2012 Q2 two
member backward members forward

Relative functions © Copyright IBM Corporation 2016

Use relative functions to navigate data


These types of functions let you retrieve a member by referring to its horizontal position
relative to another member.
The lag function lets you navigate backwards to relative members. For example:
lag([2013 Q 2],1) returns the member [2013 Q 1].
The lead function also lets you navigate forward to relative members. For example:
lead([2013 Q 2],2) returns the member [2013 Q 4].
Lag and lead functions work horizontally, not vertically. You cannot use these functions
to navigate to ancestors or descendants.
With the lead and lag functions, you can use negative index values that will cause the
functions to have the reverse effect. For example, lead([2013 Q 2], -1) would actually
return [2013 Q 1] the same as the lag function with the syntax lag([2013 Q 2], 1). If the
lag function uses a negative 1, lag([2013 Q 2], -1), then it would actually return
[2013 Q 3].

© Copyright IBM Corp. 2007, 2016 7-6


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 7 Relative functions

Demonstration 1
Use family and relative dimensional functions to focus reports

Relative functions © Copyright IBM Corporation 2016

Demonstration 1: Use family and relative dimensional functions to focus reports

© Copyright IBM Corp. 2007, 2016 7-7


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 7 Relative functions

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.

© Copyright IBM Corp. 2007, 2016 7-8


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 7 Relative functions

6. Run the report in HTML.


A section of the report appears as follows:

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.

© Copyright IBM Corp. 2007, 2016 7-9


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 7 Relative functions

5. Click OK in the Create calculation dialog box.


6. 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]->?Selected Month?
Hints:
• Available Components pane > Source tab: Time dimension > Time hierarchy
> Month level
• Validate using any month in the prompt
7. Click OK to close the Prompt dialog box.
8. Click OK to close the Set expression dialog box.
The results appear as follows:

Task 3. Test the crosstab report.


1. Run the report in HTML.
A generic prompt page appears requiring the selection of a month.
2. Click 2012/Dec, and then click OK.
The results appear as follows:

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.

© Copyright IBM Corp. 2007, 2016 7-10


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 7 Relative functions

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:

Task 5. Create a calculation to show values for the month


from the previous year.
1. From the Toolbox pane, drag a Query calculation object to the right of the
Previous 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 Year, and
then create and validate the following expression:
cousin ([Selected Month], lag (ancestor ([Selected Month],
[sales_and_marketing].[Time].[Time].[Year]),1))
This expression retrieves the cousin of the selected month for the previous year.
To obtain the previous year, use the ancestor function to obtain the current year,
and then use the lag function to go back one year. This could have also been
accomplished by using the prevMember function:
prevMember(ancestor([Selected Month])
Hints:
• Available Components pane > Data Items tab: Selected Month
• Available Components pane > Source tab: Time dimension > Time hierarchy
> Year level

© Copyright IBM Corp. 2007, 2016 7-11


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 7 Relative functions

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:

Task 6. Test the finished crosstab report.


1. Run the report in HTML.
2. In the prompt, click 2012/Dec, and then click OK.
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.

© Copyright IBM Corp. 2007, 2016 7-12


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 7 Relative functions

Use relative time functions to navigate data (overview)

openingPeriod parallelPeriod
Time
month level 2013 Q 4
2012 prior year
2012 2013

2012 2012 2012 2012 2013


2013 2013 2013
Q1 Q2 Q3 Q4 Q3
Q1 Q2 Q4

2012/Jan 2012/Feb 2012/Mar 2012/Oct 2012/Nov 2012/Dec

periodsToDate
2013 Q 3
closingPeriod
month level
2012

Relative functions © Copyright IBM Corporation 2016

Use relative time functions to navigate data (overview)


These types of functions are typically used on time dimensions but are not limited to
them.
Although relative time functions are typically used on time dimensions, they can also be
used on other dimensions. For example, you could use the closingPeriod function to
find the latest product added to a particular product line. The syntax would look similar
to this: closingPeriod([sales_and_marketing].[Products].[Products].[Product],[Eyewear])
In the Sales and Marketing PowerCube, this expression would return Retro, which is
the last Eyewear product added to the data for the Eyewear product line.

© Copyright IBM Corp. 2007, 2016 7-13


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 7 Relative functions

The closingPeriod function

closingPeriod(level [,member])

closingPeriod ([sales_and_marketing].[Time].[Time].[Quarter])

closingPeriod ([sales_and_marketing].[Time].[Time].[Quarter],[2012])

Time

2012 2013

2012 2012 2012 2012 2013 2013 2013 2013


Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4

2012/Jan 2012/Feb 2012/Mar 2012/Oct 2012/Nov 2012/Dec

Relative functions © Copyright IBM Corporation 2016

The closingPeriod function


When you use the closingPeriod function without specifying a member, the function
returns the last member of the specified level for all data. It is not restricted to any
branch in the data structure.
If you specify a member in the closingPeriod function, it returns that level's last member
in that member's data branch.
In the example of syntax shown in the diagram [, member] is optional, and does not
represent a hierarchy.
The closingPeriod ([sales_and_marketing].[Time].[Time].[Quarter],[2012]) expression
specifies the [2012] member, which restricts the member returned to the last member in
the 2012 branch of the data structure.

© Copyright IBM Corp. 2007, 2016 7-14


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 7 Relative functions

The periodsToDate function

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

2012 2012 2012 2012 2013 2013 2013 2013


Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4

2012/Jan 2012/Feb 2012/Mar 2012/Oct 2012/Nov 2012/Dec

Relative functions © Copyright IBM Corporation 2016

The periodsToDate function


The members returned by this function depend on the level specified.
In the example above, if the Year level is specified, then only quarters, including the
specified quarter, for the year the specified quarter belongs to are returned.
If the Time level is used for the level argument, then all quarters in the data prior to and
including the quarter specified are returned.
The Time member in the hierarchy structure has the same name as the level. In the
periodsToDate([sales_and_marketing].[Time].[Time].[Time],[2013 Q 2]) expression, the
Time reference is to the level, not the member.

© Copyright IBM Corp. 2007, 2016 7-15


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 7 Relative functions

Demonstration 2
Use relative time dimensional functions to focus reports

Relative functions © Copyright IBM Corporation 2016

Demonstration 2: Use relative time dimensional functions to focus reports

© Copyright IBM Corp. 2007, 2016 7-16


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 7 Relative functions

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.

© Copyright IBM Corp. 2007, 2016 7-17


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 7 Relative functions

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.

© Copyright IBM Corp. 2007, 2016 7-18


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 7 Relative functions

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.

© Copyright IBM Corp. 2007, 2016 7-19


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 7 Relative functions

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.

© Copyright IBM Corp. 2007, 2016 7-20


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 7 Relative functions

Task 3. Create a chart to show the sales of a retailer over the


quarters.
You will now create a complimentary chart that shows the sales for a retailer for
all quarters in the year, including the latest quarter, 2013 Q 3.
1. From the Toolbox pane, drag a Chart object to the right of the gauge chart on
the report page.
2. In the Chart type pane on the right, click Clustered Column with 3-D
Effects , and then click OK.
You will associate this new chart with Query1 and will reuse some of the
existing query items.
3. On the report layout, click the column chart, and then in the Properties pane,
under DATA, change the Query property to Query1.
4. In the Data pane, click the Data items tab, and populate the column chart,
using the following items from Query1:
• Default measure (y-axis): Revenue
• Series (primary axis): Product line
5. From the Toolbox pane, drag a Query calculation object to the Categories (x-
axis) drop zone.
6. In the Create calculation dialog box, click Set expression, from the hierarchy
list, click the Time hierarchy, and then click OK.
7. 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],
parent ([Latest Month]))
The data source includes all months in 2013, but has data up to July 2013 only;
therefore you will specify this in the expression, so that valid results are
returned.
Hints:
• Available Components pane > Source tab: Time dimension > Time hierarchy
> Year level
• Available Components pane > Data Items tab: Latest Month
You need to add the level above Quarter (which is Year), because the function
requires this level to retrieve its descendants, which are the siblings to the
[Latest Month] member that will be specified in the second parameter.
In order to obtain the latest quarter information, you will use the Latest Month
calculation in conjunction with the parent function.

© Copyright IBM Corp. 2007, 2016 7-21


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 7 Relative functions

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.

© Copyright IBM Corp. 2007, 2016 7-22


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 7 Relative functions

The parallelPeriod function


parallelPeriod(level [, integer_expression [, member] ])
parallelPeriod([sales_and_marketing].[Time].[Time].[Year],1,[2013 Q 4])

Time

2012 2013

2012 2012 2012 2012 2013 2013 2013 2013


Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4

2012/Jan 2012/Feb 2012/Mar 2012/Oct 2012/Nov 2012/Dec

parallelPeriod([sales_and_marketing].[Time].[Time].[Quarter],-3,[2012/Feb])

Relative functions © Copyright IBM Corporation 2016

The parallelPeriod function


The parallelPeriod function can use any logical level above the specified member.
Depending on the level you choose, a different parallel period is returned.
For example, in the diagram, if the expression parallelPeriod ([sales_and_marketing].
[Time].[Time].[Quarter], -3,[2012/Feb]) is changed to use the year level,
parallelPeriod ([sales_and_marketing].[Time].[Time].[Year], -3,[2012/Feb]), then the
expression returns 2009/Feb. The -3 portion of the expression moves us three years
forward from the year the specified member belongs to. Feb 2009 is in the same
relative position in 2009 as 2012/Feb is in 2012.
You can use positive and negative integer_expression values to move backwards and
forwards in the data structure.

© Copyright IBM Corp. 2007, 2016 7-23


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 7 Relative functions

Demonstration 3
Create a periods-to-date report and compare to the previous year

Relative functions © Copyright IBM Corporation 2016

Demonstration 3: Create a periods-to-date report and compare to the previous year

© Copyright IBM Corp. 2007, 2016 7-24


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 7 Relative functions

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

© Copyright IBM Corp. 2007, 2016 7-25


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 7 Relative functions

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:

Task 2. Create a calculation to show the previous year's


quarter.
1. From the Toolbox pane, drag a Query calculation object to the right of
<Selected Quarter> 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 Selected Quarter for
Previous Year, and then create and validate the following expression:
parallelPeriod([sales_and_marketing].[Time].[Time].[Year],1,[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.
Task 3. Create a prompt page and test the report.
You will create a prompt page that allows a single selection.
1. From the Navigate pane, click Prompt pages.
2. From the Toolbox pane, drag a Page object to the Prompt pages pane.
3. In the Prompt pages pane, double-click Prompt page1.
4. From the Toolbox pane, under PROMPTING, drag a Value prompt object to
the prompt page.
5. Click Use existing parameter, and then in the list, click Quarter.
6. Click Next, and then click Finish.
7. Run the report in HTML.

© Copyright IBM Corp. 2007, 2016 7-26


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 7 Relative functions

8. In the prompt, click 2013 Q 2, and then click Finish.


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.

© Copyright IBM Corp. 2007, 2016 7-27


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 7 Relative functions

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:

12. Close the rendered report tab.


Task 5. Create more appropriate labels for the tuple
calculations.
1. On the Application bar, beside Frank Bretton, click the ellipsis, and then click
Locked.
2. In the report layout, click the <Quantity Sold for Selected Quarter> column
header.
3. In the Properties pane, under TEXT SOURCE, make the following changes:
• Source type property: Report Expression
• Report expression property: [Query1].[Selected Quarter]
4. From the Toolbox pane, under TEXTUAL, drag a Text Item object to the right
of the second column header in the report layout, after <%[Query1].[Se…%>.
5. In the Text box, press the spacebar, type Quantity Sold, and then click OK.

© Copyright IBM Corp. 2007, 2016 7-28


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 7 Relative functions

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.

© Copyright IBM Corp. 2007, 2016 7-29


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 7 Relative functions

5. Run the report in HTML.


6. In the prompt, click 2013 Q 2, and then click Finish.
A section of the report appears as follows:

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.

© Copyright IBM Corp. 2007, 2016 7-30


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 7 Relative functions

Task 7. Create a calculation to show the previous


year-to-period totals.
1. From the Toolbox pane, drag a Query calculation object to the right of the last
column, as a peer.
2. In the Create calculation dialog box, click Set expression, from the hierarchy
list, click the Time hierarchy; click OK.
3. In the Set expression dialog box, in the Name field, type Previous Year-to-
Period, and then create and validate the following expression:
periodsToDate ([sales_and_marketing].[Time].[Time].[Year],[Selected
Quarter for Previous Year])
Hints:
• Available Components pane > Source tab: Time dimension > Time hierarchy
> Year level
• Available Components pane > Data Items tab: Selected Quarter for Previous
Year
4. Click OK to close the Set expression dialog box.
5. Cut <Previous Year-to-Period> from the report layout.
6. From the Toolbox pane, drag a Query calculation object to the right of the last
column, as a peer.
7. In the Create calculation dialog box, click OK to accept the default settings.
8. In the Calculated member expression dialog box, in the Name field, type
Previous Year-to-Period Totals, and then create and validate the following
expression:
aggregate (currentMeasure within set [Previous Year-to-Period])
Hints:
• Available Components pane > Data Items tab: Previous Year-to-Period
9. Click OK to close the Calculated member expression dialog box.
10. Run the report in HTML.
11. In the prompt, select 2013 Q 2, and then click Finish.
The results appear as follows:

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.

© Copyright IBM Corp. 2007, 2016 7-31


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 7 Relative functions

12. Close the rendered report tab.


13. Leave the browser open for the next demonstration.
Results:
Using relative time dimensional functions and the tuple function, you created
a report that allows consumers to compare revenue and quantity sold values
for all product lines for specific time periods.

© Copyright IBM Corp. 2007, 2016 7-32


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 7 Relative functions

The lastPeriods function

2012/Oct
2012/Nov
lastPeriods(integer_expression, member)
2012/Dec
lastPeriods(6,[2013/Mar])
2013/Jan
2013/Feb
2013/Mar

Relative functions © Copyright IBM Corporation 2016

The lastPeriods function


Another common relative time function is the lastPeriods function, which returns a
specified number (integer_expression) of members as a set from the same level as the
member (including the specified member).
The example in the diagram returns the last six months including March 2013 (the
specified member).

© Copyright IBM Corp. 2007, 2016 7-33


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 7 Relative functions

Demonstration 4
Create a report that spans the past six months based on a selected
month

Relative functions © Copyright IBM Corporation 2016

Demonstration 4: Create a report that spans the past six months based on a selected
month

© Copyright IBM Corp. 2007, 2016 7-34


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 7 Relative functions

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

© Copyright IBM Corp. 2007, 2016 7-35


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 7 Relative functions

6. Click OK to close the Set Expression dialog box.


The results appear as follows:

Task 2. Create a calculation to show the last six months from


the selected 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 filed, type Selected Six
Months, and then create and validate the following expression:
lastPeriods (6,[Selected Month])
Hints:
• Available Components pane > Data Items tab: Selected Month
4. Click OK to close the Set expression dialog box.
5. Cut <Selected Month> from the report because it is not required in the layout.
6. On the report layout, click one of the <Selected Six Months> column
headers, on the toolbar, click Summarize, and then in the list, click Default
summary.
7. Run the report in HTML.
8. In the prompt list, click 2013/Mar, and then click OK.
The results appear as follows:

The report returns the selected month, 2013/Mar, and the prior five months, and
provides a total revenue value for each product line.

© Copyright IBM Corp. 2007, 2016 7-36


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 7 Relative functions

9. Close the rendered report tab.


10. Leave the browser open for the exercise.
Results:
Using the lastPeriods dimensional function you provided consumers with a
report that allows them to select a month. The report displays revenue values
for the last six months, including the selected month.

© Copyright IBM Corp. 2007, 2016 7-37


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 7 Relative functions

Unit summary
• Navigate dimensional data using relative functions
• Navigate dimensional data using relative time functions

Relative functions © Copyright IBM Corporation 2016

Unit summary

© Copyright IBM Corp. 2007, 2016 7-38


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 7 Relative functions

Exercise 1
Create a dashboard report to compare various time periods

Relative functions © Copyright IBM Corporation 2016

Exercise 1: Create a dashboard report to compare various time periods

© Copyright IBM Corp. 2007, 2016 7-39


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 7 Relative functions

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.

© Copyright IBM Corp. 2007, 2016 7-40


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 7 Relative functions

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:

© Copyright IBM Corp. 2007, 2016 7-41


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 7 Relative functions

Task 2. Add a column chart to the report and add a


calculation that returns the latest month.
• Toolbox pane:
• Drag a Block object to the right of the map.
• Drag a Chart object below the block object.
• In the Insert chart dialog box: Click Clustered Column with 3-D Effects and
then click OK.
• Report layout: Click the chart background.
• Properties pane: Under DATA, change the Query property to Query1.
• Data pane: Add the following members to the column chart:
• Default measure (y-axis): Measures dimension > Revenue
• Series (primary axis): Products dimension > Products hierarchy > Product
line
• Toolbox pane: Drag a Query calculation to the Categories (x-axis) drop zone.
• Create calculation dialog box: Click Set expression, from the hierarchy list, click
the Time hierarchy, and then click OK.
• 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)
Task 3. Display the revenue and latest month data in the map
object.
• Data pane > Data items tab:
• Drag Latest Month to the Color drop zone on the map report object.
• Drag Revenue to the Default measure drop zone on the map report object.

© Copyright IBM Corp. 2007, 2016 7-42


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 7 Relative functions

Task 4. Create calculations to compare the latest month to


other periods.
• Report layout: Click the column chart to select it.
• Toolbox pane: Drag a Query calculation object to Categories (x-axis) to the
right of <#Latest Month#> 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 Quarter, and
then create and validate the following expression:
parallelPeriod ([sales_and_marketing].[Time].[Time].[Quarter],1, [Latest
Month])
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.

© Copyright IBM Corp. 2007, 2016 7-43


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 7 Relative functions

• 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:

© Copyright IBM Corp. 2007, 2016 7-44


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 7 Relative functions

Task 7. Format the chart and test the report.


• Report layout: Click the column chart background.
• Properties pane: Under POSITIONING, open the Size & overflow property.
• In the Width box, type 10, then click the arrow next to px, click in, and then
click OK.
The results appear as follows:

• Run the report in HTML.


• Report view: Click the Map to select it, and point to a country with data to view a
tooltip with additional information.
The results appear as follows:

© Copyright IBM Corp. 2007, 2016 7-45


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 7 Relative functions

• Close the rendered report tab.


• Sign out as Frank Bretton.
• Close the Web browser.

© Copyright IBM Corp. 2007, 2016 7-46


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Advanced drilling techniques and member sets

Advanced drilling techniques


and member sets

IBM Cognos Analytics 11.0

© Copyright IBM Corporation 2016


Course materials may not be reproduced in whole or in part without the written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 8 Advanced drilling techniques and member sets

© Copyright IBM Corp. 2007, 2016 8-2


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 8 Advanced drilling techniques and member sets

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

© Copyright IBM Corp. 2007, 2016 8-3


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 8 Advanced drilling techniques and member sets

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.

© Copyright IBM Corp. 2007, 2016 8-4


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 8 Advanced drilling techniques and member sets

Default drill up and down behavior

[sales_and_marketing].[Products].[Products].[Product line]

Drill Down
Camping Equipment (New expression created)

Golf Equipment children([Golf Equipment])

Mountaineering
Equipment
Irons
Outdoor Protection
Putters
Personal Accessories
and so on

Advanced drilling techniques and member sets © Copyright IBM Corporation 2016

Default drill up and down behavior


When you drill down or up from the "home" position, the current expression for the
drilled item is replaced.
Depending on where you are in the hierarchy, drilling down may replace the original
expression with children([DrilledMember]).
Drilling up may replace the original expression with children (of the grandparent of
[Drilled Member]) or if you have drilled past the leaf level and isolated a member,
children(of the parent of [Drilled Member]).
For example, if you drilled down on Irons and then Hailstorm Steel Irons, Hailstorm
Steel Irons would be isolated because it is the lowest level. If you then drilled up on
Hailstorm Steel Irons, you would drill up to the children of Irons, the parent of Hailstorm
Steel Irons, not the children of the grandparent, which would be Golf Equipment.

© Copyright IBM Corp. 2007, 2016 8-5


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 8 Advanced drilling techniques and member sets

Members within same hierarchy

 Camping Equipment is from the Product Line level


 Cooking Gear is from the Product Type level

Members from Different Levels of the Same Hierarchy

Product Line level Camping Equipment Drill Up Only


Cooking Gear

Product Type level


Drill Up or Down

Advanced drilling techniques and member sets © Copyright IBM Corporation 2016

Members within same hierarchy


When two or more members from different levels in the same hierarchy are placed in a
report, users by default can drill both up and down on the lowest level of detail.
However, users can only drill up on members from the higher levels.
In general, you can only drill up on higher level members because drilling down on
them can make lower level members ambiguous.
By default, when there are two members from different levels of the same hierarchy on
a report, drilling on one of the members will also drill on the other member. For
example, if you were to drill down on Cooking Gear, Camping Equipment would also be
replaced with its child member.
Members from the same hierarchy drill together because all members from a single
hierarchy on a report will be implicitly defined as part of the same member set. We will
discuss how to explicitly define member sets later in this unit.
However, if you place two members from different levels and from different branches in
the same hierarchy, then drilling on one does not directly affect the other because there
is no logical connection between them in the hierarchy.

© Copyright IBM Corp. 2007, 2016 8-6


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 8 Advanced drilling techniques and member sets

Demonstration 1
Examine default drilling behavior

Advanced drilling techniques and member sets © Copyright IBM Corporation 2016

Demonstration 1: Examine default drilling behavior

© Copyright IBM Corp. 2007, 2016 8-7


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 8 Advanced drilling techniques and member sets

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.

© Copyright IBM Corp. 2007, 2016 8-8


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 8 Advanced drilling techniques and member sets

8. Run the report in HTML.


The report appears as follows:

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.

© Copyright IBM Corp. 2007, 2016 8-9


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 8 Advanced drilling techniques and member sets

4. Right-click and select Drill Down .


A section of the report appears as follows:

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.

© Copyright IBM Corp. 2007, 2016 8-10


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 8 Advanced drilling techniques and member sets

Task 3. Examine default drill functionality on members within


the same hierarchy.
1. From the Page explorer pane, click Page1.
2. From the Data pane, drag Retailers dimension > Retailers hierarchy > Region
level below <#Retailers#> in the Rows drop zone, as a peer of <#Retailers#>
on the report layout.
3. Run the report in HTML.
The report appears as follows:

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.

© Copyright IBM Corp. 2007, 2016 8-11


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 8 Advanced drilling techniques and member sets

5. Click Spain to drill down.


A section of the report appears as follows:

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.

© Copyright IBM Corp. 2007, 2016 8-12


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 8 Advanced drilling techniques and member sets

Cases for overriding default


• Preserving some members within a hierarchy when drilling
• Allowing members from the same hierarchy to drill independently
• Preserving part or all of a complex edge expression
 Sorted members
 Calculations, such as Top 3
 Combined calculations, such as percent of total

Advanced drilling techniques and member sets © Copyright IBM Corporation 2016

Cases for overriding default


These are some of the business cases for needing to override default drilling behavior.
Many of these business cases require both configuration of the Advanced Drilling
Configuration tab and the creation of explicit member sets.

© Copyright IBM Corp. 2007, 2016 8-13


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 8 Advanced drilling techniques and member sets

Demonstration 2
Configure advanced drill behavior

Advanced drilling techniques and member sets © Copyright IBM Corporation 2016

Demonstration 2: Configure advanced drill behavior

© Copyright IBM Corp. 2007, 2016 8-14


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 8 Advanced drilling techniques and member sets

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.

© Copyright IBM Corp. 2007, 2016 8-15


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 8 Advanced drilling techniques and member sets

8. Run the report in HTML.


A section of the report appears as follows:

9. Click Lanterns to drill down.


A section of the report appears as follows:

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.

© Copyright IBM Corp. 2007, 2016 8-16


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 8 Advanced drilling techniques and member sets

5. Run the report in HTML.


A section of the report appears as follows:

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.

© Copyright IBM Corp. 2007, 2016 8-17


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 8 Advanced drilling techniques and member sets

Task 3. Test the drill behavior of the report.


1. Click Lanterns to drill down.
A section of the report appears as follows:

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.

© Copyright IBM Corp. 2007, 2016 8-18


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 8 Advanced drilling techniques and member sets

2. Right-click Firefly 2 and then click Drill Up.


A section of the report appears as follows:

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.

© Copyright IBM Corp. 2007, 2016 8-19


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 8 Advanced drilling techniques and member sets

Define member set structures


• Member set structures define a structure for data items in a query.
• You can define member set structures to:
 Enable advanced drill-up and drill-down behaviors
 Bind report expressions
• Member set structures must have unique names to prevent naming
conflicts.

Advanced drilling techniques and member sets © Copyright IBM Corporation 2016

Define member set structures


Member set structures group data items that are logically related for various actions,
such as drill actions.
They can be defined as a flat list or, as a tree structure, where member sets that are in
the same parent chain are considered related.
Once member set structures are created, they should be given unique names to
prevent conflicts with the data items on which they are based.

© Copyright IBM Corp. 2007, 2016 8-20


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 8 Advanced drilling techniques and member sets

When explicit member sets are needed


• Advanced drill behaviors:
 Independent drill up and down on multiple levels of the same hierarchy
 Preserving expression functions, such as sort order
 Binding previously independent report expressions so that drilling up or
down affects all items
• Apply a single function to multiple members or sets.

Advanced drilling techniques and member sets © Copyright IBM Corporation 2016

When explicit member sets are needed


Member Set Considerations:
• Member set structures must have unique names in the query.
• Member set structures must be manually maintained.
If a data item name changes or a data item is deleted or replaced with a new one with
the same name, a member set structure based on that data item will be affected and
must be recreated.
If a member set structure is referenced in a calculation and the member set structure
name is subsequently changed, the calculation must be updated manually.

© Copyright IBM Corp. 2007, 2016 8-21


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 8 Advanced drilling techniques and member sets

Independent drill up and down

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 Drill with Explicit Member Sets

Camping Equipment Enable independent drill up


and down behavior on
Cooking Gear multiple levels from one
hierarchy

Advanced drilling techniques and member sets © Copyright IBM Corporation 2016

Independent drill up and down


Member set structures determine the set of items that are affected when drilling up and
down on a particular data item.
The majority of advanced drill scenarios require member set structures.
In the slide example, member set structures override the default drill-up and drill-down
behavior for the Camping Equipment and Cooking Gear data items. These data items
are treated as independent objects and not as members from the same hierarchy.

© Copyright IBM Corp. 2007, 2016 8-22


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 8 Advanced drilling techniques and member sets

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

© Copyright IBM Corp. 2007, 2016 8-23


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 8 Advanced drilling techniques and member sets

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:

© Copyright IBM Corp. 2007, 2016 8-24


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 8 Advanced drilling techniques and member sets

5. From the Data pane, click View metadata tree .


6. From the Data pane, expand the Retailers dimension > Retailers hierarchy,
and then drag the Region level to the Rows drop zone.
7. From the Data pane, drag the Retailer name level to the Rows drop zone
below <#Region#> as a peer.
To create a visual clue that there are two sections of the report, you will add text
boxes to label the sections.
8. From the Toolbox pane, drag a Text item to the Rows drop zone above
<#Region#>, in the Text dialog box type Summary Data, and then click OK.
9. From the Toolbox pane, drag a second Text Item to the Rows drop zone
between <#Region#> and <#Retailer name#>, in the Text dialog box type
Detail Data, and then click OK.
10. Click the Summary Data text box, Ctrl+click the Detail Data text box, in the
Properties pane, in the FONT & TEXT section, click Font, and then click the
ellipsis.
11. Change the font to 10pt, Bold and Navy.
Task 2. Create member sets and configure drill behavior.
By default, since Region and Retailer name are in the same hierarchy, drilling
on one section of the report will automatically drill on the other. To change this
behavior, you will create distinct member sets for the two levels.
1. In the Navigation pane, click the Query explorer tab, and then click Query1.
2. In the Properties pane, under MISCELLANEOUS, change Query1 to
Independent Drilling, and then click Enter.
3. In the Properties pane, under DATA, in the Define Member Sets list, click
Yes.
4. At the bottom of Query explorer, click the Member sets tab.
5. In the Data pane, click the Data items tab, and drag Region to the work area.
You need to rename the member set so that it has a name distinct from the
Region level.
6. In the Properties pane, under MISCELLANOUS, click the Name property, click
after Region, press the space bar, type MS after Region, and then press
Enter.
"MS" is for Member Set.

© Copyright IBM Corp. 2007, 2016 8-25


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 8 Advanced drilling techniques and member sets

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.

© Copyright IBM Corp. 2007, 2016 8-26


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 8 Advanced drilling techniques and member sets

Task 3. Test the report and drilling behavior.


1. Run the report in HTML.
A section of the report appears as follows:

Both the Regions and the Retailer names have been underlined since drill up
and drill down have been explicitly defined for each of them.

© Copyright IBM Corp. 2007, 2016 8-27


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 8 Advanced drilling techniques and member sets

2. Right-click Americas, and then click Drill Up.


IBM Cognos Analytics drills up from Americas to show the root member of the
Retailer hierarchy, Retailers.
A section of the report appears as follows:

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.

© Copyright IBM Corp. 2007, 2016 8-28


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 8 Advanced drilling techniques and member sets

4. Close the rendered report tab.


5. Leave the browser open for the next demonstration.
Results:
You have created a report that shows both summary level data and detail
data. Using explicitly defined member sets and advanced drilling options, you
have allowed the user to drill independently up and down on the different
areas of the report.

© Copyright IBM Corp. 2007, 2016 8-29


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 8 Advanced drilling techniques and member sets

Bind report expressions (1 of 2)

Sorted Products Expression


order([Products Set], tuple([Revenue], [2012]), desc)

based on
By default, when you drill
down, the underlying
Product Set Expression expression is replaced,
removing the desired
children([Products]) order

Default Drilled Expression


children([DrilledMember])

Advanced drilling techniques and member sets © Copyright IBM Corporation 2016

Bind report expressions


Member set structures can bind report expressions.
By binding report expressions, all items are affected when a user drills up or down on
one data item.
When you drill down on Sorted Products, by default the expression is replaced with the
children of the member drilled upon. Instead, you want to preserve the expression but
replace the underlying Product Set expression. By doing this, you are sorting the
children of the next level down from Products.

© Copyright IBM Corp. 2007, 2016 8-30


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 8 Advanced drilling techniques and member sets

Bind report expressions (2 of 2)

Sorted Products Expression

order([Product Set], tuple([Revenue], [2012]), desc)


Drill Down
on Product Set Expression
Camping
Equipment children([Products])
Preserve Expression

Sorted Products Expression

order([Product Set], tuple([Revenue], [2012]), desc)

Product Set Expression

children([Camping Equipment]) Replace Expression

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.

© Copyright IBM Corp. 2007, 2016 8-31


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 8 Advanced drilling techniques and member sets

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

© Copyright IBM Corp. 2007, 2016 8-32


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 8 Advanced drilling techniques and member sets

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

3. Run the report in HTML.


The report appears as follows:

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.

© Copyright IBM Corp. 2007, 2016 8-33


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 8 Advanced drilling techniques and member sets

Task 2. Sort the crosstab report using dimensional functions.


1. In the report layout, click <#Product line#>, and then on the toolbar click
Delete.
2. From the Toolbox pane, drag a Query calculation object to the Rows drop
zone.
3. In the Create calculation dialog box, click Set expression, from the hierarchy
list, click the Products hierarchy, and then click OK.
4. In the Set expression dialog box, in the Name field, type Products Set, and
then create and validate the following expression:
children ([Products])
Hints:
• Available Components pane > Source tab (members tree view): Products
root node
In dimensional reporting, there are many ways to achieve the same results. In
this demonstration, we are using children ([Products]); however the Products
Set expression could instead have referenced the Product line level, since a
level is also considered as a member set.
5. Click OK to close the Set expression dialog box.
6. In the report layout, click <Products Set>, and then from the toolbar, click Cut.
This action removes Products Set from the report layout but keeps it in the
query. You need to keep this item in the query as the next expression you
create, Sorted Products, references it. You will add a Sorted Products Query
Calculation to the report to order product data by revenue for 2012.
7. From the Toolbox pane, drag a Query calculation object to the Rows drop
zone.
8. In the Create calculation dialog box, click Set expression, from the hierarchy
list, click the Products hierarchy, and then click OK.
9. In the Set expression dialog box, in the Name field, type Sorted Products,
and then create and validate the following expression:
order([Products Set], tuple([Revenue], [2012]), desc)
Hints:
• Available Components pane > Data items tab: Products Set
• Available Components pane > Data items tab: Revenue
• Available Components pane > Source tab (members tree view) > Time folder
> Time root node > 2012 member

© Copyright IBM Corp. 2007, 2016 8-34


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 8 Advanced drilling techniques and member sets

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.

© Copyright IBM Corp. 2007, 2016 8-35


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 8 Advanced drilling techniques and member sets

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.

© Copyright IBM Corp. 2007, 2016 8-36


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 8 Advanced drilling techniques and member sets

Task 4. Test the report.


1. Run the report in HTML.
The report appears as follows:

The product lines are sorted by revenue for 2012.


2. Drill down on Camping Equipment.
The report appears as follows:

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.

© Copyright IBM Corp. 2007, 2016 8-37


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 8 Advanced drilling techniques and member sets

4. Drill down on Star Dome.


The report appears as follows:

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.

© Copyright IBM Corp. 2007, 2016 8-38


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 8 Advanced drilling techniques and member sets

Synchronized drill up and down with multiple queries

Drilling down on
the chart is reflected
in the crosstab

Advanced drilling techniques and member sets © Copyright IBM Corporation 2016

Synchronized drill up and down with multiple queries


Although synchronized drill up and down behavior between containers can be achieved
through using one query and member sets, while effective, this method takes some
time to set up. It also makes applying different filters for each container a little more
difficult.
With dimensional data sources, you can link groups of data items from different queries
in a report, so that when you drill up or down on one query, data items in the other
query simultaneously also drill up or down. The linked items must be based on the
same item in each query for expected behavior.

© Copyright IBM Corp. 2007, 2016 8-39


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 8 Advanced drilling techniques and member sets

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 drill down behavior

© Copyright IBM Corp. 2007, 2016 8-40


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 8 Advanced drilling techniques and member sets

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.

© Copyright IBM Corp. 2007, 2016 8-41


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 8 Advanced drilling techniques and member sets

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:

Task 2. Enable drill up and down behavior.


1. From the Navigate pane, click Report.
2. From the Properties pane, in the RUNNING & VALIDATING section, change
Run with full interactivity to No.
3. In the DATA section, change Drill-up and drill-down to Yes.
4. Run the report in HTML.
5. On the chart, drill down on 2012.
Notice that the crosstab is not affected when drilling.
6. Close the rendered report tab.

© Copyright IBM Corp. 2007, 2016 8-42


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 8 Advanced drilling techniques and member sets

Task 3. Link data items to enable synchronized drill up and


down behavior.
1. From the Properties pane, in the DATA section, double-click on the field for
Advanced drill behavior.
2. Click the Data items linking tab.
3. From Chart PLYR, drag Year to the Linked data items pane.
4. From Crosstab PLOM, drag Year to the Drop item here drop zone.
5. Repeat steps 3 and 4 for Product Line.
The results appear as follows:

6. Click OK.

© Copyright IBM Corp. 2007, 2016 8-43


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 8 Advanced drilling techniques and member sets

7. Run the report in HTML.


8. On the chart, drill down on 2012.
A section of the report appears as follows:

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.

© Copyright IBM Corp. 2007, 2016 8-44


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 8 Advanced drilling techniques and member sets

Apply one function to member sets

Default Member Set Renamed to a


Structure Names Single Name
Products MySet
Sales Territory MySet
Order Method Referenced in MySet
One Function

rank(currentMeasure tuple [2012] within set [MySet])

Advanced drilling techniques and member sets © Copyright IBM Corporation 2016

Apply one function to member sets


You can also rename member set structures to apply one function to several member
sets. The member set structure can be referenced in functions within your report
expressions.
When you reference a member set structure in a calculation, you must manually type it
in as it is not available as a selection anywhere in the UI. If you change a member set
structure name, you must manually update the reference in the calculation.

© Copyright IBM Corp. 2007, 2016 8-45


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 8 Advanced drilling techniques and member sets

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

© Copyright IBM Corp. 2007, 2016 8-46


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 8 Advanced drilling techniques and member sets

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.

© Copyright IBM Corp. 2007, 2016 8-47


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 8 Advanced drilling techniques and member sets

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:

© Copyright IBM Corp. 2007, 2016 8-48


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 8 Advanced drilling techniques and member sets

Task 2. Create member sets with same name.


1. In the Navigate pane, click the Query Explorer tab, and then under Queries,
click Query1.
2. From the Properties pane, under MISCELLANEOUS, change the Name from
Query1 to Multiple Member Sets.
3. From the Properties pane, under DATA, change the Define Member Sets
property to Yes.
4. At the bottom of the work area, click the Member sets tab.
5. In the Data pane, click the Data item tab, and then drag Product Line
Members, Region Members, and Order Method Type Members to the work
area.
The member set structures appear as shown below:

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:

Task 3. Create a rank function and reference the new


common member set structure name.
1. In the Navigate pane, from the Page Explorer tab, click Page1.
2. From the Toolbox pane, drag a Query calculation object to the right of the
second <#Year#> column as a peer.
3. In the Create calculation dialog box, click Set expression, click the Time
hierarchy and then click OK.
You could try declaring the Time hierarchy at this step.

© Copyright IBM Corp. 2007, 2016 8-49


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 8 Advanced drilling techniques and member sets

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.

© Copyright IBM Corp. 2007, 2016 8-50


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 8 Advanced drilling techniques and member sets

Task 4. Sort the rank column.


1. In the report layout, click <Product Line Members>, click the ellipsis on the
toolbar, and then click Edit Set.
2. Double-click Set expression.
3. Create and validate the following expression:
order (members([sales_and_marketing].[Products].[Products].[Product line]),
tuple ([2012],[Revenue]), desc)
Hints:
• Available Components pane > Data Items tab: 2012
• Available Components pane > Data Items tab: Revenue
4. Click OK to close the Set expression dialog box, and then click OK to close the
Set definition dialog box.
5. Repeat steps 1-3 to sort Region Members and Order Method Type
Members.

© Copyright IBM Corp. 2007, 2016 8-51


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 8 Advanced drilling techniques and member sets

6. Run the report in HTML.


The report appears as shown below:

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.

© Copyright IBM Corp. 2007, 2016 8-52


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 8 Advanced drilling techniques and member 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

© Copyright IBM Corp. 2007, 2016 8-53


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 8 Advanced drilling techniques and member sets

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

© Copyright IBM Corp. 2007, 2016 8-54


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 8 Advanced drilling techniques and member sets

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.

© Copyright IBM Corp. 2007, 2016 8-55


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 8 Advanced drilling techniques and member sets

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:

• Close the rendered report tab.

© Copyright IBM Corp. 2007, 2016 8-56


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 8 Advanced drilling techniques and member sets

Task 2. Create a query calculation to show the top three


product members.
• Toolbox pane: drag a Query calculation to the Rows below <Products Set> as
a Set expression of the Products hierarchy.
• Set expression dialog box: Name the expression Top Products, and then
create and validate the following expression:
topCount ([Products Set],3,[Revenue])
Hint:
• Available Components pane > Data items tab: Products Set
• Available Components pane > Data items tab: Revenue
• Toolbar: Cut <Products Set> from the report layout.
• Run the report.
The results appear as follows:

Only the top three product lines are returned.


• Close the rendered report tab.
Task 3. Create query calculations to show overall summaries
and summaries for excluded members.
• Toolbox pane: Drag a Query calculation to the Rows below <Top Products>
as a Calculated member of the Products hierarchy.
• Calculated member expression dialog box: Name the expression Summary,
and then create and validate the following expression:
aggregate (currentMeasure within set [Products Set])
This expression returns the totals for all product members.

© Copyright IBM Corp. 2007, 2016 8-57


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 8 Advanced drilling techniques and member sets

• Toolbox pane: Drag a Query calculation to the Rows above Summary as a


Calculated member of the Products hierarchy.
• Calculated member expression dialog box: Name the expression Excluded,
and then create and validate the following expression:
aggregate (currentMeasure within set except ([Products Set],[Top
Products]))
The results appear as follows:

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.

© Copyright IBM Corp. 2007, 2016 8-58


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 8 Advanced drilling techniques and member sets

Task 4. Enable drilling up and drilling down.


• Report properties:
• Under RUNNING & VALIDATING, set Run with full interactivity to No.
• Under Data, change Drill-up and drill-down to Yes.
Hint:
To focus the Show Properties pane on report properties, in the Navigate pane,
click Report.
• Run the report.
• In the rendered report, drill down on Camping Equipment.
The report appears as shown below:

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.

© Copyright IBM Corp. 2007, 2016 8-59


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 8 Advanced drilling techniques and member sets

Task 5. Create member sets to enable advanced drill


behavior.
• Query explorer: Click Query1.
• Properties pane: Under DATA, change the Define member sets property to
Yes.
• Query1 work area (bottom): Click the Member sets tab.
• Data pane > Data items tab: Drag Products Set to the work area.
• Drag Top Products, Summary and Excluded onto Products Set in the work
area.
• Properties pane: Rename each member set by appending the Name property
value with MS.
Top Products MS, Summary MS, and Excluded MS are nested as children of
Products Set MS.
The member set structure appears as shown below:

• Report properties: Under DATA, double-click Advanced drill behavior.


• Drill behavior dialog box: Click the Advanced tab, and in the Data items pane:
• Click Products Set, and change Drill-up behavior and Drill-down behavior
to Replace Expression.
• Change the Drill-up behavior and Drill-down behavior of the Top Products,
Summary, and Excluded data items to Preserve.

© Copyright IBM Corp. 2007, 2016 8-60


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 8 Advanced drilling techniques and member sets

• Drill behavior dialog > Basic tab: Select the check boxes to disable drill-up and
drill-down for Summary and Excluded.

• Drill behavior dialog box: Click OK to close.


• Run the report in HTML
• Rendered report tab: Drill down on Camping Equipment.
The report appears as shown below:

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.

© Copyright IBM Corp. 2007, 2016 8-61


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 8 Advanced drilling techniques and member sets

© Copyright IBM Corp. 2007, 2016 8-62


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Set up drill-through reports

Set up drill-through reports

IBM Cognos Analytics 11.0

© Copyright IBM Corporation 2016


Course materials may not be reproduced in whole or in part without the written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 9 Set up drill-through reports

© Copyright IBM Corp. 2007, 2016 9-2


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 9 Set up drill-through reports

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

Set up drill-through reports © 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
• Advanced Drilling Techniques and Member Sets

© Copyright IBM Corp. 2007, 2016 9-3


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 9 Set up drill-through reports

What is drill-through access?

Source Report

Revenue 2010 2011 2012 2013

Camping Equipment 332,986,338.06 402,757,573.17 500,382,422.83 352,910,329.97


Personal Accessories 391,647,093.61 456,323,355.90 594,009,408.42 443,693,449.85
Outdoor Protection 36,165,521.07 25,008,574.08 10,349,175.84 4,471,025.26
Golf Equipment 153,553,850.98 168,006,427.07 230,110,270.55 174,740,819.29
Mountaineering Equipment 107,099,659.94 161,039,823.26 141,520,649.70

Target Report

Year Product line Product type Product Revenue


2011 Mountaineering Climbing Firefly Rechargeable 2,734,308.88
Equipment Accessories Battery
Granite Chalk Bag 960,521.94
Tools Granite Ice 6,306,347.20
Granite Hammer 4,326,684.18
Granite Shovel 2,421,545.46

Set up drill-through reports © Copyright IBM Corporation 2016

What is drill-through access?


You can set up drill-through access to let users navigate from one report to another
report to view related data that will help them answer their business questions. You can
create drill-through source and target reports using a variety of report types, including
lists, crosstabs, charts, and map reports.
You can set up drill-through access from a report, or for a package.
Target reports may contain parameters, which act as placeholders, and require values
to be passed from the source report when users drill through. The values the source
report passes depend on where users drill through from. This means that when users
drill through, the target report is filtered to display only the data of interest to the user.
A note of caution, for drill-through scenarios, after a broken MUN reference is fixed, the
report may pass the wrong parameter to the target report.

© Copyright IBM Corp. 2007, 2016 9-4


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 9 Set up drill-through reports

Drill-through access from a report

Target Report
Source Report Drill through to a
target report to (Created in
(Created in view related data IBM Cognos
Reporting)
Analytics)

Set up drill-through reports © Copyright IBM Corporation 2016

Drill-through access from a report


In the source report, select the cells you want users to drill through from, and then set
up drill-through access to the target.
When you run the source report, the cells you selected become links that users can
click to drill through.
You must create the target report before you can set up drill-through access.
The following drill-through combinations are acceptable:
• Relational to Relational
• DMR to Relational
• DMR to DMR
• OLAP to Relational
• OLAP to DMR
• OLAP to OLAP

© Copyright IBM Corp. 2007, 2016 9-5


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 9 Set up drill-through reports

Drill-through access for a package

Reports created using the Sales and Marketing (cube) package

IBM Cognos Report Report


Analytics
B C
Report
A

Target
Report

Set up drill-through reports © Copyright IBM Corporation 2016

Drill-through access for a package


To let users navigate to a specific target report from reports, analyses, and queries
created using a package, you can create a drill-through definition for the package.
The source reports do not need to be created when you create the drill-through
definition. This lets you set up drill-through access for the target report, and then later
create as many source reports as you require.
Each package drill-through definition can have only one target. You can create multiple
drill-through definitions for a package.
You can set permissions properties for target reports to determine which users will be
able to open them when they attempt to drill through. You can also set permissions
properties for drill-through definitions to determine which users have access to these
drill-through definitions.
Targets can be reports or packages.
In the slide example, a drill-through definition has been created for the Sales and
Marketing package. Users can drill through to the target report from a variety of reports
created using the same package. Data modelers publish packages from models they
create in Framework Manager. Report authors then use these packages to add data to
their reports.

© Copyright IBM Corp. 2007, 2016 9-6


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 9 Set up drill-through reports

Steps to set up a package-based drill-through definition

1. Create the 2. Create the drill- 3. Drill through to


target report. through definition. the target report.
Create the target Select the package Create a report,
report* using the source
package
Limit the data items
Add a parameter to from which users
the target report* can drill through* Drill through to
view related data in
the target report
Save the target Select the target
report report
The target report
Hide the target appears and
Map the parameter
report* displays filtered
values passed to
data
the target report if
needed, or specify
dynamic filtering of
target*
* Optional
Set up drill-through reports © Copyright IBM Corporation 2016

Steps to set up a package-based drill-through definition


Before you can set up drill-through access for a package, you must have the target
report created. Next, create a drill-through definition that lets users navigate to the
target report from reports created using the package. To let users drill through from a
report using a package drill-through definition, you must enable this drill behavior in the
source report.
This slide gives a high-level understanding of this process. The demonstrations will go
through this process in detail.
When you set up drill through for a package, the following steps are optional:
• Create the target report (may be done by a different report author).
• Add a parameter to the target report.
• Hide the target report.
• Limit the data items from which users can drill through.
• Map the parameter values passed to the target report, or specify dynamic
filtering.

© Copyright IBM Corp. 2007, 2016 9-7


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 9 Set up drill-through reports

Specify the values passed to target parameters

Report-based drill-through definition

Parameters in the Values passed from Properties passed from


target report the source report the source report

Package-based drill-through
definition
Set up drill-through reports © Copyright IBM Corporation 2016

Specify the values passed to target parameters


When you set up drill-through access, you must map the values that the source report
will pass to the target parameters.
If you do not specify which values to pass to target parameters, then when users drill
through they will be prompted to select values for any required target parameters.
When dealing with dimensional sources, you can also select which property of the
member you would like to pass to the target report (for example: Member Unique
Name, Member Caption, and Business Key). It is important to know which values are
conformed between the source report and the target report data sources.

© Copyright IBM Corp. 2007, 2016 9-8


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 9 Set up drill-through reports

Member-to-member drill-through access


• To set up drill-through access between members, in the target report
create a parameter using a level or a hierarchy, and then let users drill
through from members in source reports.

A parameter created using


this level will expect a
specific
Product line member

Set up drill-through reports © Copyright IBM Corporation 2016

Member-to-member drill-through access


When users drill through, the target parameter will expect to receive a member. You
can set up member-to-member drill-through access when working with:
• packages published from OLAP data sources, such as IBM Cognos PowerCubes
• packages published from relational data sources that data modelers have
modeled dimensionally (called Dimensionally Modeled Relational, or DMR, data
sources)
When you create a drill-through definition for a package, you know that a parameter in
the target report expects a member if, in the Parameter mapping area, the Type for the
parameter will be "Member". When you set up drill-through access from a specific IBM
Cognos Analytics report, you know that a parameter in the target report expects a
member if, in the Parameters dialog box, the Type for the parameter is
"memberUniqueName".
When you create a drill-through definition for a package, you know that a parameter in
the target report expects a member if, in the Parameter mapping area, the Type for the
parameter will be "Member". When you set up drill-through access from a specific IBM
Cognos Analytics report, you know that a parameter in the target report expects a
member if, in the Parameters dialog box, the Type for the parameter is
"memberUniqueName".

© Copyright IBM Corp. 2007, 2016 9-9


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 9 Set up drill-through reports

Demonstration 1
Set up member-to-member drill-through access

Set up drill-through reports © Copyright IBM Corporation 2016

Demonstration 1: Set up member-to-member drill-through access

© Copyright IBM Corp. 2007, 2016 9-10


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 9 Set up drill-through reports

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

Task 2. Add a parameter, and then save the report.


Each level in this package contains a set of members. You will create a parameter that
expects a member from the Retailer country level.
1. From the Data pane, expand the Retailers dimension > Retailers hierarchy >
Retailer country level > Members folder.
The Retailer country level contains a member for each retailer country:

© Copyright IBM Corp. 2007, 2016 9-11


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 9 Set up drill-through reports

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.

© Copyright IBM Corp. 2007, 2016 9-12


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 9 Set up drill-through reports

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 .

© Copyright IBM Corp. 2007, 2016 9-13


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 9 Set up drill-through reports

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.

© Copyright IBM Corp. 2007, 2016 9-14


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 9 Set up drill-through reports

9. Click View passed source values.


The drill-through values are shown as follows:

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:

Drill-through access works as expected.


12. Close both rendered report tabs, and leave the browser open for the next
demonstration.
Results:
You created a drill-through definition to let users drill through from reports
created using the Sales and Marketing package to a target report displaying
data for a specific retailer country. You let users drill through from members
in the source report to a parameter in the target report that expected a
member.

© Copyright IBM Corp. 2007, 2016 9-15


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 9 Set up drill-through reports

Drill down then drill through

Source Report Source Report Target Report

Product Golf Golf


Line Equipment Equipment
Data Data Data

Drill down to view Drill through to view


data for Golf related data for Golf
Equipment Equipment

Set up drill-through reports © Copyright IBM Corporation 2016

Drill down then drill through


When you create a drill-through definition for a package containing dimensional data,
you can let users drill down within a hierarchy, and then drill through from members at
any level in the hierarchy.
This lets users explore source reports at different levels of detail before drilling through
to view related data.
An example, would be to let users explore product data in an OLAP package at
different levels of detail and then drill through from any level, create a parameter in the
target report using the Products hierarchy.
A parameter created using an OLAP hierarchy will accept values passed from
members at any level within the hierarchy.

© Copyright IBM Corp. 2007, 2016 9-16


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 9 Set up drill-through reports

Demonstration 2
Let users drill down and then drill through

Set up drill-through reports © Copyright IBM Corporation 2016

Demonstration 2: Let users drill down and then drill through

© Copyright IBM Corp. 2007, 2016 9-17


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 9 Set up drill-through reports

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.

© Copyright IBM Corp. 2007, 2016 9-18


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 9 Set up drill-through reports

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 .

© Copyright IBM Corp. 2007, 2016 9-19


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 9 Set up drill-through reports

8. Click the header block, and then on the toolbar click Left.
The results appear as follows:

9. Save the report in the Team Content > Student_B6061 folder as


09_Demonstration2_Target.
You will create a drill-through definition to let users navigate to this report from
reports created using the Sales and Marketing package.
Task 3. Create the package-based drill-through definition.
1. From the Side bar, click New > Other > Drill-Through Definitions.
2. Navigate to Team content > Samples_PowerCube > Cubes > Sales and
Marketing (cube) package, and then click New Drill-through Definition.
3. In the Name box, type 09 Demonstration 2 Drill-through Definition, and then
click Next.
You want to ensure that when users drill through, they are not prompted to
select a member from the Products hierarchy. Therefore, you will limit the scope
of the drill-through definition to the Products dimension.
4. Click Set the scope, click the Products dimension, and then click OK.
5. Click Set the target, navigate to Team Content > Student_B6061, click
09_Demonstration2_Target, and then click OK.

© Copyright IBM Corp. 2007, 2016 9-20


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 9 Set up drill-through reports

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:

© Copyright IBM Corp. 2007, 2016 9-21


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 9 Set up drill-through reports

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.

© Copyright IBM Corp. 2007, 2016 9-22


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 9 Set up drill-through reports

9. Click 09 Demonstration 2 Drill-through Definition.


IBM Cognos Analytics drills through to the 09_Demonstration2_Target report
which is displayed as follows:

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.

© Copyright IBM Corp. 2007, 2016 9-23


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 9 Set up drill-through reports

Drill through to different data sources (1 of 2)

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

Set up drill-through reports © Copyright IBM Corporation 2016

Drill through to different data sources


In IBM Cognos, you can set up drill-through access between reports created from
different data sources. These data sources may be the same type (such as two OLAP
data sources), or they may be different types of data sources.
When you set up drill-through access between reports created using different data
sources, you must ensure that parameters in the target report can accurately identify
the values passed from source reports. If the parameter in the target report cannot
accurately recognize the value passed from the source report, the target report may
display no data, or may display unexpected results.
For example, a report author may need to set up drill-through access from a report
created using summarized PowerCube data to a report created using detailed data
from a relational data source.
Setting up drill-through between reports created using different data source is more
advanced, and is relevant only for those who will need to set up drill-through access
between different data sources. If this is not relevant, you may wish to skip this portion
of the unit.

© Copyright IBM Corp. 2007, 2016 9-24


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 9 Set up drill-through reports

Drill through to different data sources (2 of 2)

Drilled Data Item Supported


Data Item Expected by Target Combination?
in Source Report Parameter

Value Value Yes


Member Member Yes *
Member Value Yes
Value Member No

Set up drill-through reports © Copyright IBM Corporation 2016

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.

© Copyright IBM Corp. 2007, 2016 9-25


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 9 Set up drill-through reports

Member-to-member

Package Dimension Hierarchy Level

[sales_and_marketing].[Products].[Products].[Product type] ->:[PC].[@MEMBER].[951]

MUN for the Cooking Gear Member

Dimension
Hierarchy

Level

Set up drill-through reports © Copyright IBM Corporation 2016

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.

© Copyright IBM Corp. 2007, 2016 9-26


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 9 Set up drill-through reports

From OLAP members to DMR members

[sales_and_marketing].[Products].[Products].[Product type] ->:[PC].[@MEMBER].[953]

MUN for Cognos PowerCube Sleeping Bags Member

[Sales].[Products].[Products].[Product type]-> [Products].[991].[953]

MUN for DMR Sleeping Bags Member

Set up drill-through reports © Copyright IBM Corporation 2016

From OLAP members to DMR members


For drill through from OLAP members to DMR members to succeed, confirm with your
data modelers that:
• the business keys match in all levels of the dimensions for the source and target
members, and
• the dimensions for the source and target members have the same number of
levels
In the slide example, drill through from the IBM Cognos PowerCube Sleeping Bag
member to the DMR Sleeping Bag member would succeed because the two
dimensions have the same number of levels, and the business keys for the levels
match.
If the DMR data source dimensions, levels, level order, and business keys match the
OLAP cube data source, the data is said to be conformed. Conformed data is required
for OLAP to DMR drill through.

© Copyright IBM Corp. 2007, 2016 9-27


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 9 Set up drill-through reports

From members to values

Product line code represents the Query Item Containing


Primary Keys in the These Business Key
PRODUCT_LINE Table in a Values
Relational Database

Set up drill-through reports © Copyright IBM Corporation 2016

From members to values


You can set up drill-through access from OLAP or DMR members to parameters
expecting values. To do this, in the target report you must create a parameter using a
query item that represents business key values, such as primary keys. In relational data
sources, business keys uniquely identify the entries in each row of a table.
The target report may contain a parameter that expects values that do not match the
keys passed by source members. In this case, you can select a property value of the
member to pass, such as the caption property.
Before you set up member-to-value drill-through access, you must consult the modelers
who created the packages. Any PowerCubes involved must either have drill-through
enabled, or must have unique business keys throughout all levels in each dimension.
Consult with your Transformer modeler to determine whether this is the case. Ask the
modelers if the business keys passed by source members match the business keys in
the query item you want to use as the target parameter. If they do, create a parameter
in the target report using this query item.

© Copyright IBM Corp. 2007, 2016 9-28


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 9 Set up drill-through reports

Demonstration 3
Drill through from members to a parameter expecting a business key

Set up drill-through reports © Copyright IBM Corporation 2016

Demonstration 3: Drill through from members to a parameter expecting a business key

© Copyright IBM Corp. 2007, 2016 9-29


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 9 Set up drill-through reports

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.

© Copyright IBM Corp. 2007, 2016 9-30


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 9 Set up drill-through reports

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.

© Copyright IBM Corp. 2007, 2016 9-31


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 9 Set up drill-through reports

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:

13. Save this report as 09_Demonstration3_Target in Team content >


Student_B6061.

© Copyright IBM Corp. 2007, 2016 9-32


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 9 Set up drill-through reports

Task 3. Create a package-based drill-through definition.


1. From the sidebar, click New > Other > Drill-Through-Definitions.
2. Navigate to Team Content > Samples > Models > GO data warehouse
(analysis), and then click New Drill-through Definition.
3. In the Name box, type 09 Demonstration 3 Drill-through Definition, and then
click Next.
You will set the scope so users can drill through only from cells that have a
specific order method as their context.
4. Click Set the scope, expand the Sales and Marketing (analysis) folder >
Sales namespace > Order method dimension, click the Order method type
level, and then click OK.
5. Click Set the target, navigate to Team Content > Student_B6061, click
09_Demonstration3_Target, and then click OK.
When you click Set the target, if prompted to select a report or a PowerCube
package, click Select a report.
6. Click Next.
Since you created a parameter that expects business key values, in the Type
column for the prompt, you can see that this prompt expects a Number value:

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.

© Copyright IBM Corp. 2007, 2016 9-33


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 9 Set up drill-through reports

Task 4. Create a source report and test the drill-through


definition.
1. Create a new List report, using the Team content > Samples > Models > GO
data warehouse (analysis) package.
2. From the Data pane, navigate to Sales and Marketing (analysis) > Sales, and
add the following items to the new list:
• Order method dimension > Order method hierarchy > Order method type.
• Sales fact measure dimension > Quantity.

3. In the Navigate pane, click Report.


4. On the Properties pane, in the DATA section, ensure that Package-based
drill through source is set to Yes.
5. In the RUNNING & VALIDATING section, set Run with full interactivity to No.
6. Run the report in HTML.
The report appears as follows:

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.

© Copyright IBM Corp. 2007, 2016 9-34


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 9 Set up drill-through reports

8. Click 09 Demonstration 3 Drill-through Definition.


IBM Cognos Analytics drills through to target report as follows:

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.

© Copyright IBM Corp. 2007, 2016 9-35


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 9 Set up drill-through reports

Demonstration 4
Drill through from member captions to values

Set up drill-through reports © Copyright IBM Corporation 2016

Demonstration 4: Drill through from member captions to values

© Copyright IBM Corp. 2007, 2016 9-36


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 9 Set up drill-through reports

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.

© Copyright IBM Corp. 2007, 2016 9-37


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 9 Set up drill-through reports

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.

© Copyright IBM Corp. 2007, 2016 9-38


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 9 Set up drill-through reports

Task 2. Create the source report.


1. Create a new 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 line
• Columns: Order method dimension > Order method hierarchy > Order
method type
• Measures: Measures dimension > Revenue

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.

© Copyright IBM Corp. 2007, 2016 9-39


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 9 Set up drill-through reports

7. In the Navigate pane, click Report.


8. From the Properties pane, in the RUNNING & VALIDATING section, change
Run with full interactivity to No.
9. Run the report in HTML.
The report runs and appears in IBM Cognos Analytics. You can drill through
from items in the rows.
10. In the rows, click Personal Accessories.
IBM Cognos drills through to the 09_Demonstration4_Target report and a
section of the report appears as follows:

11. At the bottom of the report, click Bottom.


Observe that the report contains only data for the Personal Accessories product
line. Drill-through access works as expected.
12. Close the rendered report tab, and then Sign off as Branka Hirsch.
13. Close the Web browser.
Results:
You set up drill-through access from members in a source report to a target
parameter expecting values. You specified that the members in the level that
users drill through from will pass caption values instead of business keys to
the target parameter.

© Copyright IBM Corp. 2007, 2016 9-40


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 9 Set up drill-through reports

Drilling to different data sources

Product line Target Parameters Created Using


Dimension in the Values
OLAP Source Model

Set up drill-through reports © Copyright IBM Corporation 2016

Drilling to different data sources


You can let users drill down on members in a hierarchy, and then drill through to a
target report created from a different data source. If the target parameter expects
values, the author of the target report must create a separate parameter for each level
in the source hierarchy that users can drill through from.
To ensure users are not prompted to enter parameter values when they drill through,
each target parameter must be optional. This ensures users are not prompted to
provide values for unanswered prompts when they drill through.
In order for drill-down behavior and drill-through access to succeed, the following
requirements must be met: a) the level structure in the hierarchy that you want users to
drill through from matches the level structure in the hierarchy that you use for the target
parameter; and b) the business keys for the all members in the source hierarchy match
the keys for the equivalent metadata items in the target hierarchy.

© Copyright IBM Corp. 2007, 2016 9-41


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 9 Set up drill-through reports

Drill through from dates

This member
represents a
date range

This target parameter expects a date range

Set up drill-through reports © Copyright IBM Corporation 2016

Drill through from dates


Some OLAP data structures have time categories that represent date ranges. IBM
Cognos PowerCube is an example, as shown above.
To set up drill-through access from date members, the target parameter must expect a
date range or a date-time range. You can use the in_range operator to ensure that the
target parameter expects the correct value type.

© Copyright IBM Corp. 2007, 2016 9-42


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 9 Set up drill-through reports

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

Set up drill-through reports © Copyright IBM Corporation 2016

Unit summary

© Copyright IBM Corp. 2007, 2016 9-43


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Unit 9 Set up drill-through reports

© Copyright IBM Corp. 2007, 2016 9-44


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


End-to-end exercise

End-to-end exercise

IBM Cognos Analytics 11.0

© Copyright IBM Corporation 2016


Course materials may not be reproduced in whole or in part without the written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


U n i t 1 0 E n d - t o - e n d e xe r c i s e

© Copyright IBM Corp. 2007, 2016 10-2


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


U n i t 1 0 E n d - t o - e n d e xe r c i s e

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

© Copyright IBM Corp. 2007, 2016 10-3


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


U n i t 1 0 E n d - t o - e n d e xe r c i s e

• 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.

© Copyright IBM Corp. 2007, 2016 10-4


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


U n i t 1 0 E n d - t o - e n d e xe r c i s e

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])

© Copyright IBM Corp. 2007, 2016 10-5


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


U n i t 1 0 E n d - t o - e n d e xe r c i s e

• 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:

• Run the report in HTML.


• Select Australia at the prompt.
The results appear as follows:

• Close the rendered report tab.

© Copyright IBM Corp. 2007, 2016 10-6


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


U n i t 1 0 E n d - t o - e n d e xe r c i s e

Task 2. Add time to columns in report layout.


• Toolbox pane: Drag a Query calculation to the Columns drop zone as a Set
expression of the Time hierarchy.
• Set expression dialog box: Name the expression Current Year, and then create
and validate the following expression:
closingPeriod ([sales_and_marketing].[Time].[Time].[Year])
• Toolbox pane: Drag a Query calculation as a peer to the left of <Current
Year>, as a Set expression of the Time hierarchy.
• Set expression dialog box: Name the expression Quarters of Current Year,
and then create and validate the following expression:
children([Current Year])
• Toolbox pane: Drag a Query calculation as a peer to the right of <Current
Year>, as a Set expression of the Time hierarchy.
• Set expression dialog box: Name the Expression Total Previous Year, and
then create and validate the following expression:
prevMember ([Current Year])
The results appear as follows:

• Run the report in HTML.


• Select Australia at the prompt.
A section of the report appears as follows:

• Close the rendered report tab.

© Copyright IBM Corp. 2007, 2016 10-7


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


U n i t 1 0 E n d - t o - e n d e xe r c i s e

Task 3. Add promotional campaigns to report layout,


excluding regular sales, and aggregate the results.
• Toolbox pane: Drag a Query calculation to the Rows area of the report layout,
to nest as a child of <Retailer Names>, as a Set expression of the Promotions
hierarchy.
• Set expression dialog box: Name the expression Promotional Campaigns, and
then create and validate the following expression:
except ([sales_and_marketing].[Promotions].[Promotions].[Campaign],
[Regular sale])
Note that there are two arguments in this expression;
([sales_and_marketing].[Promotions].[Promotions].[Campaign] and [Regular
sale]. Regular sale is found in the Campaign > Members folder.

• Toolbox pane: Drag a Query calculation, as a peer to <Promotional


Campaigns>, as a Calculated member of the Promotions hierarchy.
• Calculated Member Expression dialog box: Name the expression
Aggregate(Promotional Campaigns), and then create and validate the
following expression:
aggregate (currentMeasure within set [Promotional Campaigns])
• Report layout: click Aggregate(Promotional Campaigns), in the Properties
pane under MISCELLANEOUS, click the Classes property, and then click the
ellipsis.
• Selected classes pane: click Crosstab member cell (calculated), and then
click the left arrow to remove it from the list.
• Global classes pane: double-click Crosstab member cell (inner total nested)
to add it to the Selected classes pane, and then click OK.
• Report layout: click Aggregate(Promotional Campaigns), click the ellipsis, and
then click Select Member Fact Cells.
You will format the cells to be consistent with a summary row.
• Properties pane: under MISCELLANEOUS, click the Classes property, and
then click the ellipsis.

© Copyright IBM Corp. 2007, 2016 10-8


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


U n i t 1 0 E n d - t o - e n d e xe r c i s e

• 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:

• Run the report in HTML.


• Select Australia at the prompt.
A section of the report appears as follows:

• Close the rendered report tab.

© Copyright IBM Corp. 2007, 2016 10-9


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


U n i t 1 0 E n d - t o - e n d e xe r c i s e

Task 4. Create and format a percent of total metric.


• 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 % of Total,
and then create and validate the following expression:
[Aggregate(Promotional Campaigns)]/[Total All Campaigns]
• Report layout:
• Click Total All Campaigns, click the toolbar ellipsis, and click Cut.
• Click % of Total, in the Properties pane under MISCELLANOUS, click the
Classes property, and then click the ellipsis.
• Selected classes pane:
• Click Crosstab member cell (calculated), click the left arrow to remove it
from the list
• Global classes pane: double-click Crosstab member cell (inner total
nested) to add it to the Selected classes pane, and then click OK.
• Report layout: Click % of Total, click the toolbar ellipsis, and then click Select
Member Fact Cells.
• Properties pane:
• Under DATA, click the box next to the Data Format property, click the
ellipsis, in the Format type list, click Percent, and then click OK.
You will format the cells of the % of Total row to be consistent with a summary
row.
• Under MISCELLANEOUS, click the Classes property, and then click the
ellipsis.

© Copyright IBM Corp. 2007, 2016 10-10


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


U n i t 1 0 E n d - t o - e n d e xe r c i s e

• Selected classes pane:


• Click Crosstab fact cell (calculated member), 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.
The results appear as follows:

• Run the report in HTML.


• Select Australia at the prompt.
A section of the report appears as follows:

• Close the rendered report tab.


Task 5. Filter out nulls.
• Toolbox pane: Drag a Query calculation, as a peer to <Promotional
Campaigns>, as a Set expression of the Promotions hierarchy.
• Set expression dialog box: Name the expression Non-null Promotional
Campaigns, and then create and validate the following expression:
filter ([Promotional Campaigns], tuple ([Current Year], [Revenue])<>null or
tuple ([Total Previous Year],[Revenue])<>null)

© Copyright IBM Corp. 2007, 2016 10-11


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


U n i t 1 0 E n d - t o - e n d e xe r c i s e

• 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:

• Run the report in HTML.


• Select Australia at the prompt.
A section of the report appears as follows:

• Close the rendered report tab.


Task 6. Order the Promotional Campaigns in descending
order by Revenue for the current year.
• Toolbox pane: Drag a Query calculation, as a peer to <Non-null Promotional
Campaigns>, as a Set expression of the Promotions hierarchy.

© Copyright IBM Corp. 2007, 2016 10-12


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


U n i t 1 0 E n d - t o - e n d e xe r c i s e

• Set Expression dialog box: Name the expression Ordered Non-null


Promotional Campaigns, and then create and validate the following expression:
order([Non-null Promotional Campaigns],tuple([Current Year],[Revenue]),
desc)
• Report layout: click <Non-null Promotional Campaigns>, click the toolbar
ellipsis, and then click Cut.
The results appear as follows:

• Run the report in HTML.


A section of the report appears as follows:

• Close the rendered report tab.


Task 7. Add a Slicer tree prompt for products.
• Navigate pane: Click the Query explorer tab, and then click Query1.
• Toolbox pane: Drag a Slicer member set object to the Slicer pane.
• Slicer member expression dialog box: Create and validate the following
expression:
[sales_and_marketing].[Products].[Products]->?Product?
• Validate by choosing Products at the prompt

© Copyright IBM Corp. 2007, 2016 10-13


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


U n i t 1 0 E n d - t o - e n d e xe r c i s e

• Run the report in HTML.


• Select Australia at the prompt.
A section of the results appear as follows:

• Close the rendered report tab.


Task 8. Add a chart to the report layout.
• Navigate pane: on the Page explorer tab, click Page1.
• Toolbox pane: Drag a Chart object to the report layout above the crosstab.
• Insert chart dialog box: In the Chart type pane, click Clustered Column with
3-D Effects, and then click OK.
• Chart layout: Click the background of the chart to select the chart object.
• Properties pane: Under DATA, change the Query property to Query1.
• Data pane > Data items tab: Add the following members to the column chart:
• Default measure (y-axis): Query1 > Revenue
• Series (primary axis): Query1 > Quarters of Current Year
• Categories (x-axis): Query1 > Aggregate(Promotional Campaigns)
• Toolbox pane: Drag a Query calculation, to the Series (primary axis) drop
zone above <#Quarters of Current Year#> as a peer, as a Set expression of
the Time hierarchy.
• Set expression dialog box: Name the expression Quarters of Previous Year,
and then create and validate the following expression:
children(prevMember([Current Year]))

© Copyright IBM Corp. 2007, 2016 10-14


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


U n i t 1 0 E n d - t o - e n d e xe r c i s e

• Run the report in HTML.


• Select Products at the prompt.
A section of the report appears as follows:

• Close the rendered report tab.


Task 9. Add a dynamic title to the report.
• Report layout: Click the text item in the title area of the report.
• Properties pane: Under TEXT SOURCE:
• Change the Source type property to Report expression.
• Click the box next to Report expression, and then click the ellipsis.
• Report expression dialog box: on the Parameters tab, drag Country to the
Expression Definition box, validate the expression to ensure there are no
errors, and then click OK.
• Toolbox pane: Drag a Text item to the left of <%ParamDisplay...%>.
• Text dialog box: Type Promotional Campaign Assessment: press the space
bar, and then click OK.
• Toolbar: Pick up the style of <%ParamDisplay...%>, and apply it to the header
text.

© Copyright IBM Corp. 2007, 2016 10-15


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


U n i t 1 0 E n d - t o - e n d e xe r c i s e

Task 10. Add a subtitle for the chart report.


• Toolbox pane:
• Drag a Block above the chart report object.
• Drag a Text item into the block, type Quarter by Quarter Comparison of
Promotional Sales for, press the space bar, and then click OK.
• Drag a Layout calculation object to the right of Quarter by Quarter
Comparison of Promotional Sales for.
• Report expression: Click the Parameters tab, and drag Product into the
Expression Definition pane to create the following expression:
ParamDisplayValue('Product')
• Report layout: Click Quarter by Quarter Comparison of Promotional Sales
for, and then Ctrl+click <%ParamDisplay...%>.
• Properties pane: Under MISCELLANOUS, change the Classes property to
Chart title.
Task 11. Add a subtitle for the crosstab report.
• Toolbox pane:
• Drag a Block above the crosstab.
• Drag a Text item into the new block, type Comparison of Promotional
Sales to All Sales for, press the space bar, and then click OK.
• Drag a Layout calculation object to the right of Comparison of Promotional
Sales to All Sales for.
• Report Expression dialog box: Create and validate the following expression:
ParamDisplayValue('Product')
• Report layout: Click Comparison of Promotional Sales to All Sales for,
Ctrl+click <%ParamDisplay.
• Properties pane: Under MISCELLANEOUS, change Classes to Chart title.
• Toolbox pane: Drag a Block object to the space below the Chart in the report
layout.
• Properties pane: Under POSITIONING, change the Size & overflow property
to have a height of 20 px.
• Report layout: Click in the background of the report page to select the page body.
• Toolbar pane: Click Center.

© Copyright IBM Corp. 2007, 2016 10-16


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


U n i t 1 0 E n d - t o - e n d e xe r c i s e

• Run the report in HTML


• Select Camping Equipment at the prompt.
The results appear as follows:

• Close the rendered report tab.

© Copyright IBM Corp. 2007, 2016 10-17


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


U n i t 1 0 E n d - t o - e n d e xe r c i s e

Task 12. Enable drilling and configure advanced behavior.


• Navigate pane: Click Report and open the Properties pane.
• Properties pane:
• Change Run with full interactivity to No.
• Change Drill-up and drill down to Yes.
• Run the report in HTML.
• Select Products and Australia at the prompts.
• Drill down on Canyon Mule Campaign.
Notice, that the resulting list of promotions is no longer sorted by current year
revenue, nor are null rows eliminated. Also, the total for Promotional Campaigns
shows all promotional campaigns, not just products sold during Canyon Mule
Campaign. You must configure member set structures and advanced drilling
behavior to preserve the calculations.
• Close the rendered report tab.
• Navigate pane: In the Query explorer tab, click Query1.
• Properties pane: Under DATA, change the Define member sets property to
Yes.
• Query work area: At the bottom, click the Member Sets tab.
• Data pane: From the Data items tab:
• Drag Promotional Campaigns to the work space.
• Drag Aggregate(Promotional Campaigns), Non-null Promotional
Campaigns, Ordered Non-null Promotional Campaigns, and % of Total,
onto Promotional Campaigns in the work area.
The items are nested under Promotional Campaigns.

© Copyright IBM Corp. 2007, 2016 10-18


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


U n i t 1 0 E n d - t o - e n d e xe r c i s e

• 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:

• Navigate pane: In the Page explorer tab, click Report.


• Properties pane:
• Ensure that Run with full interactivity is set to No.
• Double-click Advanced drill behavior, and then click the Advanced tab.
• Drill behavior dialog box:
• Click Promotional Campaigns, and then change the Drill-up behavior and
Drill-down behavior to Replace Expression.
• Change the Drill-up behavior and Drill-down behavior to Preserve for the
following items:
• Aggregate(Promotional Campaigns)
• Non-null Promotional Campaigns
• Ordered Non-null Promotional Campaigns
Now when you drill up or down, the expressions used to format, filter, and
aggregate promotional campaigns are not changed, while the underlying set of
Promotional Campaigns will be replaced by children or parents as the user drills
up and down.
In step 8, the % of Total calculation is added as a member set so that its drilling
behavior will be controlled and disabled. In step 13, you specifically do not
configure the advanced drilling behavior for % to Total so that the behavior
remains as default; by default, any defined member set will have drilling
disabled until specifically defined. The same functionality could be created by
disabling drill up and drill down on the first tab of Drill behavior dialog box. In that
case the member set for % of Total would not be needed.

© Copyright IBM Corp. 2007, 2016 10-19


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


U n i t 1 0 E n d - t o - e n d e xe r c i s e

• Run the report in HTML.


• Select Camping Equipment and Austrailia at the prompts.
• Click Canyon Mule Campaign to view drill down behavior.
• Close the rendered report tab.
Task 13. Create a report from relational data to provide a
drill-through target.
• Click Save to save your current report.
• Save As dialog box: In the Save as field, type End-to-End Exercise Source,
browse to Team content > Student_B6061 and then click Save.
• Create a new List report using Team content > Samples > Models > GO data
warehouse (query) package.
• Data pane: Expand the Sales and Marketing (query) folder > Sales (query)
namespace, and then add the following query items to the new list:
• Retailers: Retailer name
• Promotions: Campaign name
• Products: Product
• Sales Fact: Quantity, Revenue, Unit cost
The report layout appears 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.

© Copyright IBM Corp. 2007, 2016 10-20


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


U n i t 1 0 E n d - t o - e n d e xe r c i s e

• 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:

• Close the rendered report tab.


Task 15. Add the drill-through definition to the source report
and test the report.
• Welcome page: Open the End-to-End Exercise Source for editing.
• Report layout: In the crosstab, click <Retailer Names>.
• Toolbar: Click the ellipsis and then click Drill-Through Definitions.
• Drill-through definitions dialog box: Click New Drill-Through Definition.
• Target Report tab, click the ellipsis to select the target report, click End-to-
End Exercise Target, and then click Open.
• Parameters section, click the Edit button, and then in the Parameters dialog
box, from the Method list, click Pass data item value.
• From the Value list, click Retailer Names, and then click OK.
• Click OK to close the Drill-through definitions dialog box.

© Copyright IBM Corp. 2007, 2016 10-21


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


U n i t 1 0 E n d - t o - e n d e xe r c i s e

• Run the report in HTML.


• Select Camping Equipment and France at the prompts.
• In the bottom-right corner of the resulting crosstab report, click Page down,
and then click La bonne Forme.
The results appear as follows:

• Close the rendered report tab.


• Sign out as Branka Hirsh
• Close the Web browser.

© Copyright IBM Corp. 2007, 2016 10-22


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27


Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27
Thank you for taking a
class with us.
We look forward to working with you again soon.

Powered by TCPDF (www.tcpdf.org)


Name: David Lashbrook Email: enrollments@tcworkshop.com Indianapolis, IN 2020/01/27

You might also like