Sei sulla pagina 1di 476

IBM Cognos Report Studio:

Author Reports with


Multidimensional Data (v10.2)

Student Guide
Course Code: B5261

IBM Internal Enablement Purpose Only

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

IBM Cognos Report Studio: Author Reports


with Multidimensional Data (v10.2)

Licensed Materials Property of IBM

B5261

Copyright IBM Corp. 2007, 2012

ERC: 1.0

US Government Users Restricted Rights Use, duplication or


disclosure restricted by GSA ADP Schedule Contract with IBM
corp.

Published September 2012

IBM, the IBM logo, ibm.com and Cognos are trademarks of


international Business Machines Corp., registered in many
jurisdictions worldwide.
Other product and service names might be trademarks of IBM or
other companies.
Adobe and 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.

P-2

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

INSTRUCTOR

PREFACE

Contents
PREFACE........................................................................................................ P-1
CONTENTS........................................................................................................P-3
COURSE OVERVIEW .......................................................................................P-10
DOCUMENT CONVENTIONS ............................................................................P-12
WORKSHOPS ..................................................................................................P-13
YOUR FEEDBACK ...........................................................................................P-14
IBM PRODUCT HELP ......................................................................................P-15
INTRODUCTION.................................................................................INTRO-1
COURSE OBJECTIVES ...............................................................................INTRO-3
COURSE ROADMAP ..................................................................................INTRO-4
COURSE DESCRIPTION .............................................................................INTRO-5
ADDITIONAL TRAINING RESOURCES .......................................................INTRO-6
INTRODUCTION TO DIMENSIONAL REPORTING CONCEPTS .......1-1
OBJECTIVES .....................................................................................................1-3
DATA SOURCES AND MODEL TYPES ................................................................1-4
THE OLAP STRUCTURE ...................................................................................1-5
THE DIMENSIONAL STRUCTURE IN IBM COGNOS BI ......................................1-6
DIFFERENTIATE DATA ENTITIES ......................................................................1-7
WHAT IS A DIMENSIONAL QUERY?..................................................................1-8
THE DIMENSIONAL APPROACH TO QUERIES....................................................1-9
THE QUERY MODEL IN REPORT STUDIO ........................................................1-10
THE IBM COGNOS BI QUERY LANGUAGE .....................................................1-11
DATA ITEMS AND DATA ITEM PROPERTIES ...................................................1-12
IDENTIFY DIMENSIONAL EXPRESSIONS .........................................................1-13
DIFFERENTIATE FROM SQL AND MDX .........................................................1-14
DEMO 1: EXPLORE THE DIMENSIONAL DATA TREE ......................................1-15
THE IBM COGNOS BI REPORTING STUDIOS ..................................................1-27
REPORT AUTHORING STYLES ........................................................................1-28
APPLY REPORT AUTHORING STYLES .............................................................1-29
OTHER STUDIO REPORTS IN REPORT STUDIO ................................................1-30
SUMMARY ......................................................................................................1-31

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

P-3

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

INTRODUCTION TO DIMENSIONAL DATA IN REPORTS .................2-1


OBJECTIVES .....................................................................................................2-3
WHAT MAKES UP A MEMBER?........................................................................2-4
WHAT IS A MEMBER UNIQUE NAME?..............................................................2-5
WHAT MAKES UP A MUN? .............................................................................2-6
CHANGES THAT IMPACT A MUN .....................................................................2-7
DEMO 1: USE MEMBERS TO CREATE REPORTS ................................................2-8
DEMO 2: EXPLORE MUNS .............................................................................2-15
INSERT MEMBERS AND CHILDREN.................................................................2-19
SETS IN REPORT STUDIO ................................................................................2-20
CREATE SETS FOR MEMBERS .........................................................................2-21
TUPLES IN REPORT STUDIO ............................................................................2-22
AUTOMATICALLY CREATE SETS AND TUPLES ...............................................2-23
CREATE AN INDIVIDUAL TUPLE EASILY ........................................................2-24
MANUALLY CREATE SETS AND TUPLES ........................................................2-25
QUERY CALCULATIONS .................................................................................2-26
THE SET() FUNCTION .....................................................................................2-27
DEMO 3: USE THE SET() FUNCTION TO FOCUS YOUR REPORT.......................2-28
USE SET DEFINITIONS ....................................................................................2-34
THE TUPLE() FUNCTION .................................................................................2-35
DEMO 4: IDENTIFY SETS AND TUPLES IN REPORTS .......................................2-36
SUMMARY ......................................................................................................2-43
DIMENSIONAL REPORT CONTEXT ........................................................3-1
OBJECTIVES .....................................................................................................3-3
WHAT IS REPORT CONTEXT? ...........................................................................3-4
ROOT MEMBER ................................................................................................3-5
DEFAULT MEMBER ..........................................................................................3-6
CURRENT MEMBER ..........................................................................................3-9
DEFAULT MEASURE .......................................................................................3-10
CURRENT MEASURE ......................................................................................3-11
DEMO 1: USE THE DEFAULT MEASURE TO CREATE A SUMMARIZED
COLUMN IN A REPORT ...................................................................................3-13
SUMMARY ......................................................................................................3-20

P-4

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

INSTRUCTOR

PREFACE

FOCUS YOUR DIMENSIONAL DATA .......................................................4-1


OBJECTIVES .....................................................................................................4-3
HOW DO RELATIONAL DATA SOURCES BEHAVE? ..........................................4-4
HOW DO DIMENSIONAL DATA SOURCES BEHAVE? .........................................4-5
DMR - RELATIONAL OR DIMENSIONAL? .........................................................4-6
CREATE EFFICIENT DIMENSIONAL QUERIES....................................................4-7
FILTERING TECHNIQUES ..................................................................................4-8
USE DIMENSIONAL OBJECTS AND EXPRESSIONS .............................................4-9
THE EXCEPT() FUNCTION...............................................................................4-10
DEMO 1: FOCUS YOUR REPORT BY EXCLUDING MEMBERS OF A
DEFINED SET ..................................................................................................4-11
TOPCOUNT() AND BOTTOMCOUNT() ..............................................................4-16
TOPPERCENT() AND BOTTOMPERCENT()........................................................4-17
DEMO 2: CREATE A CROSSTAB REPORT SHOWING THE TOP
TWO RETAILERS ............................................................................................4-18
FILTER BASED ON MEASURE VALUES ...........................................................4-22
THE FILTER() FUNCTION ................................................................................4-23
DETAIL FILTERS .............................................................................................4-24
DEMO 3: COMPARE THE USE OF THE FILTER() FUNCTION TO A
DETAIL FILTER...............................................................................................4-25
SLICERS ..........................................................................................................4-38
SLICER EXAMPLE ...........................................................................................4-39
DEMO 4: FILTER DIMENSIONAL DATA USING SLICERS .................................4-40
PROMPT FOR DIMENSIONAL DATA ................................................................4-45
TREE PROMPTS ..............................................................................................4-46
DEMO 5: FOCUS YOUR DATA USING A TREE PROMPT...................................4-47
SUMMARY ......................................................................................................4-53
WORKSHOP 1: CREATE A SET USING A PROMPT AND THE EXCEPT()
FUNCTION ......................................................................................................4-54

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

P-5

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

CALCULATIONS AND DIMENSIONAL FUNCTIONS ...........................5-1


OBJECTIVES .....................................................................................................5-3
IBM COGNOS BI DIMENSIONAL FUNCTIONS ...................................................5-4
EXPLORE AVAILABLE COMPONENTS ...............................................................5-5
REUSE, PROMPTING, AND COMBINING IN DIMENSIONAL EXPRESSIONS ..........5-6
THE TOTAL AND AGGREGATE FUNCTIONS .......................................................5-7
AGGREGATE VALUES IN CROSSTABS ..............................................................5-8
SHOW EXCLUDED MEMBER TOTALS ...............................................................5-9
DEMO 1: SHOW TOTALS FOR THE TOP TWO PRODUCT LINES, EXCLUDED
MEMBERS, AND OVERALL TOTALS................................................................5-10
PERFORM ARITHMETIC OPERATIONS .............................................................5-18
DEMO 2: CREATE A PERCENT OF BASE CALCULATION .................................5-19
SORT DIMENSIONAL DATA ............................................................................5-25
RANK DIMENSIONAL DATA ...........................................................................5-26
DEMO 3: NEST DIMENSIONAL FUNCTIONS TO CREATE A DYNAMIC
BOTTOMPERCENT REPORT .............................................................................5-27
SUPPORT FOR MULTIPLE HIERARCHIES PER DIMENSION ..............................5-38
DEMO 4: CREATE A VARIANCE CALCULATION WITH MEMBERS FROM
DIFFERENT HIERARCHIES OF THE SAME DIMENSION ....................................5-39
COMMON ERRORS IN EXPRESSIONS ...............................................................5-43
WHAT IS COERCION? .....................................................................................5-44
SUMMARY ......................................................................................................5-45
FUNCTIONS FOR NAVIGATING DIMENSIONAL HIERARCHIES....6-1
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
DEMO 1: CREATE A CROSSTAB REPORT AND SHOW DESCENDANTS OF THE
PRODUCTS HIERARCHY ...................................................................................6-8
RETURN ANCESTOR MEMBERS ......................................................................6-14
RETURN COUSIN MEMBERS ...........................................................................6-15

P-6

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

INSTRUCTOR

PREFACE

SUMMARY ......................................................................................................6-16
WORKSHOP 1: DETERMINE THE PRODUCT LINE FOR A PRODUCT,
USING THE ANCESTOR() FUNCTION ...............................................................6-17
WORKSHOP 2: CREATE A DYNAMIC CROSSTAB REPORT WITH COMBINED
DIMENSIONAL FUNCTIONS.............................................................................6-23
RELATIVE FUNCTIONS ..............................................................................7-1
OBJECTIVES .....................................................................................................7-3
USE FUNCTIONS TO NAVIGATE DATA .............................................................7-4
DIMENSIONAL STRUCTURES (REVIEW) ...........................................................7-5
USE RELATIVE FUNCTIONS TO NAVIGATE DATA ............................................7-6
DEMO 1: USE FAMILY AND RELATIVE DIMENSIONAL FUNCTIONS TO
FOCUS REPORTS ...............................................................................................7-7
USE RELATIVE TIME FUNCTIONS TO NAVIGATE DATA (OVERVIEW)............7-14
THE CLOSINGPERIOD FUNCTION ....................................................................7-15
THE PERIODSTODATE FUNCTION ..................................................................7-16
DEMO 2: USE RELATIVE TIME DIMENSIONAL FUNCTIONS TO FOCUS
REPORTS ........................................................................................................7-17
THE PARALLELPERIOD FUNCTION .................................................................7-26
DEMO 3: CREATE A PERIODS-TO-DATE REPORT AND COMPARE TO THE
PREVIOUS YEAR.............................................................................................7-27
THE LASTPERIODS FUNCTION ........................................................................7-37
DEMO 4: CREATE A REPORT THAT SPANS THE PAST SIX MONTHS
BASED ON A SELECTED MONTH ....................................................................7-38
SUMMARY ......................................................................................................7-42
WORKSHOP 1: CREATE A DASHBOARD REPORT TO COMPARE
VARIOUS TIME PERIODS ................................................................................7-43

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

P-7

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

ADVANCED DRILLING TECHNIQUES AND MEMBER SETS ............8-1


OBJECTIVES .....................................................................................................8-3
WHAT IS DRILLING?.........................................................................................8-4
DEFAULT DRILL UP AND DOWN BEHAVIOR ....................................................8-5
MEMBERS WITHIN SAME HIERARCHY .............................................................8-7
DEMO 1: EXAMINE DEFAULT DRILLING BEHAVIOR ........................................8-8
CASES FOR OVERRIDING DEFAULT ................................................................8-15
DEMO 2: CONFIGURE ADVANCED DRILL BEHAVIOR .....................................8-16
DEFINE MEMBER SET STRUCTURES ................................................................8-23
WHEN EXPLICIT MEMBER SETS ARE NEEDED ...............................................8-24
INDEPENDENT DRILL UP AND DOWN.............................................................8-25
DEMO 3: ENABLING INDEPENDENT DRILLING ON MEMBERS OF THE
SAME HIERARCHY .........................................................................................8-26
BIND REPORT EXPRESSIONS ..........................................................................8-33
BIND REPORT EXPRESSIONS (CONT'D)...........................................................8-34
DEMO 4: PRESERVE ORDER WHEN DRILLING UP OR DOWN .........................8-35
SYNCHRONIZED DRILL UP AND DOWN WITH MULTIPLE QUERIES ................8-43
DEMO 5: SYNCHRONIZED DRILL UP AND DOWN BEHAVIOR .........................8-44
APPLY ONE FUNCTION TO MEMBER SETS .....................................................8-49
DEMO 6: APPLY A SINGLE FUNCTION TO MULTIPLE MEMBER SETS .............8-50
SUMMARY ......................................................................................................8-58
WORKSHOP 1: CREATE A REPORT WITH DRILLABLE
COMPLEX FUNCTIONS ....................................................................................8-59

P-8

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

INSTRUCTOR

PREFACE

SET UP DRILL-THROUGH REPORTS ......................................................9-1


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
DEMO 1: SET UP MEMBER-TO-MEMBER DRILL-THROUGH ACCESS ..............9-10
DRILL DOWN THEN DRILL THROUGH ............................................................9-18
DEMO 2: LET USERS DRILL DOWN AND THEN DRILL THROUGH ..................9-19
DRILL THROUGH TO DIFFERENT DATA SOURCES ..........................................9-27
MEMBER-TO-MEMBER ...................................................................................9-29
FROM OLAP MEMBERS TO DMR MEMBERS.................................................9-30
FROM MEMBERS TO VALUES .........................................................................9-31
DEMO 3: DRILL THROUGH FROM MEMBERS TO A PARAMETER
EXPECTING A BUSINESS KEY .........................................................................9-32
DEMO 4: DRILL THROUGH FROM MEMBER CAPTIONS TO VALUES ...............9-40
DRILLING TO DIFFERENT DATA SOURCES .....................................................9-46
DRILL THROUGH FROM DATES ......................................................................9-47
SUMMARY ......................................................................................................9-48
END-TO-END WORKSHOP .......................................................................10-1
END-TO-END WORKSHOP ..............................................................................10-3

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

P-9

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Course Overview
Course Overview
IIBM Cognos Report Studio: Author Reports with Multidimensional
Data (v10.2) is an advanced two-day, instructor-led course in which
professional report authors build on their experience with Report Studio
by applying dimensional techniques to reports. Through interactive
demos and workshops, students will learn how to author reports that
navigate and manipulate dimensional data structures using specific
dimensional functions and features available in Report Studio.

Intended Audience
This course is intended for professional report authors working with
dimensional data sources and who want to take advantage of
dimensional functions and features in Report Studio to create complex
dimensional reports.

P-10

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

INSTRUCTOR

PREFACE

Topics Covered
Topics covered in this course include:
Compare dimensional and relational data sources
Understand dimensional concepts and reporting styles
Create reports using dimensional data items such as members, levels,
and hierarchies
Focus reports using dimensional techniques such as edge filters,
slicers, and filter functions
Navigate dimensional data structures using functions to find related
members or comparison time periods
Create sophisticated measure calculations
Understand totals and aggregation
Analyze reports with drill-up and drill-down techniques
Configure advanced drilling behavior to support complex calculations
and dashboard reports
Set up drill-through access from one data source to another

Course Prerequisites
Attend the IBM Cognos Report Studio: Author Professional Reports
Fundamentals (v10.2) course
Knowledge of your business requirements
Experience using basic Windows and Web functionality

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

P-11

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

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 demo and workshop


step-by-step solutions to indicate either:
actionable items
(Point to Sort, and then click Ascending.)
text to type or keys to press
(Type Sales Report, and then press Enter.)
UI elements that are the focus of attention
(In the Format pane, click Data)

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.

P-12

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

INSTRUCTOR

PREFACE

Workshops
Workshop Format
Workshops are designed to allow you to work according to your own
pace. The workshops are structured as follows:
The Business Question Section
The first page of each workshop presents a business-type question
followed by a series of steps. These steps provide additional information
to help guide you through the workshop. Within each step, there may be
numbered questions relating to the step. Solve the tasks by using the
skills you learned in this module and in previous ones. If you need more
assistance, you can refer to the Task Table section that provides more
detailed instruction.
The Task Table Section
The second page of the workshop is a Task Table that presents the
question as a series of numbered tasks to be accomplished. The first
column in the table states the task to be accomplished. The second
column, "Where to Work", indicates the area of the product to work in.
Finally, the third column provides some hints that may help you complete
the workshop. If you need more assistance to complete the workshop,
please refer to the Step-by-Step Instructions at the end of the workshop.
The Workshop Results Section
This section will contain a screen capture(s) of interim or final results
and/or answers to the questions asked in the Business Question section.
The Step-by-Step Section
The Step-by-Step instructions for completing all of the tasks are located
at the end of the workshop following the Workshop Results section. Each
task in the Task Table is expanded into numbered steps, scripted like the
demos.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

P-13

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Your Feedback
Your feedback is important and valuable. We are interested in your
comments or questions.
Please address them to:
Attn: Senior Manager, Customer Education
Email Address: Cognos.Education@ca.ibm.com

P-14

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

INSTRUCTOR

PREFACE

IBM Product Help


Help type

When to use

Location

Taskoriented

You are working in the product and


you need specific task-oriented help.

IBM Product - Help link

Books for
Printing
(.pdf)

You want to use search engines to


Start/All Programs/IBM
find information. You can then print Product/Documentation
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
Web

You want to access any of the


following:

Training and Certification Web http://www01.ibm.com/software/data/


site
education/cognos.html
http://www Online support
947.ibm.com/support/entry
/portal/Overview/Software
/Cognos/Cognos_Business
_Intelligence_and_Financial
_Performance_Management
http://www.ibm.com
IBM Web site

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

P-15

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

P-16

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

Intro

Introduction
IBM Cognos BI

2012 IBM Corporation

IBM Internal Enablement Purpose Only

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Intro-2

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

INTRODUCTION

Course Objectives
At the end of this course, you should be able to:
understand dimensional concepts and reporting
styles
create reports using dimensional data items
focus reports using dimensional techniques
navigate dimensional data structures using
functions
create measure calculations
configure advanced drilling behavior to support
complex calculations
2012 IBM Corporation

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

Intro-3

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Introduction to Dimensional Reporting Concepts


Introduction to Dimensional Data in Reports
Dimensional Report Context
Focus Your Dimensional Data
Calculations and Dimensional Functions

IBM Cognos Report Studio:


Author Reports with Multidimensional Data (v10.2)
2012 IBM Corporation

Intro-4

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

INTRODUCTION

Functions for Navigating Dimensional Hierarchies


Relative Functions
Advanced Drilling Techniques and Member Sets
Set Up Drill-through Reports
End-to-End Workshop

IBM Cognos Report Studio: Author Reports with


Multidimensional Data (v10.2)
2012 IBM Corporation

IBM Cognos Report Studio: Author Reports with Multidimensional Data (v10.2) is an
advanced two-day, instructor-led course in which professional report authors build on
their experience with Report Studio by applying dimensional techniques to reports.
Through interactive demos and workshops, students will learn how to author reports
that navigate and manipulate dimensional data structures using specific dimensional
functions and features available in Report Studio.
Intended Audience: Professional Report Authors working with dimensional data
sources
Prerequisites:
IBM Cognos Report Studio: Author Professional Reports Fundamentals (v10.21)
public classroom course or online instructor-led
Knowledge of your business requirements
Experience using basic Windows and Web functionality

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

Intro-5

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Additional Training Resources


Bookmark IBM Cognos Education
http://www.ibm.com/cognos/training 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 Cognos Certification program
other resources that will enhance your success with
IBM Cognos software
2012 IBM Corporation

Intro-6

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

Introduction to Dimensional
Reporting Concepts
IBM Cognos BI

2012 IBM Corporation

IBM Internal Enablement Purpose Only

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

1-2

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

INTRODUCTION TO DIMENSIONAL REPORTING CONCEPTS

Objectives
At the end of this module, you should be able to:
identify different data sources and models
investigate the OLAP dimensional structure
identify dimensional data items and expressions
differentiate the IBM Cognos BI query language
from SQL and MDX
differentiate relational and dimensional report
authoring styles

2012 IBM Corporation

Custom Courses:
Participants should have taken the IBM Cognos Report Studio: Author Professional Reports Fundamentals (v10.2).
Additional Notes:
The terms multidimensional and dimensional can be used interchangeably. For consistency and simplification, the term
dimensional is used throughout the course.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

1-3

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Data Sources and Model Types


You can work with both relational and dimensional
data sources in IBM Cognos BI.
To support these data sources, there are three model
types:
relational
dimensionally modeled relational (DMR)
OLAP

2012 IBM Corporation

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 the IBM Cognos BI reporting studios, the metadata from DMR and OLAP models
is shown in a dimensional structure comprised of dimensions, hierarchies, and
measures.

1-4

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

INTRODUCTION TO DIMENSIONAL REPORTING CONCEPTS

The OLAP Structure


Fax
Telephone
Mail
E-Mail
Web

Members

Members
Camping Equipment
Golf Equipment

Cell Web/Golf Eq./ 2005-Q4


Outdoor Protection

Order Methods

Mountaineering
Equipment

Dimension
Jan

Feb

Q1

...

Q2
2005

Personal
Accessories

Products

...

2006

...

Hierarchy/Levels

Start
April 1

2005 Q1

Q2

Q3

Q4

Time

End
June 30

Attributes

2012 IBM Corporation

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)

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

1-5

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

The Dimensional Structure in IBM Cognos BI


Dimension

Hierarchy

Level
Member
Child
Members

<#Year#>

<#Year#>

<#Insect Repellents#> <#1234#>

Quantity

<#1234#>

<#Sunscreen#>

<#1234#>

<#1234#>

Members used as data items


for a report

Attribute
2012 IBM Corporation

Report Studio, Analysis Studio, and Workspace Advanced show members in their
metadata trees and let you work directly with the members as report data items. Query
Studio does not show members in its metadata tree, although you can still use it to
query dimensional data sources.

Report Studio, Analysis Studio and Workspace Advanced are termed "member-aware". Query Studio is not "member
aware".
IBM Cognos 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.

1-6

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

INTRODUCTION TO DIMENSIONAL REPORTING CONCEPTS

Differentiate Data Entities


OLAP/DMR

Relational

Product
TrailChef Water Bag

Members

TrailChef Canteen
TrailChef Kitchen Kit

Product
Aloe Relief
Astro Pilot
Auto Pilot

Values

2012 IBM Corporation

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.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

1-7

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

What is a Dimensional Query?


A dimensional query in IBM Cognos BI:
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
2012 IBM Corporation

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.

1-8

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

INTRODUCTION TO DIMENSIONAL REPORTING CONCEPTS

The Dimensional Approach to Queries


The most common presentation of dimensional data is
the crosstab.

Expression

Expression
Quantity

Expression
Fax

Mail

Web

Special

Camping Equipment

413958

348058

19230179

203528

Mountaineering Equipment

292408

81259

7642306

93856

Personal Accessories

359414

115208

31043721

117758

2012 IBM Corporation

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.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

1-9

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

The Query Model in Report Studio


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

2012 IBM Corporation

Report Studio 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.

1-10

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

INTRODUCTION TO DIMENSIONAL REPORTING CONCEPTS

The IBM Cognos BI Query Language


Report Studio lets you 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 BI dimensional functions in
expressions
children([Asia Pacific])
Dimensional expression using
IBM Cognos BI query language
2012 IBM Corporation

You can use the IBM Cognos BI 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 BI query language. The IBM Cognos BI query language is then converted at
run time to the appropriate vendor-specific language and syntax (MDX or SQL).

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

1-11

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Data Items and Data Item Properties

2012 IBM Corporation

When you use the Report Studio 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 expressions for data items instead of the
extended data items objects, you can set the default in the Tools menu.

In 8.3, 8.4, and 10.1, the preferred and default method of adding data items to reports is with these new extended data
items. To return to pre-8.3 behavior and use the generated expressions, go to Tools > Options > Report and clear the
Always create extended data items for new reports check box.
All demos and workshops in this course use the default setting.

1-12

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

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]

2012 IBM Corporation

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]

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

1-13

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Differentiate from SQL and MDX


SQL
used for relational data sources
MDX
used for OLAP data sources
IBM Cognos BI query language
used by report authors in Report Studio
converted to MDX or SQL at runtime

2012 IBM Corporation

It is important to understand the difference between the various query languages. As an


author using Report Studio, you will use IBM Cognos BI query language. It will be
automatically converted at run time to the vendor-specific MDX or SQL.

1-14

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

INTRODUCTION TO DIMENSIONAL REPORTING CONCEPTS

Demo 1
Explore the Dimensional Data Tree

2012 IBM Corporation

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

1-15

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Demo 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.
Task 1. Using a DMR data source, identify reporting objects in
the data tree.
1.
2.
3.

4.

Start your internet browser, in the address box, type


http://localhost:88/ibmcognos, and then press Enter.
On the Log on screen, in the User ID box, type brettonf, in the Password
box, type Education1, and then click OK.
On the IBM Cognos Welcome page, click Author advanced reports, and
then on the Select a package page, click Samples\Models\GO Sales
(analysis) package.
On the IBM Cognos Report Studio page, click Create new, and then
double-click Crosstab.

Task 1, step 2: Throughout this course, you will log on as Frank Bretton (User ID brettonf, Password Education1), a
professional report author. At the end of each module, in the last demo or workshop, you will be instructed to log off. You
do not have to log off if you will be doing the next module immediately; you should log off as a best practice if you are
finished working with Report Studio/IBM Cognos Connection for the day. The logging off process is mentioned at the
end of each module.

1-16

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

INTRODUCTION TO DIMENSIONAL REPORTING CONCEPTS

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 Report Studio 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 by switching between the

5.

and the Members tree view


on the Source tab. For
Metadata tree view
now, you will work in the default view.
Right-click the background of the Source tab, and then click Package Tree
Settings.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

1-17

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

6.

In the Settings section, clear the Members and the Members for each level
check boxes, and then click OK.
The tree displays levels and member properties.
7. Click + to expand the Sales (analysis) namespace.
It contains measures and dimensions.
8. Expand the Products dimension.
It contains the Products hierarchy.
9. 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.
10. 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.
11. Repeat steps 8 to 10 to explore the Time dimension within the Sales
(analysis) namespace.
What differences are there?
12. 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.

1-18

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

INTRODUCTION TO DIMENSIONAL REPORTING CONCEPTS

Task 2. Use the highest level in a hierarchy to create a report.


1.

2.

3.

4.

On the Source tab, 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.
On the Source tab, 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.
In the Properties dialog box, click Close, and then 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.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

1-19

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

5.

6.

On the toolbar, click Run Report


.
The report appears in IBM Cognos Viewer 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.
Close IBM Cognos Viewer.

Task 3. Use a level below the highest level in a hierarchy to


create a report.
1.
2.

3.

1-20

In the columns of the report layout, click <#Time#>, and then from the
toolbar, click Delete.
On the Source tab, from the Products dimension\Products hierarchy, drag
the Product line level to the Rows drop zone above <#Products#> as a
peer, and then from the Time hierarchy, drag the Year level to the Columns
drop zone.
On the Source tab, 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].

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

INTRODUCTION TO DIMENSIONAL REPORTING CONCEPTS

4.

5.

Click Close, and then on the toolbar, click Run Report.


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.
Close IBM Cognos Viewer.

Task 4. Use a hierarchy to create a report.


1.
2.

3.

In the report layout, click <#Product line#>, Ctrl+click <#Products#>, and


then on the toolbar click Delete.
On the Source tab, from the Products dimension, drag the Products
hierarchy to the Rows drop zone.
The Insert Hierarchy dialog box appears.
Accept the default selection of Root members, and then click OK.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

1-21

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

4.

5.
6.

On the Source tab, right-click the Products hierarchy, and then click
Properties.
The expression in the Ref field appears as follows:
[Sales (analysis)].[Products].[Products]
In the Properties dialog box, click Close.
In the report layout, click <#Products#>, and then in the Properties pane,
scroll to the Data Item section.
The Data Item section of the Properties pane appears as follows:

The data item properties indicate that the Products hierarchy will be used as a
Member Set in the report.

1-22

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

INTRODUCTION TO DIMENSIONAL REPORTING CONCEPTS

7.

8.
9.
10.
11.

12.
13.
14.

Click Run Report.


The results appear as follows:

The result is similar to that shown in step 5 from Task 2. 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.
Close IBM Cognos Viewer.
In the report layout, click <#Products#>, and then on the toolbar, click
Delete.
On the Source tab, from the Products dimension, drag the Products
hierarchy to the Rows drop zone.
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.
In the report layout, click <# Products#>, in the Properties pane, under
General, click the Level Indentation property, and then click the ellipsis.
In the Level Indentation dialog box, in the Indentation length box type 15.
In the Direction section, under Indent towards the right, in the Start after
the following level box, type 1, and then click OK.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

1-23

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

15. On the toolbar, click Run Report.


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 IBM Cognos Viewer.
Task 5. Use an attribute to create a report.
1.
2.
3.

4.

1-24

In the report layout, ensure that <#Products#> is selected, and then from the
toolbar, click Delete.
On the Source tab, drag the Product line level to the Rows drop zone.
On the Source tab, 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.
In the Insert Member Property dialog box, accept the default Insert property
only option, and then click OK.

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

INTRODUCTION TO DIMENSIONAL REPORTING CONCEPTS

5.

On the rows edge of 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.
.

6.

On the toolbar, click Unlock (currently locked)

7.

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.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

1-25

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

8.

On the toolbar, click Lock (currently unlocked)


report.
The results appear as follows:

, and then run the

The Product line code attribute is nested for each member of the Product line
level.
9. Close IBM Cognos Viewer, and then close Report Studio without saving the
report.
10. Log off of IBM Cognos Connection.
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.

Task 5, step 10: Do not log off of IBM Cognos Connection if you are advancing to the next module today.

1-26

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

INTRODUCTION TO DIMENSIONAL REPORTING CONCEPTS

The IBM Cognos BI Reporting Studios


Query Studio
Analysis Studio
Workspace Advanced
Report Studio

2012 IBM Corporation

Use Query Studio for ad hoc querying with little formatting. Query Studio is focused
on the relational model types and relational concepts.
Use Analysis Studio for deep comparative analysis. Analysis Studio supports only
dimensional model types.
Use Workspace Advanced to create self-service reports for analysis of business
performance. You can develop reports using the report layout, live data, or a limited set
of data.
Use Report Studio to author professional, statement-style reports. Report Studio
supports both relational and dimensional model types.

This slide briefly reviews the reporting studios. This should be review from the IBM Cognos Report Studio: Author
Professional Reports Fundamentals (v10.1) course.
This course focuses on dimensional capabilities in Report Studio.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

1-27

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

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
2012 IBM Corporation

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.

1-28

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

INTRODUCTION TO DIMENSIONAL REPORTING CONCEPTS

Apply Report Authoring Styles

Data Source

Authoring
Style

Relational

Relational

DMR

Dimensional

OLAP

2012 IBM Corporation

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.
* 1) Be careful using relational authoring style with OLAP data sources, or using
dimensional authoring style with DMR data sources. 2) 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.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

1-29

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Other Studio Reports in Report Studio


You can open Query Studio, Analysis Studio and
Workspace Advanced reports in Report Studio to:
identify and learn more about the dimensional and
relational style authoring techniques applied in
these reports
apply style and augment the reports

2012 IBM Corporation

Because of the interdependent nature of expressions in an Analysis Studio report, you


should not use it as a starting point for your report in Report Studio. Build a new report
in Report Studio, based on what you found in the Analysis Studio report.

1-30

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

INTRODUCTION TO DIMENSIONAL REPORTING CONCEPTS

Summary
At the end of this module, you should be able to:
identify different data sources and models
investigate the OLAP dimensional structure
identify dimensional data items and expressions
differentiate the IBM Cognos BI query language
from SQL and MDX
differentiate relational and dimensional report
authoring styles

2012 IBM Corporation

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

1-31

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

1-32

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

Introduction to
Dimensional Data in Reports
IBM Cognos BI

2012 IBM Corporation

IBM Internal Enablement Purpose Only

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

2-2

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

INTRODUCTION TO DIMENSIONAL DATA IN REPORTS

Objectives
At the end of this module, you should be able to:
work with members
identify sets and tuples in Report Studio

2012 IBM Corporation

Some topics are review because they have been previously covered in the IBM Cognos Report Studio: Author
Professional Reports Fundamentals (v10.2) 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 modules.
Participants should have taken the IBM Cognos Report Studio: Author Professional Reports Fundamentals (v10.2)
course.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

2-3

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

What Makes Up a Member?


Data source table
Product
Code

Member
source

Product
Name

Description

Color

TrailChef
Water Bag

Lightweight,
collapsible
bag to carry
liquids easily

Blue
and red

Feb 15, 1995

TrailChef
Canteen

Aluminum
canteen that
holds 2 liters

Silver

Feb 15, 1995

Member
source
Member
key

Introduction
Date

Attributes

Member
caption

2012 IBM Corporation

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

2-4

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

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

2012 IBM Corporation

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.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

2-5

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

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]

2012 IBM Corporation

MUN formats are dependent on the data source.

2-6

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

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
2012 IBM Corporation

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.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

2-7

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Demo 1
Use Members to Create Reports

2012 IBM Corporation

2-8

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

INTRODUCTION TO DIMENSIONAL DATA IN REPORTS

Demo 1: Use Members to Create Reports


Purpose:
Because Report Studio lets us use members to create reports, you
will navigate an IBM Cognos 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:
User/Password:
Studio:
Package:
Report type:
Namespace:

http://localhost:88/ibmcognos
brettonf/Education1
Report Studio
Public Folders\Samples_PowerCube\Cubes\Sales and
Marketing (cube)
Crosstab
Sales (analysis)

Task 1. Identify members in the dimensional data tree.


1.
2.
3.

On the toolbar click New, without saving the previous report, and then doubleclick Crosstab.
On the Source tab, right-click the background area, and then click Package
Tree Settings.
Ensure that the Package Tree Settings check boxes are all selected as follows.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

2-9

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

4.
5.

Click OK.
On the Source tab, 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.
6. 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
hierarchys Members folder.
7. 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.
8. Under the Products level\Members folder, expand the Products member.
Members from the next level in the hierarchy, Product line, appear.
9. Expand the Camping Equipment member.
Members at the Product type level for the Camping Equipment member
appear.
10. Expand the Tents member.
Members at the Product level for the Tents member appear.

Task 1, step 7: 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.

2-10

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

INTRODUCTION TO DIMENSIONAL DATA IN REPORTS

11. 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.
12. Under the Product line level\Members folder, expand the Camping
Equipment member and 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.
13. 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?
14. 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]

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

2-11

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

15. Repeat step 14 in the Products level, for 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.
, expand
16. On the Source tab, click View Members Tree
Products\Camping Equipment\Tents, and 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.
17. On the Source tab, click View Metadata Tree

Task 2. Create a report using levels.


1.

2.
3.

2-12

On the Source tab, 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.
On the Source tab, expand the Time dimension and the Time hierarchy, and
then drag the Year level to the Columns drop zone.
Drag the Month level to columns under <#Year#>.
Month is nested as a child of Year.

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

INTRODUCTION TO DIMENSIONAL DATA IN REPORTS

4.

5.

On the Source tab, expand the Measures dimension, drag the Revenue
measure to the Measures drop zone, and then on the toolbar, click Run
Report.
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.
Close IBM Cognos Viewer.

Task 3. Create a report using members.


1.
2.

3.

Create a new crosstab report without saving the previous report.


On the Source tab, expand the Time dimension\Time hierarchy\Year
level\Members folder (under Year), click 2011, and then Ctrl+click 2012.
The members 2011 and 2012 are selected.
Drag the items to the Columns drop zone.

Task 2, step 4: When creating reports with levels, a level may have thousands of members, and this would impact the
report output.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

2-13

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

4.
5.

6.

7.

8.

On the Source tab, expand 2012, and then expand 2012 Q 4.


Click 2012/Oct, Shift+click 2012/Dec, and then drag the items to columns
under <#2012#>.
The 2012/Oct, 2012/Nov, and 2012/Dec Month members are nested as
children of 2012 in the columns.
On the Source tab, in Products dimension\Products hierarchy\Product line
level\Members folder, click Camping Equipment, Ctrl+click
Mountaineering Equipment, and then drag the items to the Rows drop
zone.
Camping Equipment and Mountaineering Equipment appear in the rows.
On the Source tab, in the Measures dimension, drag Revenue to the
Measures drop zone in the report, and then run the report.
The results appear as follows:

By using members, you narrowed the focus of the report to only those
members you are interested in viewing. In this case, you see revenue for 2011
and for the last three months of 2012 for both the Camping Equipment and
Mountaineering Equipment product lines.
Close IBM Cognos Viewer.

Results:
You navigated an IBM Cognos PowerCube 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.

2-14

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

INTRODUCTION TO DIMENSIONAL DATA IN REPORTS

Demo 2
Explore MUNs

2012 IBM Corporation

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

2-15

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Demo 2: Explore MUNs


Purpose:
You must become proficient at using members to create reports. To
help achieve this, you will add members to the edge of a crosstab
report, and then examine the member expressions that are
generated.
Server:
User/Password:
Studio:
Package:
Report type:
Folder:
Namespace:

http://localhost:88/ibmcognos
brettonf/Education1
Report Studio
Public Folders\Samples\Models\GO Data Warehouse
(analysis)
Crosstab
Sales and Marketing (analysis)
Sales (analysis)

Task 1. Identify a MUN in a report.


1.

2.

3.

2-16

Create a new crosstab.


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.
On the Source tab, expand the Sales and Marketing (analysis) folder\Sales
namespace\Products dimension\Products hierarchy, and then drag the
Product line level to the Rows drop zone in the crosstab.
On the Source tab, expand the Order method dimension\Order method
hierarchy\Order method type level\Members folder.

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

INTRODUCTION TO DIMENSIONAL DATA IN REPORTS

4.

5.
6.

7.
8.

Click the Fax member, Ctrl+click the Telephone, Mail, E-mail, and Web
members, and then drag the items to the Columns drop zone.
Fax, Telephone, Mail, E-mail, and Web appear as columns.
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.
On the Source tab, click the Order method level to change the focus of the
currently selected items.
Right-click the Fax member, and then click Properties.
The properties for Fax are displayed. 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]
Close the Properties dialog box.
On the Source tab, expand the Sales fact measure dimension, and then drag
the Revenue measure to the Measures drop zone.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

2-17

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

9.

On the toolbar click Run Report.


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.
10. Close IBM Cognos Viewer.
11. Close Report Studio without saving the report.
Results:
You used members to create a crosstab report and examined the
MUN expressions that are generated.

Task 1, step 10: 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.

2-18

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

INTRODUCTION TO DIMENSIONAL DATA IN REPORTS

Insert Members and Children


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

2012 IBM Corporation

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 (Tools, Options, Edit tab)

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

2-19

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Sets in Report Studio


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

Revenue

2010

2011

2012

Camping Equipment
If individual
members were
used, how
many sets
would exist?

Golf Equipment
Outdoor Protection
Personal Accessories
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.

2012 IBM Corporation

A set refers to a group of one or more members from a single hierarchy.


A set can be created manually 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 generated automatically by dragging items (with children) 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.

2-20

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

INTRODUCTION TO DIMENSIONAL DATA IN REPORTS

Create Sets for Members


Insert Individual Members
(default mode)

Create Sets for Members

<#Camping Equipment#>

<#Products)#>

<#Mountaineering Equipment#>

Camping Equipment

Camping Equipment

Mountaineering Equipment

Mountaineering Equipment

2012 IBM Corporation

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.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

2-21

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Tuples in Report Studio

Revenue
Camping Equipment
Mountaineering Equipment
Personal Accessories
Outdoor Protection
Golf Equipment

2010

2011

2012

332,986,338.06

402,757,573.17

500,382,422.83

0.00

107,099,659.94

161,039,823.26

391,647,093.61

456,323,355.90

594,009,408.42

36,165,521.07

25,008,574.08

4,471,025.26

153,553,850.98

168,006,427.07

230,110,270.55

2012 IBM Corporation

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.

2-22

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

INTRODUCTION TO DIMENSIONAL DATA IN REPORTS

Automatically Create Sets and Tuples


Columns
Rows

Measures

Blank crosstab layout

Drag the Year level to the


Columns drop zone.
Drag the
Product
line level
to the
Rows drop
zone.

Revenue

<#Year#>

<#Year#>

<#Product line#>

<#1234#>

<#1234#>

<#Product line#>

<#1234#>

<#1234#>

Set
Revenue

2010

2011

332,986,338.06

Camping Equipment

Set

Drag the Revenue measure


to the Measures drop zone.

500,382,422.83

107,099,659.94

161,039,823.26

391,647,093.61

456,323,355.90

594,009,408.42

36,165,521.07

2,008,574.08

10,349,175.84

168,006,427.07

230,110,270.55

Mountaineering Equipment
Personal Accessories
Outdoor Protection
Golf Equipment

Set

2012

402,757,573.17

153,553,850.98

Tuple value
2012 IBM Corporation

Report Studio 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.
Remember that.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

2-23

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Create an Individual Tuple Easily


Select multiple
members from
data tree

2011
Golf Equipment
Revenue

Right-click, and drag


to report layout

The tuple is created in


the report layout
2011,Golf Equipment,Revenue

2011,Golf Equipment,Revenue

168,006,427.07

Run the report to


display results

2012 IBM Corporation

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.

2-24

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

INTRODUCTION TO DIMENSIONAL DATA IN REPORTS

Manually Create Sets and Tuples


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

Add to the report layout


and query

Add to the query

2012 IBM Corporation

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

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

2-25

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Query Calculations
Create:
calculated member

[2006]- [2005]

calculated measure

[Revenue]- [Planned Revenue]

set expression

children([2006])

other expression

localtime

2012 IBM Corporation

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.

2-26

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

INTRODUCTION TO DIMENSIONAL DATA IN REPORTS

The set() Function


set(member {,member})
set([Camping Equipment],[Outdoor Protection]) named "Selected Product Lines"
Revenue

Telephone

Sales visit

Web

Camping Equipment

153,894,892.13

168,611,961.87

1,133,838,683.39

Outdoor Protection

11,928,314.52

10,029,884.31

42,951,811.89

Total

165,823,206.65

178,641,846.18 1,176,790,495.28

Data Item
Type
Name
Label
Dimension

Dimensional Edge Summary


Total(Selected Product Lines)
Total
Products

Hierarchy

Products

Aggregate Data Item

Selected Product Lines

Aggregation Method

Total

Use Set Aggregation

Yes

Solve Order

Properties of Total

2012 IBM Corporation

The set function returns the list of members defined in the expression.
The members must be from the same hierarchy.
The set function is valuable because you can use it to create a set expression and then
reuse the set expression in other expressions.
The Selected Product Lines set was created by dragging a Query Calculation object to
the rows.

Use the syntax provided in the callouts to describe how the Selected Product Lines set is created and how it is reused.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

2-27

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Demo 3
Use the set() Function to Focus Your Report

2012 IBM Corporation

2-28

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

INTRODUCTION TO DIMENSIONAL DATA IN REPORTS

Demo 3: Use the set() Function to Focus Your Report


Purpose:
To create dimensional reports you need to understand how the set
function behaves. To accomplish this, you will create a crosstab
report by using individual members from a level instead of using an
entire level. You will modify the report by using the Report Studio
functionality to include a set expression to show individual
members on an edge. You will also show how the set you create can
be reused in another expression.
Server:
User/Password:
Studio:
Package:
Report type:

http://localhost:88/ibmcognos
brettonf/Education1
Report Studio
Public Folders\Samples_PowerCube\Cubes\Sales and
Marketing (cube)
Crosstab

Task 1. Create an unfiltered report.


1.
2.

3.

Create a new crosstab report.


On the Source tab (in the View Metadata Tree mode), expand the Retailers
dimension\Retailers hierarchy, and then drag the Region level to the
Columns drop zone.
On the Source tab, expand the Order method dimension\Order method
hierarchy, and then drag the Order method type level to the Rows drop zone.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

2-29

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

4.

5.

On the Source tab, expand the Measures dimension, drag Revenue to the
Measures drop zone, and then on the toolbar, click Run Report.
The report runs in IBM Cognos Viewer and appears as follows:

The report shows revenue for all order methods for all retailer regions.
You want to narrow the focus of this report so that you see revenue for only
the Telephone and E-mail order methods. You will do this by replacing the
Order method type level in the report with the appropriate members.
Close IBM Cognos Viewer.

Task 2. Focus your data using individual members.


1.

2.

In the report layout, click <#Order method type#>, and then on the toolbar,
click Delete.
You can use the metadata tree to select members from their respective
members folders, but for ease of navigation, you will use the members tree.
On the Source tab, click View Members Tree, expand Order method, click
the Telephone member, and then Ctrl+click the E-mail member.

Task 2, Step 2: Another method to do this would be:


On the Source tab, expand the Order method type level and the Members folder (under the Order method type level),
click the Telephone member, and then Ctrl+click the E-mail member.

2-30

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

INTRODUCTION TO DIMENSIONAL DATA IN REPORTS

3.

4.

Drag the items to the Rows drop zone, and then on the toolbar, click Run
Report.
The report appears as follows:

The report shows revenue for the Telephone and E-mail order method types
for all retailer regions.
Close IBM Cognos Viewer.

Task 3. Add a total for the members on the rows.


1.

In the report layout, click <#Telephone#>, and then Ctrl+click


<#E-mail#>.

2.

, and then click Total from the dropOn the toolbar, click Summarize
down menu.
A message appears that reads: "One or more of the objects selected represents a
single value. No summary is performed for the object(s)."
By dragging the Telephone and E-mail members to the Rows drop zone, you
have included only the individual, separate members in the rows. Instead you
should create a set using the set() function, and then summarize that set. You
could create a set expression using a Query Calculation, but you will use the
user interface functionality to efficiently create a set from members.
Click OK to close the dialog box.
With <#Telephone#>and <#E-mail#> selected, on the toolbar, click
Delete.
On the Source tab, click Create Sets for Members (currently inserting

3.
4.
5.

individual members)

Task 3, Step 5: Another method of doing this is to edit the set definition of the Order method type in the rows, to exclude
all members except Telephone and E-mail. You will be exploring more about Set Definition later in the module.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

2-31

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

6.
7.
8.
9.

On the Source tab, click the Telephone member, Ctrl+click the E-mail
member, and then drag the items to Rows drop zone.
In the report layout, click <#set(Telephone, E-mail)#>.
On the toolbar, click Summarize, and then click Total from the drop-down
menu.
On the toolbar, click Run Report.
The results appear as follows:

You have effectively filtered the report to show only the Telephone and E-mail
members of the Order method type level. You have done this by modifying a
row expression of the report. You have also summarized the set to show a total
for the set and not the members within it.
10. Close IBM Cognos Viewer, and then, in the report layout, click Total.
In the Properties pane, in the Data Item section, the following properties
appear:

Notice that the expression reuses the expression set(Telephone, E-mail).

2-32

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

INTRODUCTION TO DIMENSIONAL DATA IN REPORTS

11. On the Source tab, click Insert Individual Members (currently creating
sets)
, and then click View Metadata Tree to return to return to the
default settings.
Leave report Studio open for the next demo.
Results:
You created a crosstab report that is focused by using individual
members from a level instead of an entire level. You modified the
report to include an expression that uses the set function to show
individual members on an edge. You also identified how the set you
created could be reused in another expression.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

2-33

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Use 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

2012 IBM Corporation

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.

2-34

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

INTRODUCTION TO DIMENSIONAL DATA IN REPORTS

The tuple() Function

tuple(member {,member})
Revenue
tuple([Fax],[2006]) 13,445,559.93

Quantity

Returns

249234

8856

2012 IBM Corporation

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

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

2-35

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Demo 4
Identify Sets and Tuples in Reports

2012 IBM Corporation

2-36

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

INTRODUCTION TO DIMENSIONAL DATA IN REPORTS

Demo 4: 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:
User/Password:
Studio:
Package:
Report type:

http://localhost:88/ibmcognos
brettonf/Education1
Report Studio
Public Folders\Samples\Cubes\Sales and Marketing (cube)
Crosstab

Task 1. Identify sets in a report.


1.
2.

3.
4.

Create a new crosstab report without saving the previous report.


On the Source tab, expand the Time dimension\Time hierarchy, add the
Year level to the Columns drop zone, and then run the report.
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]
Close IBM Cognos Viewer.
In the report layout, click <#Year#>to set the focus, right-click <#Year#>,
and then click Edit Set.
The set definition indicates that the members for the Year level are in this set.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

2-37

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

5.
6.
7.

Hover the mouse cursor over the Year level in the set definition.
The message indicates that the set is defined by members of the level.
Click OK to close the Set Definition dialog box.
On the Source tab, add Products dimension\Products hierarchy\Product
line level to the Rows drop zone, and then run the report.
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]
8. Close IBM Cognos Viewer.
9. In the report layout, click <#Product line#> to set the focus, right-click
<#Product line#>, and then click Edit Set.
The set definition indicates that the members for the Product line level are in
this set.
10. Click OK to close the Set Definition dialog box.

2-38

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

INTRODUCTION TO DIMENSIONAL DATA IN REPORTS

11. Add Order Method dimension\Order Method hierarchy\Order Method


type level to columns to nest as a child under <#Year#>, and then run the
report.
A section of the report appears as follows:

You have created a third set for this report that is nested and shown on the
columns edge of the report. It shows the list of members that is generated by
the following expression:
[sales_and_marketing].[Order Method].[Order Method].[Order Method type]
Optional: Open the Set Definition for the Order Method type set in the report
layout and observe the results.
12. Close IBM Cognos Viewer.
Up to this point, you identified sets in a crosstab report. You will now identify
tuples.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

2-39

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Task 2. Identify tuples in a report.


1.
2.

3.

Add the Measures dimension\Revenue measure to the Measures drop zone.


On the toolbar click Run Report.
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.
Close IBM Cognos Viewer, in the report layout click <#Product line#>,
and then on the toolbar, click Delete.

Task 2, Step 3: 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.

2-40

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

INTRODUCTION TO DIMENSIONAL DATA IN REPORTS

4.

5.

6.

On the toolbar click Run Report.


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.
Close IBM Cognos Viewer, and then from the Tools menu, 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.
Close the Generated SQL dialog box.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

2-41

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Task 3. Create a tuple manually.


1.
2.

Create a new crosstab report without saving the previous report.


On the Source tab, 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 on the report
layout.
Click Insert as Tuple.
On the toolbar click Run Report.
The results appear as follows:

4.
5.

6.
7.

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.
Close IBM Cognos Viewer, and then close Report Studio without saving the
report.
Log off of IBM Cognos Connection.

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.
Task 3, step 7: Do not log off of IBM Cognos Connection if you are advancing to the next module today.

2-42

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

INTRODUCTION TO DIMENSIONAL DATA IN REPORTS

Summary
At the end of this module, you should be able to:
work with members
identify sets and tuples in Report Studio

2012 IBM Corporation

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

2-43

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

2-44

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

Dimensional Report Context


IBM Cognos BI

2012 IBM Corporation

IBM Internal Enablement Purpose Only

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

3-2

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

DIMENSIONAL REPORT CONTEXT

Objectives
At the end of this module, you should be able to:
understand the purpose of report context
understand how data is affected by default and
root members
identify default measure and current measure

2012 IBM Corporation

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

3-3

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

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.

2012 IBM Corporation

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.

3-4

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

DIMENSIONAL REPORT CONTEXT

Root Member
The root
member is the
member at the
highest level of
aggregation
for a particular
hierarchy.

Retailers
is the root
member
for the
Retailers
hierarchy

2012 IBM Corporation

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

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

3-5

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Default Member
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

2012 IBM Corporation

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.

3-6

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

DIMENSIONAL REPORT CONTEXT

Default Member (cont'd)


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)


2012 IBM Corporation

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.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

3-7

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Default Member (cont'd)


A filter is applied to show order method types
with revenue over 150,000,000
Revenue

2004

2005

2006

2007

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

95,402,796.21

44,318,886.43

23,701,042.57

E-mail

1,017,434,523.30 3,712,235,908.40
16,420,318.95

There are seven order method


types. Only four meet the
condition.
Which

Time values is the


condition being tested against?

179,843,044.16

Default member
(Time) values

2012 IBM Corporation

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.

3-8

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

DIMENSIONAL REPORT CONTEXT

Current Member
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

2012/Oct
Revenue

2012/Nov

Revenue

Revenue Previous
Year

Revenue

Revenue Previous
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

2012 IBM Corporation

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

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

3-9

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Default Measure
Report Studio automatically sets the default measure
when you insert a measure into the Measures drop
zone of a crosstab.
Default measure

Revenue

2012/Oct

2012/Nov

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

2012 IBM Corporation

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.

3-10

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

DIMENSIONAL REPORT CONTEXT

Current Measure
The current measure is the measure returned during
an iteration.
Current Measure
2
1
Revenue

2012/Oct

2012/Nov

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

2012 IBM Corporation

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, 2006/Oct,
Revenue, the current measure value is 1,794,878.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

3-11

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Current Measure (cont'd)


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

36,165,521.07

25,008,574.08

4,471,025.26

4,471,025.26

75,994,296.25

153,553,850.98

168,006,427.07

230,110,270.55

174,740,819.29

726,411,367.89

107,099,659.94

161,039,823.26

141,520,649.70

409,660,132.90

Outdoor Protection
Golf Equipment
Mountaineering Equipment

Current Measure

aggregate(currentMeasure within set [Year])

2012 IBM Corporation

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 module Calculations and Dimensional Functions.

3-12

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

DIMENSIONAL REPORT CONTEXT

Demo 1
Use the Default Measure to Create a Summarized
Column in a Report

2012 IBM Corporation

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

3-13

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Demo 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:
User/Password:
Studio:
Package:

http://localhost:88/ibmcognos
brettonf/Education1
Report Studio
Public Folders\Samples_PowerCube\Cubes\Sales and
Marketing (cube)
Report type:
Crosstab
Task 1. Identify the default measure in a crosstab report.
1.
2.
3.
4.

3-14

Create a new crosstab report.


On the Source tab, expand the Products dimension\Products hierarchy, and
drag the Product line level to the Rows drop zone.
On the Source tab, from the Measures dimension, drag the Revenue measure
to the Measures drop zone.
On the Source tab, expand the Time dimension\Time hierarchy, and then
drag the Year level to the Columns drop zone.
In the Properties pane, in the Data section, notice that the Default Measure
property is set to Revenue. This is the default measure for the crosstab report.

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

DIMENSIONAL REPORT CONTEXT

Task 2. Summarize the rows.


1.

2.

3.

4.

,
In the report layout, click <#Year#>, on the toolbar, click Summarize
and then from the drop-down menu, click Automatic Summary.
Automatic Summary will use the aggregate function to summarize the data.
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.
On the toolbar, click Run Report.
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.
Close IBM Cognos Viewer.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

3-15

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

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


the rows.
1.

2.

3.

3-16

On the Source tab, 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.
On the toolbar, click Run Report.
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.
Close IBM Cognos Viewer.

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

DIMENSIONAL REPORT CONTEXT

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


1.

2.

3.

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.
On the toolbar, click Run Report.
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.
Close IBM Cognos Viewer.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

3-17

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

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 the Properties pane in the Data section, click the Default Measure
property, and then in the list, click Quantity.
In the report layout, click Revenue in the top left corner, and then on the

3.

4.

toolbar, click Cut .


You will run the report to identify the context for the current measure.
On the toolbar, click Run Report.
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.

3-18

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

DIMENSIONAL REPORT CONTEXT

5.
6.

Close IBM Cognos Viewer, and then close Report Studio without saving the
report.
Log off of IBM Cognos Connection.

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.

Task 5, step 6: Do not log off of IBM Cognos Connection if they are advancing to the next module today.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

3-19

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Summary
At the end of this module, you should be able to:
understand the purpose of report context
understand how data is affected by default and
root members
identify default measure and current measure

2012 IBM Corporation

3-20

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

Focus Your Dimensional Data


IBM Cognos BI

2012 IBM Corporation

IBM Internal Enablement Purpose Only

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

4-2

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

FOCUS YOUR DIMENSIONAL DATA

Objectives
At the end of this module, you should be able to:
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
dynamically filter using a tree prompt
2012 IBM Corporation

Participants should be familiar with basic concepts of reporting using the dimensional style and dimensional data
sources.
Suggested modules to reference:
Introduction to Multidimensional Concepts
Introduction to Multidimensional Data in Reports
Multidimensional Report Context

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

4-3

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

How do Relational Data Sources Behave?


Relational models return a result based on
relationship cardinality between items in the query.
2 out of 7
order
methods
are
returned

Revenue
1 for 1 Sports shop

2010
Fax
Web

4 Golf only

2012

2013

1,002,725.61 1,841,265.46 1,715,812.95

Sales visit

586,195.45

614,326.06

Sales visit

3 out of 7
Accapamento

1,472,511.68
135,201.76

Web
Aarhus Sport

1,097,318.27

1,081,439.08 1,260,903.27

Web
4 Your Eyes

2011

775,128.03

737,820.6

Sales visit

250,847.75

Telephone

145,102.25

189,400.37

Web

712,494.7 1,025,420.15 2,506,561.08

1,170,080.59

Web

1,711,149.2 2,613,580.91

1,752,647.69

1 out of 7
2012 IBM Corporation

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.

4-4

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

FOCUS YOUR DIMENSIONAL DATA

How do Dimensional Data Sources Behave?


Revenue
1 for 1 Sports shop

2010

2011

2012

1,002,725.61

1,841,265.46

1,715,812.95

1,081,439.08

1,260,903.27

586,195.45

614,326.06

2013

Telephone
Sales visit
Web

1,097,318.27

Special
Mail
E-mail
Fax

All order
methods are
returned for
each instance
of a retailer

4 Golf only

775,128.03

Telephone
Sales visit
Web

1,472,511.68

Special
Mail
E-mail
Fax
4 Your Eyes

Telephone
Sales visit
Web

135,201.76
737,820.6

Special
Mail
E-mail
Fax

2012 IBM Corporation

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

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

4-5

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

DMR - Relational or Dimensional?


Revenue
1 for 1 Sports shop

2011
Web

2013

1,841,265.46 1,097,318.27

2010

2012

1,002,725.61

1,715,812.95

E-mail
Telephone
Sales visit
Mail
Fax

775,128.03

Special
4 Golf only

All order methods are


returned for each
instance of a retailer.

Web

586,195.45

1,472,511.68

614,326.06

E-mail
Telephone
Sales visit

1,081,439.08

1,260,903.27

Mail

Why?

Fax
Special
4 Your Eyes

Web

737,820.6

E-mail
Telephone
Sales visit

135,201.76

Mail
Fax
Special

2012 IBM Corporation

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

4-6

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

FOCUS YOUR DIMENSIONAL DATA

Create 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

2012 IBM Corporation

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.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

4-7

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Filtering Techniques
Relational filtering techniques:
detail filters
summary filters
Dimensional filtering techniques:
dimensional objects, set definitions, and
expressions to specify members
filter() function
slicers

2012 IBM Corporation

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.

4-8

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

FOCUS YOUR DIMENSIONAL DATA

Use 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()
2012 IBM Corporation

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.

Refer to Module 5: Focus Your Dimensional Data, page 4, for more dimensional functions.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

4-9

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

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

All order method types


except those defined in the
second set expression.

2010

2011

2012

2013

Telephone

3979898

2251898

684667

336381

Sales visit

2640065

1778941

1411468

982938

10050830 17507323

Web

340021

Special

252429

23054131 17846021
13622

30730

Alternatively, use Set Definition


to exclude members.

2012 IBM Corporation

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.
An example of this can be found in the module Calculations and Dimensional Functions (Module 5, Demo 1).
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).

4-10

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

FOCUS YOUR DIMENSIONAL DATA

Demo 1
Focus Your Report by Excluding Members of a Defined Set

2012 IBM Corporation

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

4-11

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Demo 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:
User/Password:
Studio:
Package:
Report type:

http://localhost:88/ibmcognos
brettonf/Education1
Report Studio
Public Folders\Samples_PowerCube\Cubes\Sales and
Marketing (cube)
Crosstab

Task 1. Create an unfiltered report comparing product sales


across time.
1.
2.
3.
4.

5.

4-12

Create a new crosstab report.


From the Source tab, expand the Time dimension\Time hierarchy, and drag
the Year level to the Columns drop zone.
Expand the Products dimension\Products hierarchy, and drag the Product
line level to the Rows drop zone.
Expand the Promotions dimension\Promotions hierarchy, and drag the
Campaign level to the right of <#Product line#> in the Rows drop zone to
nest as a child.
From the Measures dimension, add the Revenue measure to the Measures
drop zone.

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

FOCUS YOUR DIMENSIONAL DATA

6.
7.

In the report layout, click <#Campaign#>, on the toolbar click Summarize,


and then select Automatic Summary from the drop-down menu.
On the toolbar click Run Report.
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.
8. Close IBM Cognos Viewer, and then in the report layout, click Summary.
9. In the Properties pane, 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.
10. Click Label, change the property to Summary(All Campaigns), and then
press Enter.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

4-13

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Task 2. Exclude the campaign type Regular Sale for the


default measure.
1.

2.
3.
4.

5.

6.

From the Source tab, drag 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.
Right-click <#Campaign1#>, and then click Edit Set.
You will exclude a member from this set definition.
, and then click Exclude.
In the Set Definition dialog box, click New
In the Available members pane, expand Promotions, click Regular sale,
click the green 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 hover the mouse cursor over Exclude, the excluded member(s)
will display in a tooltip.
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.
In the report layout, click <#Campaign#>, and then on the toolbar, click
Delete.
You will rename the Campaign1 set definition to clearly identify the campaigns
in this customized set.

Task 2, step 5: 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. Students could use the expression
except([sales_and_marketing].[Promotions].[Promotions].[Campaign], [Regular sale]) and achieve the same results.

4-14

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

FOCUS YOUR DIMENSIONAL DATA

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#>, click the
Summarize button, and then select Automatic Summary from the dropdown menu.
9. 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.
10. On the toolbar click Run Report.
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.
11. Close IBM Cognos Viewer.
Results:
You have created a report that shows you revenues for product
lines for all promotional campaigns except Regular sales.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

4-15

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

topCount() and bottomCount()


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

Quantity
Only the top two
Product lines
are returned.

Revenue

Quantity

Personal Accessories

1,885,673,307.78

34907705

Camping Equipment

1,589,036,664.03

27301149

Alternatively, use Set Definition


to define top or bottom count.

2012 IBM Corporation

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 revenuegenerating product lines.

4-16

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

FOCUS YOUR DIMENSIONAL DATA

topPercent() and bottomPercent()


bottomPercent(set_expression, numeric_expression1, numeric_expression2)
bottomPercent([sales_and_marketing].[Products].[Products].[Product type], 3, tuple([2006],[Planned Revenue]))
Planned revenue

Only the product types in the


bottom 3% planned revenue
for 2006 are returned.

2006
Revenue

Planned Revenue

First Aid

1,789,507.36

923,995.66

Sunscreen

3,342,648.85

2,006,172.66

Insect Repellents

5,217,019.63

3,457,024.63

Golf Accessories

16,184,834.94

10,066,864.59

Safety

32,716,937.10

12,287,850.59

Alternatively, use Set Definition


to define top or bottom percent.

2012 IBM Corporation

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 2006, whose total contributes 3 % of the total for all product
types.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

4-17

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Demo 2
Create a Crosstab Report Showing the Top Two Retailers

2012 IBM Corporation

4-18

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

FOCUS YOUR DIMENSIONAL DATA

Demo 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:
User/Password:
Studio:
Package:
Report type:

http://localhost:88/ibmcognos
brettonf/Education1
Report Studio
Public Folders\Samples_PowerCube\Cubes\Sales and
Marketing (cube)
Crosstab

Task 1. Create a crosstab report.


1.

Add the following query items to a new crosstab:


Columns area:
Time dimension\Time hierarchy\Year level\Members folder\2012
Time dimension\Time hierarchy\Members folder\Time (to the right
of <#2012#>, as a peer)
Rows area: Retailers dimension\Retailers hierarchy\Retailer name level
Measures area:
Measures dimension\Revenue measure

Task 1, Step 1: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.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

4-19

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

2.

From the Source tab\Measures dimension, click Revenue, Ctrl+click


Quantity and Profit Margin, and then drag them below <#2012#> in the
report layout, as nested items.
The results appear as follows:

Task 2. Determine the top two count.


1.
2.
3.

In the crosstab, right-click <#Retailer name#>, and then click Edit Set.
In the Set Definition dialog box, click New, and then click Top.
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 green right arrow to add it to
the Intersection members and measures pane.
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).

6.

4-20

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

FOCUS YOUR DIMENSIONAL DATA

7.

8.

9.

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]))
Click OK to close the Set Definition dialog box, and then from the toolbar,
click Run Report.
The results appear as follows:

Only the top two retailers for 2012 are returned.


Close IBM Cognos Viewer.

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.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

4-21

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

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)

2012 IBM Corporation

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.

4-22

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

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

2004

2005

2006

2007

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

95,402,796.21

44,318,886.43

23,701,042.57

E-mail

1,017,434,523.30 3,712,235,908.40
16,420,318.95

There are seven order method types.


Only four meet the condition.

179,843,044.16

Default member values

This condition is being tested against which values?

Alternatively, use Set Definition


to define a filter.
2012 IBM Corporation

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 module Multidimensional
Report Context for more information on the default member.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

4-23

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Detail Filters
[Revenue]> 150000000

Only two order


method types
meet the
condition.

Revenue

2010

Telephone

178,793,580.36

Web

473,771,464.65

2011

2012

2013

881,315,747.68

1,339,714,172.77

1,017,434,523.30

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.

2012 IBM Corporation

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.

4-24

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

FOCUS YOUR DIMENSIONAL DATA

Demo 3
Compare the Use of the filter() Function to a Detail Filter

2012 IBM Corporation

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

4-25

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Demo 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.
Server:
User/Password:
Studio:
Package:
Report type:

http://localhost:88/ibmcognos
brettonf/Education1
Report Studio
Public Folders\Samples_PowerCube\Cubes\Sales and
Marketing (cube)
Crosstab

Task 1. Create an unfiltered report.


1.

Add the following query items to a new crosstab:


Columns area:
Time dimension\Time hierarchy\Year level
Rows area:
Products dimension\Products hierarchy\Product level
Order method dimension\Order method hierarchy\Order method
type level (to the right of <#Product#> nested as a child)
Promotions dimension\Promotions hierarchy\Campaign level (to the
right of <#Order method type#> nested as a child)
Measures area:
Measures dimension\Revenue measure

While you could use set definition in this demo, to have more control over changing the expression of the function in this
demo, you will use query calculations.

4-26

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

FOCUS YOUR DIMENSIONAL DATA

2.

3.

On the toolbar, click the Run Report list, click Run Report - 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.
Close IBM Cognos Viewer.
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.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

4-27

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

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


1.

2.

3.
4.

In the report layout, click <#Campaign#>, and then on the toolbar, click
Delete.
You will replace it with a query calculation.
From the Toolbox tab, drag a Query Calculation to the right of <#Order
method type#>, click the Set expression radio button, from the Hierarchy
list, click the Promotions hierarchy, and then in the Name text box, type
Non-null Campaigns.
Click OK.
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

Task 2, Step 2: 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-28

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

FOCUS YOUR DIMENSIONAL DATA

5.

Click OK to close the Set Expression dialog box, and then on the toolbar,
click Run Report.
The report runs in PDF again, but this time more quickly.
A section of the report appears as follows:

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.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

4-29

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

6.

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.
Close IBM Cognos Viewer.

Task 3. Create a detail filter to filter out nulls.


1.
2.
3.

4-30

In the report layout, right-click <Non-null Campaigns>, click Edit Set, and
.
then in the Set Definition dialog box, double-click Set Expression
In the Set Expression box, delete the filter function that was applied in Task 2.
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.

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

FOCUS YOUR DIMENSIONAL DATA

4.

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.

5.

On the toolbar, click Filters

6.

, in the Create Filter dialog box, click


In the Filters dialog box, click Add
Advanced, and then click OK.
Create and validate the following expression:
[Revenue]<>null
Hints:
Available Components pane\Data Items tab: Revenue
Click OK to close the Detail Filter Expression dialog box, and then click OK
to close the Filters dialog box.
On the toolbar, click Run Report.
The report contains the same results as the report run in Task 2, Step 4. 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.
Close IBM Cognos Viewer.

7.
8.

9.

2007, 2012, IBM Corporation

, and then click Edit Filters.

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

4-31

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Task 4. Nest an additional set on the rows edge and filter on


details.
1.

2.

3.

4-32

From the Source tab, 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.
On the toolbar, click Run Reports.
The report might take quite a while 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.
Close IBM Cognos Viewer.

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

FOCUS YOUR DIMENSIONAL DATA

Task 5. Use the filter function to attempt the same report.


1.
2.
3.

4.

On the toolbar, click Filters, click Edit Filters, click the [Revenue]<>null
filter, and then under Usage, click Disabled.
Click OK, right-click <Non-null Campaigns> in the rows of the report
layout, click Edit Set, and then double-click Set Expression.
Create and validate the following expression:
filter ([sales_and_marketing].[Promotions].[Promotions].[Campaign],
[Revenue]<>null)
Hints:
Available Components pane\Data Items tab: Revenue
Click OK to close the Set Expression dialog box, and then click OK to close
the Set Definition dialog box.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

4-33

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

5.

6.

4-34

On the toolbar, click Run Report.


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.
Close IBM Cognos Viewer.

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

FOCUS YOUR DIMENSIONAL DATA

Task 6. Use another filter function to filter on a nested set.


1.
2.

3.
4.

In the report layout, click <#Region#>, and then on the toolbar, click Delete
to remove it from the report.
From the Toolbox tab, 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, and then in the Name text box, type Nonnull Regions.
Click OK.
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

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

4-35

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

5.

Click OK to close the Set Expression dialog box, and then on the toolbar,
click Run Report.
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 demo is about filtering, and happens to filter null values in its examples. In IBM Cognos BI (v10.2), zero
suppression is available in the product UI. This demo 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).

4-36

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

FOCUS YOUR DIMENSIONAL DATA

6.

Close IBM Cognos Viewer.

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.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

4-37

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

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.
2012 IBM Corporation

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 Report Studio, you can see
the slicer that Analysis Studio generated.

4-38

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

FOCUS YOUR DIMENSIONAL DATA

Slicer Example
Create a slicer containing the 2005 member.
2012
2011
2010
All Years

2011
France
Germany

France

United Kingdom

Germany

All Countries

All Products

Golf

Stoves

Tents

All Products

Golf

All Countries

Stoves

Tents

United Kingdom

2012 IBM Corporation

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.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

4-39

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Demo 4
Filter Dimensional Data Using Slicers

2012 IBM Corporation

4-40

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

FOCUS YOUR DIMENSIONAL DATA

Demo 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:
User/Password:
Studio:
Package:
Report type:

http://localhost:88/ibmcognos
brettonf/Education1
Report Studio
Public Folders\Samples_PowerCube\Cubes\Sales and
Marketing (cube)
Crosstab

Task 1. Create a simple slicer.


1. Add the following query items to a new crosstab:
Rows area
:Products dimension\Products hierarchy\Product type level
Columns area:
Order method dimension\Order method hierarchy\Order method
type level
Measures area:
Measures dimension\Quantity measure

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

4-41

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

2.

3.
4.
5.
6.

7.

4-42

On the toolbar, click the Run Report list, click Run Report - 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.
Close IBM Cognos Viewer.
On the Explorer bar, point to Query Explorer, and then under Queries click
Query1.
From the Source tab, expand the Time dimension\Time hierarchy\Year
level\Members folder, and then drag the 2011 member to the Slicer pane.
On the toolbar, click Run Report.
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.
Close IBM Cognos Viewer.

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

FOCUS YOUR DIMENSIONAL DATA

Task 2. Create a slicer using the set function.


1.
2.

3.

4.

In the Slicer pane, double-click [2011].


Create and validate the following expression:
set([2011],[2012])
Hints:
From the Source tab: Time dimension\Time hierarchy\Year level\Members
folder\2011and 2012 member
Click OK to close the Slicer Member Expression dialog box, and then on the
toolbar, click Run Report.
A section of the report appears as follows:

The product type and order method row and column edges are not affected,
but the quantity sold values now reflect the years 2011 and 2012.
You have created a slicer using the set function, which uses members from the
same dimension. You will now examine the result when you add an additional
slicer that uses members from a dimension that appears on the columns or
rows edge.
Close IBM Cognos Viewer.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

4-43

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Task 3. Create a compound slicer that uses members from a


dimension that appears on the columns edge.
1.
2.

3.
4.

5.

In Query Explorer, from the Toolbox tab, drag a Slicer Member Set to the
Slicer pane.
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.
Click OK to close the Slicer Member Expression dialog box.
The slicer populates the pane.
On the toolbar, click Run Report.
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.
Close IBM Cognos Viewer.

Results:
You created slicers to filter the rollup values of the measures that
appear in the cells of a crosstab report.

4-44

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

FOCUS YOUR DIMENSIONAL DATA

Prompt for Dimensional Data


Prompt
Returned

Style

Syntax

Where to use syntax

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

p represents <prompt name>

2012 IBM Corporation

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

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

4-45

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Tree Prompts

Planned revenue 2010

2011

2012

2013

Canada

62,519,525.96

78,692,359.03

101,900,270.64

76,540,904.15

Brazil

30,715,630.22

35,916,138.59

45,151,584.06

32,914,074.67

Belgium

16,640,047.83

32,001,318.48

40,026,308.86

29,528,025.13

2012 IBM Corporation

Tree prompts only work with dimensional data.


The tree prompt returns a set of members from one or more levels within a single
hierarchy.
The parameter expression that you create must reference a hierarchy.
Keep in mind to choose the appropriate prompt control. If you want to prompt for
members of a single level, a tree prompt could be used, but a value prompt is a more
appropriate choice.
For example, it makes no sense to filter the Product line level based on Product type
members. However, it does make sense to filter Products based on any selections from
Product line, Product type or Product name. Therefore, the tree prompt is used to filter
against a hierarchy.
Participants should be familiar with other types of prompts from IBM Cognos Report Studio: Author Professional Reports
Fundamentals (v10.2).

4-46

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

FOCUS YOUR DIMENSIONAL DATA

Demo 5
Focus Your Data Using a Tree Prompt

2012 IBM Corporation

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

4-47

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Demo 5: Focus Your Data Using a Tree Prompt


Purpose:
You will create a crosstab report that includes a tree prompt. Users
will be able to select members from within the Retailers hierarchy so
that they see planned revenue for each year for the members they
select. You will then modify the prompt to control where users can
begin navigating the hierarchy.
Server:
User/Password:
Studio:
Package:
Report type:

http://localhost:88/ibmcognos
brettonf/Education1
Report Studio
Public Folders\Samples_PowerCube\Cubes\Sales and
Marketing (cube)
Crosstab

Task 1. Create an unfiltered report using a hierarchy.


1.

4-48

Add the following query items to a new crosstab:


Columns area:
Time dimension\Time hierarchy\Year level
Rows area:
Retailers dimension\Retailers hierarchy, (In the Insert Hierarchy
dialog box, click All members, and then click OK.)
Measures area:
Measures dimension\Planned revenue

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

FOCUS YOUR DIMENSIONAL DATA

2.

3.

On the toolbar, click Run Report.


A section of the report appears as follows:

The rows edge of the report shows the entire Retailers hierarchy. You want to
prompt users to select members from this hierarchy.
Close IBM Cognos Viewer.

Task 2. Filter the report using a tree prompt.


1.
2.
3.

In the report layout, click <#Retailers#>, and then from the toolbar, click
Delete.
From the Toolbox tab, drag a Query Calculation object to the Rows drop
zone.
In the Name box, type Selected Retailers, click Set expression, from the
Hierarchy drop-down list, click Retailers hierarchy, and then click OK.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

4-49

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

4.

5.
6.
7.

8.

9.

Create and validate the following expression:


Validate by selecting the Retailers check box.
set ([sales_and_marketing].[Retailers].[Retailers]->?Retailer?)
Hints:
Available Components pane\Source tab: Retailers dimension\Retailers
hierarchy
Click OK to close the Prompt dialog box.
There are no errors in the expression.
Click OK to close the Set Expression dialog box.
On the toolbar, click, Run Report.
A report appears with a tree prompt. A tree prompt is generated automatically
because Report Studio has identified that you are using a hierarchy in the
expression that is used to build the rows of the report.
Click the Deselect all link to clear all check boxes, and then expand Retailers,
expand Americas, and then expand Central Europe.
Notice the check boxes that are available, allowing you to select multiple
members from the hierarchy.
Under Americas, select the Mexico check box, under Central Europe, select
the Belgium check box, and then click OK.
The results appear as follows:

The report is filtered based on your selections.


You want to modify the prompt so that users can only select from the hierarchy
at a particular level and any lower levels.
10. Close IBM Cognos Viewer.
Task 2, Step 8: It is best practice to deselect all; otherwise the previously selected items may be cached when the
prompt is re-run in the same browser session.

4-50

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

FOCUS YOUR DIMENSIONAL DATA

Task 3. Control where users can begin navigating the


hierarchy.
1.
2.
3.
4.
5.
6.

On the Explorer bar, point to Page Explorer, and then click Prompt Pages.
From the Toolbox tab, drag a Page object to the Prompt Pages pane, and
then double-click Prompt Page1.
From the Toolbox tab, drag a Tree Prompt object to the work area.
Click Use existing parameter, in the list click Retailer, and then click Next.
Ensure that the Create new query check box is selected, and then click Finish.
Point to Query Explorer, and then under Queries click Query2.

7.

In the Data Items pane, double-click Retailers


, and then delete the
expression that appears in the Expression Definition box.
You will replace this expression with the appropriate member lower in the
hierarchy so that the prompt shows only the member as the starting point for
the user.
8. On the Source tab, expand the Retailers dimension\Retailers
hierarchy\Region level\Members folder.
9. Drag the Northern Europe member to the Expression Definition box,
validate the expression to ensure there are no errors, and then click OK to close
the Data Item Expression dialog box.
Report Studio has generated a new data item in Query2 called Northern Europe
because this member is referenced in the expression for the Retailers data item.
10. On the toolbar, click Run Report.
The Northern Europe member appears as the first item in the tree. To select
members that satisfy the prompt, you are forced to begin your navigation at this
member.
11. Click Deselect all, and then expand Northern Europe, Sweden, and
Netherlands.

Task 3, Step 11: It is best practice to deselect all; otherwise the previously selected items may be cached when the
prompt is re-run in the same browser session.
2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

4-51

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

12. Under Netherlands select the Extra Sport check box, under Sweden select
the Sport Jonas check box, and then click Finish.
The results appear as follows:

13. Close IBM Cognos Viewer.


Results:
You created a crosstab report that prompts users to select members
from within the Retailers hierarchy so that they can see planned
revenue for each year for the members that they select. You
modified the prompt to control where users can begin navigating
the hierarchy.

4-52

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

FOCUS YOUR DIMENSIONAL DATA

Summary
At the end of this module, you should be able to:
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
dynamically filter using a tree prompt
2012 IBM Corporation

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

4-53

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Workshop 1
Create a Set Using a Prompt
and the except() Function

2012 IBM Corporation

4-54

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

FOCUS YOUR DIMENSIONAL DATA

Workshop 1: Create a Set Using a Prompt and the except()


Function
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:
Add the following query items, from the Sales and Marketing (cube) package, to a
new crosstab:
Column area:
Time dimension\Time hierarchy\Year level
Measure area:
Measures dimension\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 accomplish 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 detailed information outlined as tasks, see the Task Table section.
For the final query results, see the Workshop Results section that follows the Task
Table section.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

4-55

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Workshop 1: Task Table


Task 1. Filter a report using a prompt.
Where to Work
Hints
File menu

Create a new crosstab report, using the Sales and


Marketing (cube) package.

Source tab

Add the Year level to the Columns drop zone.


Add the Returns measure to the Measures drop zone.

Toolbox tab

Use a Query Calculation object to create and validate


the following expression for a prompt:
set ([sales_and_marketing].
[Products].[Products].[Product type]->?pt?)

IBM Cognos Viewer

Run the report, selecting Eyewear, Navigation, and


Watches when prompted for a product type.

Task 2: Modify the prompt to include the except function.


Where to Work
Hints
Set Definition dialog
box\ Set Expression
dialog box

Edit and validate the <Selected Product Types>


expression to include the except function:
except ([sales_and_marketing].
[Products].[Products].[Product type],
set ([sales_and_marketing].
[Products].[Products].[Product type]->?pt?))

IBM Cognos Viewer

Run the report, selecting Eyewear, Navigation, and


Watches when prompted for a product type.

If you need more information to complete a task, see the Step-by-Step Instructions
section at the end of the Workshop.

4-56

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

FOCUS YOUR DIMENSIONAL DATA

Workshop 1: Workshop Results


After running the report at the end of Task 1, it appears as follows:

After running the report at the end of Task 2, it appears as follows:

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

4-57

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Workshop 1: Step-by-Step Instructions


Server:
User/Password:
Studio:
Package:
Report type:

http://localhost:88/ibmcognos
brettonf/Education1
Report Studio
Public Folders\Samples_PowerCube\Cubes\Sales and
Marketing (cube)
Crosstab

Task 1. Filter a report using a prompt.


1.

2.
3.
4.

5.

4-58

Add the following query items to a new crosstab:


Columns area:
Time dimension\Time hierarchy\Year level
Measure area:
Measures dimension\Returns measure
From the Toolbox tab, drag a Query Calculation item to the Rows drop
zone.
In the Name box, type Selected Product Types, click Set expression, from
the Hierarchy drop-down list click Products hierarchy, and then click OK.
Create and validate the following expression:
set ([sales_and_marketing].[Products].[Products].[Product type]->?pt?)
You are using the prompt syntax that will return a multiselect prompt.
Validate using the Binoculars product type.
Hints:
Available Components pane\Source tab: Products dimension\Products
hierarchy\Product type level
Click OK to close the Prompt dialog box.

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

FOCUS YOUR DIMENSIONAL DATA

6.

7.
8.

Ensure there are no errors, click OK to close the Set Expression dialog box,
and then on the toolbar, click Run Report.
The prompt appears as follows:

This is a multiselect prompt.


Click Eyewear, Ctrl+click Navigation and Watches, and then click OK.
The report shows returns for the product types selected in the prompt.
Close IBM Cognos Viewer.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

4-59

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Task 2. Modify the prompt to include the except function.


You now want to modify this prompt so that when users make their selections, they
will see returns for all other product types except the ones they select in the prompt.
1.

In the report layout, right-click <Selected Product Types>, and then click
Edit Set.

2.

, and then
In the Set Definition box, click Set Expression, click Edit
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.
Hints:
Source tab: Products dimension\Products hierarchy\Product type level
Click OK to close the Set Expression dialog box, and then click OK to close
the Set Definition dialog box.
On the toolbar, click Run Report.
In the prompt, click Eyewear, Ctrl+click 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.
Close IBM Cognos Viewer, and then close Report Studio without saving the
report.
Log off of IBM Cognos Connection.

3.
4.
5.

6.
7.

Task 2, step 7: Do not log off of IBM Cognos Connection if you are advancing to the next module today.

4-60

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

Calculations and Dimensional


Functions
IBM Cognos BI

2012 IBM Corporation

IBM Internal Enablement Purpose Only

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

5-2

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

CALCULATIONS AND DIMENSIONAL FUNCTIONS

Objectives
At the end of this module, you should be able to:
use IBM Cognos BI dimensional functions to create
sets and tuples
perform arithmetic operations in OLAP queries
identify coercion errors and rules

2012 IBM Corporation

Custom Courses:
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 modules 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.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

5-3

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

IBM Cognos BI 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
2012 IBM Corporation

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 module are: total, aggregate.
In addition, other functions mentioned above that are referenced in demos in this module (but explained in more detail in
other modules 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 8 BI
Dimensional Functions" available from IBM developerWorks: Information Management: Technical library view
http://www.ibm.com/developerworks/views/data/libraryview.jsp?sort_by=Title&sort_order=1&show_abstract=true&show_
all=false&search_flag=true&product_by=Cognos&topic_by=All%20Topics&type_by=All%20Types&search_by=cognospp
reportingdimensionalqueries&Submit.x=0&Submit.y=0, at the time of writing this course (B5161). The concepts would
still apply to IBM Cognos 10.
The categories described in the slide are subjective and may be described differently by different subject matter experts.

5-4

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

CALCULATIONS AND DIMENSIONAL FUNCTIONS

Explore Available Components

2012 IBM Corporation

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

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

5-5

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Reuse, Prompting, and Combining in Dimensional


Expressions

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


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

2012 IBM Corporation

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?
the 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
the tuple function, which returns a value for the last argument of the topCount
function

5-6

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

CALCULATIONS AND DIMENSIONAL FUNCTIONS

The total() and aggregate() Functions


Revenue

2012

Time

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

Products

2012 IBM Corporation

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.
You should use the aggregate function rather than the total function, to take advantage
of the default settings defined in your model.

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.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

5-7

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Aggregate Values in Crosstabs


Quantity
Camping Equipment

Golf Equipment

Cooking Gear

4826755

Packs

2756540

Sleeping Bags

3153218

Tents

3164285

Golf Accessories

3119747

Irons
Putters
Outdoor Protection

Personal Accessories

391445
1284570

Woods

317939

First Aid

829354

Insect Repellents

5800964

Sunscreen

5384127

Binoculars
Eyewear
Knives

Mountaineering Equipment

13400351

Lanterns

1075087
20311396
7229314

Navigation

1992713

Watches

4299195

Climbing Accessories

5850251

Rope

418560

Safety

1135194

Tools
Average(Product line) - within set

2496086
17847418

Average(Product line) - within detail

4249385

Average(Product line) - within aggregate

4040007

2012 IBM Corporation

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.
5-8

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

CALCULATIONS AND DIMENSIONAL FUNCTIONS

Show 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
2012 IBM Corporation

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.

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.
2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

5-9

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Demo 1
Show Totals for the Top Two Products, Excluded
Members, and Overall Totals

2012 IBM Corporation

5-10

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

CALCULATIONS AND DIMENSIONAL FUNCTIONS

Demo 1: Show Totals for the Top Two Product Lines,


Excluded Members, and Overall Totals
Purpose:
Consumers want to see the totals for the top two product lines, the
totals for excluded members and the overall totals. You will
accomplish this by editing the set definition for top two, and by
using the aggregate function and the except function.
Server:
User/Password:
Studio:
Package:
Report type:

http://localhost:88/ibmcognos
brettonf/Education1
Report Studio
Public Folders\Samples_PowerCube\Cubes\Sales and
Marketing (cube)
Crosstab

Task 1. Create a crosstab report showing the top two product


lines.
1.

Add the following query items to a new crosstab:


Columns area:
Time dimension\Time hierarchy\Year level
Rows area:
Products dimension\Products hierarchy\Product line level
Measures area:
Measures dimension\Revenue measure

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

5-11

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

2.

3.
4.
5.
6.

7.

8.

9.

5-12

From the Source tab, expand the Time dimension\Time


hierarchy\Members folder, and drag the Time member to the right of
<#Year#> as a peer.
In the crosstab, right-click <#Product Line#>, and then click Edit Set.
In the Set Definition dialog box, click New, and then click Top.
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.
In the Available members and measures pane, expand Measures, click
Revenue, click the green 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).
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.
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.
Click <#Product line#>, in the Properties pane, under the Data Item
section, click Name, change the Name property to Top Two Product Lines,
and then press Enter.

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

CALCULATIONS AND DIMENSIONAL FUNCTIONS

10. On the toolbar, click Run Report.


The results appear as follows:

The top two product lines for all years are displayed.
11. Close IBM Cognos Viewer.
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,

2.

click Summarize
, and then in the drop-down menu, click Automatic
Summary.
You want to apply a meaningful name to the summary.
Right-click Summary, click Edit Data Item Label, in the Data item label
box, change the text to Summary (Top Two Product Lines), click OK, and
then on the toolbar, click Run Report.
The results appear as follows:

3.

The report shows the aggregated summary for the top two product lines for
each year and for all years.
Close IBM Cognos Viewer.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

5-13

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Task 3. Create a calculation to return totals for excluded


members.
1.
2.

3.
4.

5.

From the Source tab, drag Products dimension\Products hierarchy\Product


line level below Summary(Top Two Product Lines).
With <#Product line#> selected, on the toolbar, click Cut.
You do not want Product line in the report, but you want to reuse the data item
in the query.
From the Toolbox tab, drag a Query Calculation object to the Rows drop
zone under Summary (Top Two Product Lines) as a peer.
In the Name box type Excluded, click Calculated member, and then click
OK.
You left the Hierarchy setting in the Create Calculation dialog box as
Automatic.
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.

Task 3, step 3: This type of expression can result in poor performance if the data set is large as stated earlier.

5-14

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

CALCULATIONS AND DIMENSIONAL FUNCTIONS

6.
7.

Click OK to close the Calculated Member Expression dialog box.


On the toolbar, click Run Report.
The results appear as follows:

8.

Close IBM Cognos Viewer.

Task 4. Add and label the totals for all products.


1.

From the Source tab, 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.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

5-15

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

2.

3.
4.
5.

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.
Click the Text property, click the ellipsis, type All Products, and then click
OK.
In the Properties pane, under the Miscellaneous section, click the Classes
property, and then click the ellipsis.
In the Selected classes pane, click Crosstab member cell, and then click the
green left arrow

6.

7.
8.
9.

5-16

to remove it from the list.

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.
In the crosstab, right-click All Products, and then click Select Member Fact
Cells.
In the Properties pane, click the Classes property, and then click the ellipsis.
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.

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

CALCULATIONS AND DIMENSIONAL FUNCTIONS

10. On the toolbar, click Run Report.


The results appear as follows:

The report now shows the overall totals for products in an appropriate format.
11. Close IBM Cognos Viewer.
12. Save the report in My Folders as Module5_Demo1, and leave the report open
to continue building this report in the next demo.
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.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

5-17

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Perform Arithmetic Operations


Perform simple arithmetic operations in OLAP queries,
such as +, -, *, and /.
Use these operators with members from the same
hierarchy.
Camping Equipment
89,713,990.92

Mountaineering
Equipment

Camping Equipment +
Mountaineering Equipment

20,891,350.60

110,605,341.52

Apply arithmetic operators to measures.


[Revenue]/tuple ([Revenue],[Products])
2012 IBM Corporation

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.

5-18

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

CALCULATIONS AND DIMENSIONAL FUNCTIONS

Demo 2
Create a Percent of Base Calculation

2012 IBM Corporation

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

5-19

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Demo 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 Demo 1 before starting this demo.
Server:
http://localhost:88/ibmcognos
User/Password: brettonf/Education1
Studio:
Report Studio
Package:
Public Folders\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 demo (Show Totals for the Top Two
Product Lines, Excluded Members, and Overall Totals, saved as My
Folders\Module5_Demo1) as a starting point for this demo.
1.
2.

From the Toolbox tab, drag a Query Calculation object to the columns under
<#Year#> to nest as a child.
In the Name box type % of Base, click Calculated measure, and then click
OK.

Task 1: If you were unable to complete the previous demo successfully, you can use the Solution file for the previous
demo, found in IBM Cognos Connection\B5261 Solution Reports\05Calculations_and_Dimensional_Functions\Module5_Demo1_solution.

5-20

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

CALCULATIONS AND DIMENSIONAL FUNCTIONS

3.

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

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.
From the Data Items tab, drag Revenue to columns to the left of % of Base
as a peer.
You will format the values returned by the % of Base calculation.
In the layout report, right-click % of Base under <#Year#>, and then click
Select Member Fact Cells.
In the Properties pane, under Data, click the Data Format property, and then
click the ellipsis.
In the Format type list, click Percent, and then click OK.

5.

6.
7.
8.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

5-21

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

9.

On the toolbar, click Run Report.


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 IBM Cognos Viewer.
Task 2. Modify the % of base calculation and reuse it
elsewhere in the report layout.
1.
2.

3.

5-22

In the report layout, double-click % of Base.


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
Click OK to close the Calculated Measure Expression dialog box.

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

CALCULATIONS AND DIMENSIONAL FUNCTIONS

4.

5.

6.
7.

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.
From the Data Items tab, drag Revenue under <#Time#> and to the left of
<#% of Base#> as a peer.
The results appear as follows:

Repeat steps 6 to 8 from Task 1 to format the % of Base cells under


<#Time#> to appear as percentages.
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.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

5-23

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

8.

Close IBM Cognos Viewer.

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.

5-24

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

CALCULATIONS AND DIMENSIONAL FUNCTIONS

Sort 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
Revenue
Star Peg
Tents Star Dome
Star Lite
Husky Rope 60
Rope Husky Rope 50
Husky Rope 100

2006

Revenue
Star Lite

1,324,840.70
28,721,600.42

Tents Star Dome


Star Peg

52,517,671.08
5,635.713.50

Husky Rope 100

2006
52,517,671.08
28,721,600.42
1,324,840.70
17,671,847.80

8,887,288.00

Rope Husky Rope 50

8,887,288.00

17,671,847.80

Husky Rope 60

5,635.713.50

Sort by Value - Ascending

Sort by Value - Descending


2012 IBM Corporation

By default, Report Studio 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, 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.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

5-25

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Rank Dimensional Data


rank (numeric_expression [ASC|DESC] [tuple member_expression
{ , member_expression }] within set set_expression)

Revenue

Revenue
Ranking

Quantity

Quantity Sold
Ranking

Personal Accessories

1,885,673,307.78

34,907,705

Camping Equipment

Revenue

1,589,036,664.03

27,301,149

Golf Equipment

726,411,367.89

5,113,701

Mountaineering Equipment

409,660,132.90

9,900,091

Outdoor Protection

75,994,296.25

12,014,445

2012 IBM Corporation

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.

5-26

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

CALCULATIONS AND DIMENSIONAL FUNCTIONS

Demo 3
Nest Dimensional Functions to Create a Dynamic
bottomPercent Report

2012 IBM Corporation

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

5-27

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Demo 3: Nest Dimensional Functions to Create a Dynamic


bottomPercent Report
Purpose:
You must create a report so that users can identify the countries
that are in the bottom 20% of planned revenue for a given year. The
report should show revenue values, and show the planned revenue
values separately. Users want to choose which countries they want
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:
User/Password:
Studio:
Package:
Report type:

http://localhost:88/ibmcognos
brettonf/Education1
Report Studio
Public Folders\Samples_PowerCube\Cubes\Sales and
Marketing (cube)
List

Task 1. Create a dynamic report using nested dimensional


functions.
1.
2.
3.

5-28

Create a new list report, without saving the previous report.


On the Insertable Objects pane\Toolbox tab, drag a Query Calculation
object to the report layout.
In the Name box type Selected Year, click Other expression, and then click
OK.

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

CALCULATIONS AND DIMENSIONAL FUNCTIONS

4.

5.
6.
7.
8.
9.

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
Click OK to close the Prompt dialog box.
Click OK to close the Data Item Expression dialog box.
From the Toolbox tab, drag a Query Calculation object to the report layout,
to the right of Selected Year.
In the Name box type Selected Countries, click Set expression, from the
Hierarchy drop-down list, click Retailers hierarchy and then click OK.
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

10. Click OK to close the Prompt dialog box.


11. Click OK to close the Set Expression dialog box.
12. 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.

Task 1, Step 9: If you do not select a hierarchy, an error will be displayed.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

5-29

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

13. From the Toolbox tab, drag a Query Calculation object to the report layout,
to the right of Selected Year. (Drop when you see 3 vertical bars or the Query
Calculation will not be available in the Expression Editor for later use. )
14. In the Name box type Bottom 20% Planned Revenue, click Set expression,
and then click OK.
15. 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
16. Click OK to close the Set Expression dialog box.

5-30

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

CALCULATIONS AND DIMENSIONAL FUNCTIONS

17. From the Source tab, drag the Revenue measure to the right of Bottom 20%
Planned Revenue, and then on the toolbar, click Run Report.
A prompt is generated, and appears as follows:

For the Country prompt, there are more than 20 countries to choose from. At
this point you will select all of them.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

5-31

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

18. Click Select all, 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.
19. Close IBM Cognos Viewer.
Task 2. Aggregate the Revenue column.
1.
2.
3.

5-32

In the report layout, click the Revenue column.


On the toolbar, click Summarize, in the drop-down menu, click Automatic
Summary, and then on the toolbar, click Run Report.
In the Retailer country list, click Brazil, and then Ctrl+click Canada,
Mexico, and United States.

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

CALCULATIONS AND DIMENSIONAL FUNCTIONS

4.

5.

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.
Close IBM Cognos Viewer.

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.
2.
3.

From the Toolbox tab, drag a Block object under the existing List report.
Click the block object in the report layout, in the Properties pane, under
Positioning, click the Size & Overflow property, and then click the ellipsis.
In the Size & Overflow dialog box, in the Height box, type 30, and then click
OK.
You have formatted the block object to a specific height for separating the
objects in your report, and will now add a second list report.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

5-33

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Task 4. Investigate the bottomPercent function.


1.

2.

3.
4.
5.
6.

7.

8.
9.

5-34

From the Toolbox tab, drag a List object under the block in the report layout,
and then in the bottom list report layout, click the Container Selector
to
select the list report.
For the remainder of this task, we will be working with the bottom list report.
In the Properties pane, under Data, click the Query property, and then in the
list, click Query1.
This will allow you to use items from Query1 in this list.
From the Data Items tab, drag the Planned revenue data item to the list
report.
Click <Planned revenue>, on the toolbar, click Summarize, and then in the
drop-down menu, click Total.
With <Planned revenue> selected, on the toolbar click Sort, and then in the
drop-down menu, click Ascending.
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.
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.
From the Toolbox tab, drag a Query Calculation object to the report layout,
to the right of the Planned revenue column.
In the Name box type % of Total Planned Revenue, click Calculated
measure, and then click OK.

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

CALCULATIONS AND DIMENSIONAL FUNCTIONS

10. 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> cells, 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, on the toolbar click
Right

14. On the toolbar, click Summarize, and then in the drop-down menu, click
Total.
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 tab, drag a Query Calculation, to the right of <% of Total
Planned Revenue>, named Running Total of % Planned Revenue, click
Other expression, and then click OK.
17. Create and validate the following expression:
running-total ([% of Total Planned Revenue])
Hints:
Available Components pane\ Data Items tab: % of Total Planned Revenue
18. Click OK to close the Data Item Expression dialog box.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

5-35

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

19. Click the <Running Total of % Planned Revenue> cells, in the Properties
pane, under Data, click the Data Format property, and then click the ellipsis.
20. In the Format type list, click Percent, and then click OK.
21. On the toolbar, click Run Report.
22. In the Retailer country list, click Brazil, Ctrl+click Canada, Mexico and
United States, in the Year list, click 2012, and then click OK.
The results appear as follows:

The bottom list report shows the total for planned revenue values for the four
countries. These are the same four countries that you selected in the prompt.
Also displayed is the percent of total planned revenues, and a running total.
For the top list report, the bottomPercent function works as follows:
The total planned revenue, for the selected countries from the prompt, is
evaluated to be 477,326,244.24.
The planned revenue from each of the selected countries is evaluated from
lowest to highest (Brazil, Mexico, Canada, United States).
The values from lowest to highest are summed, until a value that is 20% of
the total is reached. 20% of 477,326,244.24 = 95,465,248.85.

5-36

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

CALCULATIONS AND DIMENSIONAL FUNCTIONS

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.
23. Close IBM Cognos Viewer.
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.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

5-37

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

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

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

Outdoor Protection

Variance calculation based on two members from


different hierarchies in the same dimension
2012 IBM Corporation

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.

5-38

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

CALCULATIONS AND DIMENSIONAL FUNCTIONS

Demo 4
Create a Variance Calculation with Members from
Different Hierarchies of the Same Dimension

2012 IBM Corporation

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

5-39

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Demo 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:
User/Password:
Studio:
Package:
Report type:

http://localhost:88/ibmcognos
brettonf/Education1
Report Studio
Public Folders\Samples_PowerCube\Cubes\Sales and
Marketing (cube)
Crosstab

Task 1. Create a variance calculation for two members from


the same dimension but different hierarchies.
1.

5-40

Add the following query items to a new crosstab:


Columns area:
Time dimension\ Current Month hierarchy\ Members folder\
Current Month member
Time dimension\ Last Month hierarchy\ Members folder\ Last
Month member
Rows area:
Products dimension\ Products hierarchy\ Product line level
Measures area:
Measures dimension\ Revenue measure

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

CALCULATIONS AND DIMENSIONAL FUNCTIONS

2.

3.

4.

From the Toolbox tab, drag a Query Calculation object named Variance, as
a Calculated member to the Columns drop zone, as a peer of <#Last
Month#>.
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.
Click OK to close the Calculated Member Expression dialog box.
The report layout appears as follows:

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

5-41

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

5.

6.
7.

On the toolbar, click Run Report.


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.
Close IBM Cognos Viewer and Report Studio.
Log off of IBM Cognos Connection.

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.

Task 1, Step 7: Do not log off of IBM Cognos Connection if you are advancing to the next module today.

5-42

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

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

2012 IBM Corporation

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.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

5-43

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

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 ([2006],[Quantity]))

instead, a level can be used, following coercion rules


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

2012 IBM Corporation

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
There is a set of coercion rules defined in the Report Studio User Guide Chapter 11: Dimensional Reporting Style, Using
Dimensional Calculations section, and Dimensional Coercion Rules subsection, included with the IBM Cognos version
10.1.0 product documentation.

5-44

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

CALCULATIONS AND DIMENSIONAL FUNCTIONS

Summary
At the end of this module, you should be able to:
use IBM Cognos BI dimensional functions to create
sets and tuples
perform arithmetic operations in OLAP queries
identify coercion errors and rules

2012 IBM Corporation

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

5-45

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

5-46

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

Functions for Navigating


Dimensional Hierarchies
IBM Cognos BI

2012 IBM Corporation

IBM Internal Enablement Purpose Only

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

6-2

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

FUNCTIONS FOR NAVIGATING DIMENSIONAL HIERARCHIES

Objectives
At the end of this module, you should be able to:
navigate dimensional data using family functions

2012 IBM Corporation

Participants should be familiar with basic concepts of reporting using the dimensional style and dimensional data
sources.
Suggested modules to reference:
Introduction to Dimensional Reporting Concepts
Introduction to Dimensional Data in Reports
Focus Your Dimensional Data
Calculations and Dimensional Functions

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

6-3

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Use Family Functions to Navigate Data


Time

FirstChild
2011

Parent
2012Q 4

2011
2011
Q1

2011
Q2

2012
2011
Q3

2012
Q1

2011
Q4

2012
Q2

2012
Q3

2012
Q4

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

FirstSibling
2012 Q 4
Cousins

2011/Jan, 2005 Q 4

Ancestor
2011/Dec
3 levels up

2012 IBM Corporation

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

6-4

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

FUNCTIONS FOR NAVIGATING DIMENSIONAL HIERARCHIES

Return Child Members


children(member)

Camping Equipment
Mountaineering Equipment

children([Products])

Personal Accessories
Outdoor Protection
Golf Equipment

2012 IBM Corporation

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

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

6-5

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Return Parent Member


parent(member)

parent([Eyewear])

Personal Accessories

2012 IBM Corporation

This function returns the parent member of a specified member.


Most OLAP data sources only provide one parent member

6-6

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

FUNCTIONS FOR NAVIGATING DIMENSIONAL HIERARCHIES

Return Descendants
descendants(member|set_expression,level|distance
[,{ self|before|beforewithmember|after}])
Cooking Gear
TrailChef Water Bag
TrailChef Canteen
TrailChef Kitchen Kit
TrailChef Cup
TrailChef Cook Set
TrailChef Deluxe Cook Set

descendants([sales_and_
marketing].[Products].
[Products].[Product
line],3,before)

TrailChef Single Flame


TrailChef Double Flame
TrailChef Kettle
TrailChef Utensils
Tents
Star Lite
Star Dome
Star Gazer 2
Star Gazer 3
Star Gazer 6
Star Peg
Sleeping Bags

2012 IBM Corporation

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.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

6-7

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Demo 1
Create a Crosstab Report and Show
Descendants of the Products Hierarchy

2012 IBM Corporation

6-8

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

FUNCTIONS FOR NAVIGATING DIMENSIONAL HIERARCHIES

Demo 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:
User/Password:
Studio:
Package:
Report type:

http://localhost:88/ibmcognos
brettonf/Education1
Report Studio
Public Folders\Samples_PowerCube\Cubes\Sales and
Marketing (cube)
Crosstab

Task 1. Show a descendant level.


1.

Add the following query items to a new crosstab:


Columns area:
Time dimension\Time hierarchy\Year level
Measures area:
Measures dimension\Revenue measure

2.

From the Toolbox tab, drag a Query Calculation object named Descendants
of Products, as a Set expression, Products hierarchy, to the Rows drop zone.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

6-9

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

3.

4.
5.

6.

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
Click OK to close the Set Expression dialog box.
On the toolbar, click Run Report.
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.
Close IBM Cognos Viewer.

Task 2. Show an intermediate level of descendants.


1.
2.

6-10

In the report layout, right-click <Descendants of Products>, and then click


Edit Set.
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],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.

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

FUNCTIONS FOR NAVIGATING DIMENSIONAL HIERARCHIES

3.
4.

5.

Click OK to close the Set Expression dialog box, and then click OK to close
the Set Definition dialog box.
On the toolbar, click Run Report.
The results appear as follows:

The report shows members from the Product line level.


Close IBM Cognos Viewer.

Task 3. Show multiple intermediate levels.


1.
2.

3.
4.

5.
6.

In the layout report, right-click <Descendants of Products>, and then click


Edit Set.
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)
Click OK to close the Set Expression dialog box, and then click OK to close
the Set Definition dialog box.
In the report layout, ensure that <Descendants of Products> is selected, in
the Properties pane, under General, click the Level Indentation property,
and then click the ellipsis.
In the Indentation type section, click the Based on the level in the
hierarchy button to select it.
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.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

6-11

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

7.

8.

On the toolbar, click Run Report.


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.
Close IBM Cognos Viewer.

Task 4. Show multiple intermediate levels and the specified


level.
1.
2.

3.

6-12

In the report layout, right-click <Descendants of Products>, and then click


Edit Set.
In the Set Definition dialog box, double-click Set Expression, and then in the
Expression Definition box, modify and validate the expression as follows:
descendants ([Products],3,before self)
This will return members from the levels between the levels specified in the first
and second arguments, and the members from the level specified in the second
argument.
Click OK to close the Set Expression dialog box, and then click OK to close
the Set Definition dialog box.

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

FUNCTIONS FOR NAVIGATING DIMENSIONAL HIERARCHIES

4.

5.

On the toolbar, click Run Report.


A section of the report appears as follows:

The report shows members from the Product line, Product type, and
Product name levels.
Close IBM Cognos Viewer.

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.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

6-13

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Return Ancestor Members

ancestor (member, level|integer)

Ancestor
2012/Dec
Year level

2012

2012/Jan

2012
Q1

2012
Q2

2012
Q3

2012
Q4

2012/Feb

2012/Mar

2012/Oct

2012/Nov

2012/Dec

2012 IBM Corporation

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.

6-14

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

FUNCTIONS FOR NAVIGATING DIMENSIONAL HIERARCHIES

Return Cousin Members


cousin(member1, member2)
2012
member2

2012/Jan

2012
Q1

2012
Q2

2012
Q3

2012
Q4

2012/Feb

2012/Mar

2012/Oct

2012/Nov

2012/Dec

result

member1

2012 IBM Corporation

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.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

6-15

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Summary
At the end of this module, you should be able to:
navigate dimensional data using family functions

2012 IBM Corporation

6-16

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

FUNCTIONS FOR NAVIGATING DIMENSIONAL HIERARCHIES

Workshop 1
Determine the Product Line for a Product,
Using the ancestor() Function

2012 IBM Corporation

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

6-17

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

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

For more detailed information outlined as tasks, see the Task Table section.
For the final results, see the Workshop Results section that follows the Task Table
section.

One possible response to the optional challenge: parent (parent ([Capri]))

6-18

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

FUNCTIONS FOR NAVIGATING DIMENSIONAL HIERARCHIES

Workshop 1: Task Table


Task 1: Create a list report with a prompt to select a product.
Where to Work
Hints
Report Studio

Package: Public Folders\Samples\Cubes\Sales and


Marketing (cube).

Toolbar

Create a new list.

Toolbox tab\ Data Drag a Query Calculation object named Selected Product
Item tab
to the list report.
Set Expression
dialog
box\Expression
Definition box

Expression:
[sales_and_marketing]. [Products].[Products].
[Product]->?Product?

Task 2: Add a column to display the product line, using the ancestor
function.
Where to Work
Hints
Toolbox tab

Drag a Query Calculation object named Product Line of


Selected Product to the end of the list report.

Set Expression
dialog
box\Expression
Definition box

Expression:
ancestor([sales_and_marketing].[Products].[Products].[Product]
->
?Selected Product?,[sales_and_marketing].[Products].[Products
]. [Product line])

IBM Cognos
Viewer

Run the report, using Capri as the product at the prompt.

If you need more information to complete a task, see the Step-by-Step Instructions
section at the end of the Workshop.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

6-19

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Workshop 1: Results
The results appear as follows:

6-20

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

FUNCTIONS FOR NAVIGATING DIMENSIONAL HIERARCHIES

Workshop 1: Step-by-Step Instructions


Server:
User/Password:
Studio:
Package:
Report type:

http://localhost:88/ibmcognos
brettonf/Education1
Report Studio
Public Folders\Samples_PowerCube\Cubes\Sales and
Marketing (cube)
List

Task 1. Create a list report with a prompt to select a product.


1.
2.
3.

4.

Create a list report, without saving the previous report.


From the Toolbox tab, drag a Query Calculation object named Selected
Product, as a Set expression, Products hierarchy to the list report layout.
Create and validate the following expression:
[sales_and_marketing].[Products].[Products].[Product]->?Selected
Product?
Hints:
Available Components pane\Source tab: Products dimension\Products
hierarchy\Product level
Validate using Aloe Relief
Click OK to close the Prompt dialog box, and then click OK to close the Set
Expression dialog box.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

6-21

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Task 2. Add a column to display the product line, using the


ancestor function.
1.

2.

3.
4.

5.

From the Toolbox tab, drag a Query Calculation object named Product
Line of Selected Product, as a Set expression, Products hierarchy, to the
right of Selected Product in the list report.
Create and validate the following expression:
ancestor([sales_and_marketing].[Products].[Products].[Product]->
?Selected Product?, [sales_and_marketing].[Products].[Products].
[Product line])
Hints:
Available Components pane\Source tab: Products dimension\Products
hierarchy\Product level
Available Components pane\Parameters tab: Product
Available Components pane\Source tab: Products dimension\Products
hierarchy\Product line level
Click OK to close the Set Expression dialog box.
On the toolbar, click Run Report, from the prompt list, click Capri as the
product, and then click OK.
The report shows the selected product and the corresponding product line
level.
Close IBM Cognos Viewer.

Task 2, Step 2: You could also use the data item Selected Product instead of the first 2 hint bullets.

6-22

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

FUNCTIONS FOR NAVIGATING DIMENSIONAL HIERARCHIES

Workshop 2
Create a Dynamic
Crosstab Report with
Combined Dimensional
Functions

2012 IBM Corporation

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

6-23

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

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

6-24

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

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 detailed information outlined as tasks, see the Task Table section.
For the final results, see the Workshop Results section that follows the Task Table
section.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

6-25

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Workshop 2: Task Table


Task 1: Create a crosstab report that includes the descendants of the
Retailers hierarchy on rows.
Where to Work
Hints
Report Studio

Package: Sales and Marketing (cube)

Insertable Objects pane\


Toolbox tab

Measure: Planned revenue

Set Expression dialog


box\Expression
Definition box

Rows: Query Calculation object named Location.


Expression:
descendants ([sales_and_marketing].[Retailers].
[Retailers].[Region], [sales_and_marketing].
[Retailers].[ Retailers].[Retailer site],self before)

Properties pane\Level
Indentation property

Indentation length: 15 px

IBM Cognos Viewer

Run the report.

6-26

Indentation start level: 2

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

FUNCTIONS FOR NAVIGATING DIMENSIONAL HIERARCHIES

Task 2: Add a prompt for Order Method.


Where to Work
Hints
Insertable Objects pane\
Toolbox tab

Columns: Query Calculation object named Selected


Order Method.

Set Expression dialog


box\Expression
Definition box

Expression:
[sales_and_marketing]. [Order method].[Order
method].[Order method type]->?Order Method?

Page Explorer\Prompt
Pages
Insertable Objects pane\
Toolbox tab
Prompt Wizard - Value
Prompt dialog box

Create a prompt page and add a Page object.

IBM Cognos Viewer

Run the report, selecting Web in the prompt.

Add a Value Prompt object to the page, using the


existing Order Method parameter.

Task 3: Add a prompt for Quarter.


Where to Work
Hints
Page Explorer\Prompt
Pages

Add the second Value Prompt object to the prompt


page.

Insertable Objects pane\


Toolbox tab

Create a new parameter called Quarter.

Prompt Wizard - Value


Prompt dialog box
IBM Cognos Viewer

2007, 2012, IBM Corporation

Create a parameterized filter using the Quarter level as


the package item.
Run the report, selecting Web, and then 2012 Q 4 in the
prompts.

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

6-27

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Task 4: Create an expression that returns the total planned revenue for
order methods for each location, except for the order methods that
are chosen in the prompt.
Where to Work
Hints
Page Explorer\Report
Pages\Page1

Columns: to the right of Selected Order Method, use


a Query Calculation object named All Other Order
Methods.

Insertable Objects pane\


Toolbox tab

Expression:
aggregate (currentMeasure within set except ([sales_
and_marketing]. [Order method].[Order method].
[Order method type], [Selected Order Method]))

IBM Cognos Viewer

Run the report, selecting Web, and then 2012 Q 4 in the


prompts.

6-28

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

FUNCTIONS FOR NAVIGATING DIMENSIONAL HIERARCHIES

Task 5: Show the chosen quarter from the second prompt, as a title on the
report (Additional Challenge).
Where to Work
Hints
Text Item Properties
pane

Change the Source Type property of the report title to


Report Expression.

Report Expression dialog Set the Report Expression property using the
box\Available
following expression:
Components pane\
ParamDisplayValue ('Quarter')
Parameters tab\
Use the Quarter parameter.
Expression Definition
box
Left-justify the title.
Run the report, selecting Web, and then 2012 Q 4 in the
prompts.
IBM Cognos Viewer

Close IBM Cognos Viewer and Report Studio


without saving the report.
Close IBM Cognos Connection.

If you need more information to complete a task, see the Step-by-Step instructions at
the end of the Workshop.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

6-29

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Workshop 2: Workshop Results


At the end of Task 5, after running the report, and selecting Web in the first prompt,
and 2012 Q 4 in the second prompt, the first page of the report appears as follows:

6-30

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

FUNCTIONS FOR NAVIGATING DIMENSIONAL HIERARCHIES

Workshop 2: Step-by-Step Instructions


Server:
User/Password:
Studio:
Package:
Report type:

http://localhost:88/ibmcognos
brettonf/Education1
Report Studio
Public Folders\Samples_PowerCube\Cubes\Sales and
Marketing (cube)
Crosstab

Task 1. Create a crosstab report that includes the


descendants of the Retailers hierarchy on rows.
1.

2.
3.

4.

Add the following query item in to a new crosstab:


Measures area:
Measures dimension\Planned revenue measure
From the Toolbox tab, drag a Query Calculation object named Location, as
a Set expression, Retailers hierarchy, to the Rows drop zone.
Create and validate the following expression:
descendants ([sales_and_marketing].[Retailers].[Retailers].[Region],
[sales_and_marketing].[Retailers].[Retailers].[Retailer site],self before)
Hints:
Available Components pane\Source tab: Retailers dimension\Retailers
hierarchy\Region level
Available Components pane\Source tab: Retailers dimension\Retailers
hierarchy\Retailer site level
Click OK to close the Set Expression dialog box.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

6-31

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

5.
6.
7.
8.

9.

In the report layout, click <Location>, in the Properties pane, under General,
click the Level Indentation property, and then click the ellipsis.
In the Indentation type section, 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.
On the toolbar, click Run Report.
A section of the report appears as follows:

Close IBM Cognos Viewer.

Task 2. Add a prompt for Order Method.


1.

2.

6-32

From the Toolbox tab, drag a Query Calculation object named Selected
Order Method, as a Set expression, Order method hierarchy, to the
Columns drop zone.
Create and validate the following expression:
[sales_and_marketing].[Order method].[Order method].[Order method
type]->?Order Method?
Hints:
Available Components pane\Source tab: Order method dimension\Order
method hierarchy\Order method type level
Validate using Web

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

FUNCTIONS FOR NAVIGATING DIMENSIONAL HIERARCHIES

3.
4.
5.
6.
7.
8.
9.

Click OK to close the Set Expression dialog box.


On the Explorer bar, point to the Page Explorer, and then click Prompt
Pages.
On the Insertable Objects pane, drag a Page object to the Prompt Pages
pane, and then double-click Prompt Page1.
Toolbox tab, drag a Value Prompt object to the prompt page of the report.
In the Prompt Wizard - Value Prompt dialog box, click Use existing
parameter, in the list, click Order Method, and then click Next.
Accept the default selection to create a new query, and then click Finish.
On the toolbar click Run Report, at the prompt, click Web, and then click
Finish.
A section of the report appears as follows:

10. Close IBM Cognos Viewer.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

6-33

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Task 3. Add a prompt for Quarter.


1.
2.
3.
4.
5.
6.

7.

6-34

From the Toolbox tab, drag a Value Prompt object to the prompt page to the
right of the existing Value Prompt control.
In the Prompt Wizard - Value Prompt dialog box, in the Create a new
parameter box, 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.
In the 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.
On the toolbar, click Run Report, at the first prompt click Web, at the second
prompt from the Quarter list, click 2012 Q 4, and then click Finish.
A section of the report appears as follows:

Close IBM Cognos Viewer.

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

FUNCTIONS FOR NAVIGATING DIMENSIONAL HIERARCHIES

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.
1.
2.

3.

4.

On the Explorer bar, point to Page Explorer, and then under Report Pages,
click Page1.
From the Toolbox tab, drag a Query Calculation object named All Other
Order Methods, as a Calculated Member, Order method hierarchy, to the
columns to the right of <Selected Order Method>, as a peer.
Create and validate the following expression:
aggregate (currentMeasure within set except ([sales_and_marketing].
[Order method].[Order method].[Order method type],[Selected Order
Method]))
Hints:
Available Components pane\Source tab: Order method dimension\Order
method hierarchy\Order method type level
Available Components pane\Data Items tab: Selected Order Method
Validate using 2012 Q 4
Click OK to close the Calculated Member Expression dialog box.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

6-35

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

5.

On the toolbar, click Run Report, at the first prompt click Web, at the second
prompt from the Quarter list, click 2012 Q 4, and then click Finish.
A section of the report appears as follows:

6.

Close IBM Cognos Viewer.

Task 5. Show the chosen quarter from the second prompt, as


a title on the report (Additional Challenge).
1. In the layout report header, click the header Text Item object (which currently
states Double-click to edit text).
2. In the Properties pane, under Text Source, click the Source Type property,
and then in the list, click Report Expression.
3. In the Properties pane, under the Text Source, click the Report Expression
property, and then click the ellipsis.
4. On the Available Components pane\Parameters tab, drag Quarter to the
Expression Definition box.
The expression appears as follows:
ParamDisplayValue('Quarter')

6-36

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

FUNCTIONS FOR NAVIGATING DIMENSIONAL HIERARCHIES

5.

Validate the expression to ensure there are no errors, and then click OK to
close the Report Expression dialog box.

6.

In the Properties pane, click Select Ancestor

7.

8.
9.

, click Block to select the

block of the title text, and then on the toolbar, click Left
to left align the
title.
On the toolbar, click Run Report, at the first prompt click Web, at the second
prompt from the Quarter list, click 2012 Q 4, and then click Finish.
Refer to the Workshop Results section for an example of the report.
Close IBM Cognos Viewer, and then close Report Studio without saving the
report.
Log off of IBM Cognos Connection.

Task 5, step 9: Do not log off of IBM Cognos Connection if you are advancing to the next module today.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

6-37

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

6-38

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

Relative Functions
IBM Cognos BI

2012 IBM Corporation

IBM Internal Enablement Purpose Only

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

7-2

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

RELATIVE

FUNCTIONS

Objectives
At the end of this module, you should be able to:
navigate dimensional data using relative functions
navigate dimensional data using relative time
functions

2012 IBM Corporation

Custom Courses:
Participants should be familiar with basic concepts of reporting using the dimensional style and dimensional data
sources.
Suggested modules to reference:
Introduction to Dimensional Reporting Concepts
Introduction to Dimensional Data in Reports
Focus Your Dimensional Data
Calculations and Dimensional Functions

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

7-3

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Use Functions to Navigate Data


Report Studio 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)
2012 IBM Corporation

7-4

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

RELATIVE

FUNCTIONS

Dimensional Structures (Review)


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

2013
Q2

2012/Jan 2012/Feb 2012/Mar

2013

2013
Q3

2013
Q4

2013
Q1

2013
Q2

2013
Q3

2013
Q4

2012/Oct 2012/Nov 2012/Dec

2012 IBM Corporation

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

7-5

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Use Relative Functions to Navigate Data


prevMember(member)

lead(member, index_expression)

nextMember(member)

lag(member, index_expression)
Time

2011
2011
Q1

2011
Q2

2011/Jan 2011/Feb 2011/Mar

prevMember
2011/Feb

2011
Q3

2012
2011
Q4

2012
Q1

2012
Q2

2012
Q3

2012
Q4

2011/Oct 2011/Nov 2011/Dec

nextMember
2011/Feb

lag
2012 Q 2
one member backward

lead
2012 Q 2 two
members forward

2012 IBM Corporation

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

7-6

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

RELATIVE

FUNCTIONS

Demo 1
Use Family and Relative Dimensional Functions to Focus
Reports

2012 IBM Corporation

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

7-7

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Demo 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:
User/Password:
Studio:
Package:
Report type:

http://localhost:88/ibmcognos
brettonf/Education1
Report Studio
Public Folders\Samples_PowerCube\Cubes\Sales and
Marketing (cube)
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.
2.
3.

7-8

In Report Studio, using the Sales and Marketing (cube) package, create a
new crosstab report.
From the Source tab, expand the Time dimension, and then drag the Time
hierarchy to the Rows drop zone.
In the Insert Hierarchy dialog box, click All members, and then click OK.

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

RELATIVE

4.
5.

6.

7.

FUNCTIONS

In the crosstab, click <#Time#>, in the Properties pane, under General,


click the Level Indentation property, and then click the ellipsis.
In the Level Indentation dialog box, in the Indentation type section, click
the Based on the level in the hierarchy button to select it, in the Indentation
length box, type 15, and then click OK.
On the toolbar, click Run Report.
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.
Close IBM Cognos Viewer.

Task 1, step 6: 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.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

7-9

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Task 2. Create a crosstab report that prompts the user for a


month.
1.

2.

3.

4.
5.

7-10

Add the following query items to a new crosstab:


Rows area:
Products dimension\Products hierarchy\Product line level
Measures area:
Measures dimension\Returns measure
From the Toolbox tab, drag a Query Calculation object named Selected
Month, as a Set expression of the Time hierarchy, to the Columns drop
zone.
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 mounth in the prompt
Click OK to close the Prompt dialog box.
The expression has no errors.
Click OK to close the Set Expression dialog box.
The results appear as follows:

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

RELATIVE

FUNCTIONS

Task 3. Test the crosstab report.


1.
2.

3.

On the toolbar, click Run Report.


A generic prompt page appears requiring the selection of a month.
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.
Close IBM Cognos Viewer.

Task 4. Create a calculation to show values for the previous


month.
1.

2.

From the Toolbox tab, drag a Query Calculation object named Previous
Month, as a Set expression of the Time hierarchy, to the right of <Selected
Month>, as a peer.
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 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

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

7-11

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

3.

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.

2.

3.

From the Toolbox tab, drag a Query Calculation object named Previous
Year, as a Set expression of the Time hierarchy to the right of Previous
Month, as a peer.
In the Expression Definition box, create the expression as follows:
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
Click OK to close the Set Expression dialog box.
The results appear as follows:

Task 5, step 2: 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.

7-12

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

RELATIVE

FUNCTIONS

Task 6. Test the finished crosstab report.


1.
2.

3.

On the toolbar, click Run Report.


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.
Close IBM Cognos Viewer.

Results:
Using family and relative dimensional functions, you quickly created
reports to compare different time periods.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

7-13

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Use Relative Time Functions to Navigate Data


(Overview)
openingPeriod
month level
2012

parallelPeriod
2013 Q 4
prior year

Time
2012

2012
Q1

2012
Q2

2012
Q3

2012/Jan 2012/Feb 2012/Mar

2013
2012
Q4

2013
Q1

2013
Q2

2013
Q3

2013
Q4

2012/Oct 2012/Nov 2012/Dec

periodsToDate
2013 Q 3
closingPeriod
month level
2012
2012 IBM Corporation

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.

7-14

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

RELATIVE

FUNCTIONS

The closingPeriod Function


closingPeriod(level [,member])
closingPeriod ([sales_and_marketing].[Time].[Time].[Quarter])
Time
2012
2012
Q1

2012
Q2

2012/Jan 2012/Feb 2012/Mar

2013

2012
Q3

2012
Q4

2013
Q1

2013
Q2

2013
Q3

2013
Q4

2012/Oct 2012/Nov 2012/Dec

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

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.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

7-15

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

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
2012
Q1

2012
Q2

2012/Jan 2012/Feb 2012/Mar

2012
Q3

2013
2012
Q4

2013
Q1

2013
Q2

2013
Q3

2013
Q4

2012/Oct 2012/Nov 2012/Dec


2012 IBM Corporation

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.

7-16

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

RELATIVE

FUNCTIONS

Demo 2
Use Relative Time Dimensional Functions to Focus
Reports

2012 IBM Corporation

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

7-17

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Demo 2: Use Relative Time Dimensional Functions to Focus


Reports
Purpose:
Staff want 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:
User/Password:
Studio:
Package:
Report type:

http://localhost:88/ibmcognos
brettonf/Education1
Report Studio
Public Folders\Samples_PowerCube\Cubes\Sales and
Marketing (cube)
Chart

Task 1. Create a gauge chart and a prompt page.


IBM Cognos BI now has two charting options. The new charting styles options are set
as the default. You will make use of these new styles to add charts to your reports.
1.
2.

7-18

In Report Studio, from the File menu, click New, click No to saving the
report, and then double-click Chart.
In the Insert Chart dialog box, in the Chart group pane, click Gauge, and
then click OK.

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

RELATIVE

3.

FUNCTIONS

Add the following query items to the new gauge chart:


Default measure (y-axis): Measures dimension\Revenue measure
Gauge Axes: Products dimension\Products hierarchy\Product line level
Categories (gauges): Retailers dimension\Retailers hierarchy\Retailer
name level
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.

, and then click Prompt


On the Explorer bar, point to Page Explorer
Pages.
5. From the Toolbox tab, drag a Page object to the Prompt Pages pane, and
then in the Prompt Pages pane, double-click Prompt Page1.
6. From the Toolbox tab, drag a Select & Search Prompt object to the prompt
page.
The Prompt Wizard dialog appears.
7. In the Create a new parameter box, type Retailer, and then click Next.
8. Beside the Package item box, click the ellipsis, expand the Retailers
dimension\Retailers hierarchy, select Retailer name level, and then click OK.
9. Click Next, accept the default to create a new query, and then click Finish.
10. On the toolbar, click Run Report.
11. In the Keywords box, type ex, and then click Search.
4.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

7-19

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

12. In the Choice list, click Extreme Outdoors, and then click Finish.
The results appear as follows:

Results are returned for Extreme Outdoors. The values are for all years. You
want to limit this gauge chart to the current month, July 2013.
13. Close IBM Cognos Viewer.

7-20

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

RELATIVE

FUNCTIONS

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

3.

4.

On the Explorer bar, point to Page Explorer, and then click Page1.
From the Toolbox tab, drag a Query Calculation object named Latest
Month, as a Set expression of the Time hierarchy, below <#Retailer
name#> in the Categories (gauges) drop zone.
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
Click OK to close the Set Expression dialog box.

Task 2, step 3: 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]).

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

7-21

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

5.
6.
7.

8.

On the toolbar, click Run Report.


In the Keywords box, type ex, and then click Search.
In the Choice list, click Extreme Outdoors, and then click Finish.
The results appear as follows:

The report now shows values for the last month found in the cube: July 2013.
Close IBM Cognos Viewer.

You could have used a closingPeriod calculation in this demo, 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.

7-22

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

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

3.
4.

5.

From the Toolbox tab, drag a Chart object to the right of the gauge chart on
the report page.
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.
On the layout report, click the column chart, and then in the Properties pane,
under Data, change the Query property to Query1.
Populate the column chart, using the following items from the Data Items
tab, from Query1:
Default measure (y-axis): Revenue
Series (primary axis): Product line
From the Toolbox tab, drag a Query Calculation object named Year-toPeriod, as a Set expression of the Time hierarchy to the Categories (x-axis)
drop zone.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

7-23

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

6.

7.

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.
Click OK to close the Set Expression dialog box.

Task 3, step 6: 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.

7-24

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

RELATIVE

FUNCTIONS

Task 4. Test the final report.


1.
2.
3.

4.

On the toolbar, click Run Report.


In the Keywords box, type ex, and then click Search.
In the Choice list, click Extreme Outdoors, 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.
Close IBM Cognos Viewer.

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.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

7-25

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

The parallelPeriod Function


parallelPeriod(level [, integer_expression [, member] ])
parallelPeriod([sales_and_marketing].[Time].[Time].[Year],1,[2013 Q 4])

Time
2012
2012
Q1

2012
Q2

2012/Jan 2012/Feb 2012/Mar

2013

2012
Q3

2012
Q4

2013
Q1

2013
Q2

2013
Q3

2013
Q4

2012/Oct 2012/Nov 2012/Dec

parallelPeriod([sales_and_marketing].[Time].[Time].[Quarter],-3,[2012/Feb])
2012 IBM Corporation

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.

7-26

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

RELATIVE

FUNCTIONS

Demo 3
Create a Periods-to-Date Report and Compare to the
Previous Year

2012 IBM Corporation

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

7-27

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Demo 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:
User/Password:
Studio:
Package:
Report type:

http://localhost:88/ibmcognos
brettonf/Education1
Report Studio
Public Folders\Samples_PowerCube\Cubes\Sales and
Marketing (cube)
Crosstab

Task 1. Create a crosstab report with a prompt for the


quarter.
1.

2.

7-28

Add the following query items to a new crosstab:


Rows area:
Products dimension\Products hierarchy\Product line level
Measures area:
Measures dimension\Revenue measure
From the Toolbox tab, drag a Query Calculation object named Selected
Quarter, as a Set expression of the Time hierarchy, to the Columns drop
zone.

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

RELATIVE

3.

4.

FUNCTIONS

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

2.

3.

From the Toolbox tab, drag a Query Calculation object named Selected
Quarter for Previous Year, as a Set expression of the Time hierarchy, to the
right of <Selected Quarter>, as a peer.
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
Click OK to close the Set Expression dialog box.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

7-29

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Task 3. Create a prompt page and test the report.


You will create a prompt page that allows a single selection.
1.
2.
3.
4.
5.
6.
7.

8.

7-30

On the Explorer bar, point to Page Explorer, click Prompt Pages, and then
From the Toolbox tab, drag a Page object to the Prompt Pages pane.
In the Prompt Pages pane, double-click Prompt Page1.
From the Toolbox tab, drag a Value Prompt object to the prompt page.
Click Use existing parameter, and then in the list, click Quarter.
Click Next, and then click Finish.
On the toolbar, click Run Report.
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.
Close IBM Cognos Viewer.

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

RELATIVE

FUNCTIONS

Task 4. Create tuples to show the quantities sold for the


quarters.
1.
2.

3.

4.
5.

6.

On the Explorer bar, point to Page Explorer, and then click Page1.
From the Toolbox tab, drag a Query Calculation object named Quantity
Sold for Selected Quarter, as a Set expression of the Time hierarchy, to the
right of <Selected Quarter>, as a peer.
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
Click OK to close the Set Expression dialog box.
From the Toolbox tab, drag a Query Calculation object named Quantity
Sold for Selected Quarter Previous Year, as a Set expression of the Time
hierarchy, to the right of <Selected Quarter for Previous Year>, as a peer.
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

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

7-31

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

7.
8.

Click OK to close the Set Expression dialog box.


On the toolbar, click Run Report, at the prompt, click 2013 Q 2, and then click
Finish.
The results appear as follows:

9.

Close IBM Cognos Viewer.

Task 5. Create more appropriate labels for the tuple


calculations.
1.
2.
3.

4.

7-32

On the toolbar, click Unlock (currently locked)


.
In the crosstab, click the <Quantity Sold for Selected Quarter> column
header.
In the Properties pane, under Text Source, make the following changes:
Source Type property: Report Expression
Report Expression property: [Query1].[Selected Quarter]
From the Toolbox tab, drag a Text Item object to the right of the second
column header in the crosstab, after <%[Query1].[Se%>.

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

RELATIVE

FUNCTIONS

5.
6.

In the Text box, press the spacebar, type Quantity Sold, and then click OK.
Repeat steps 2 to 5 to change the <Quantity Sold for Selected Quarter
Previous Year> column header:
Report Expression property: Selected Quarter for Previous Year
Ensure that the Source Type property is Report Expression.

7.
8.

to lock the report.


On the toolbar, click Lock (currently unlocked)
On the toolbar, click Run Report, in the prompt, click 2013 Q 2, and then click
Finish.
The results appear as follows:

9.

The tuple calculation column headers now display more intuitive labels.
Close IBM Cognos Viewer.

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 tab, drag a Query Calculation object named Year-toPeriod, as a Set expression of the Time hierarchy, to the right of the second
column, as a peer.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

7-33

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

2.

3.
4.

5.

6.

7-34

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
Click OK to close the Set Expression dialog box.
On the toolbar, click Run Report, 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.
Close IBM Cognos Viewer, in the report layout, click <Year-to-Period>, and
then from the toolbar, 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.
From the Toolbox tab, drag a Query Calculation object named Year-toPeriod Totals, as a Calculated member, to the right of the second column, as
a peer.

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

RELATIVE

7.

8.

FUNCTIONS

Create and validate the following expression:


aggregate (currentMeasure within set[Year-to-Period])
Hints:
Available Components pane\Data Items tab: Year-to-Period
Click OK to close the Calculated Member Expression dialog box.

Task 7. Create a calculation to show the previous year-toperiod totals.


1.

2.

3.
4.
5.

From the Toolbox tab, drag a Query Calculation object named Previous
Year-to-Period, as a Set expression of the Time hierarchy, to the right of the
last column, as a peer.
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
Click OK to close the Set Expression dialog box.
Cut <Previous Year-to-Period> from the report layout.
From the Toolbox tab, drag a Query Calculation object named Previous
Year-to-Period Totals, as a Calculated member, to the right of the last
column, as a peer.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

7-35

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

6.

7.
8.
9.

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
Click OK to close the Calculated Member Expression dialog box.
On the toolbar, click Run Report.
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.
10. Close IBM Cognos Viewer.
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.

7-36

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

RELATIVE

FUNCTIONS

The lastPeriods Function


lastPeriods(integer_expression, member)

2012/Oct
2012/Nov

lastPeriods(6,[2013/Mar])

2012/Dec
2013/Jan
2013/Feb
2013/Mar

2012 IBM Corporation

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

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

7-37

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Demo 4
Create a Report that Spans the Past Six Months Based
on a Selected Month

2012 IBM Corporation

7-38

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

RELATIVE

FUNCTIONS

Demo 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:
User/Password:
Studio:
Package:
Report type:

http://localhost:88/ibmcognos
brettonf/Education1
Report Studio
Public Folders\Samples_PowerCube\Cubes\Sales and
Marketing (cube)
Crosstab

Task 1. Create a crosstab report with a prompt for the


quarter.
1.

2.

Add the following query items to a new crosstab:


Rows area:
Products dimension\Products hierarchy\Product line level
Measures area:
Measures dimension\Revenue measure
From the Toolbox tab, drag a Query Calculation object named Selected
Month, as a Set expression of the Time hierarchy, to the Columns drop
zone.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

7-39

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

3.

4.

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

2.

3.

7-40

From the Toolbox tab, drag a Query Calculation object named Selected Six
Months, as a Set expression of the Time hierarchy, to the right of <Selected
Month>, as a peer.
Create and validate the following expression:
lastPeriods (6,[Selected Month])
Hints:
Available Components pane\Data Items tab: Selected Month
Click OK to close the Set Expression dialog box.

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

RELATIVE

4.
5.

6.

7.

FUNCTIONS

Cut <Selected Month> from the report because it is not required in the
layout.
On the report layout, click one of the <Selected Six Months> column
headers, on the toolbar, click Summarize
, and then in the drop-down
menu, click Automatic Summary.
On the toolbar, click Run Report, 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.
Close IBM Cognos Viewer.

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.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

7-41

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Summary
At the end of this module, you should be able to:
navigate dimensional data using relative functions
navigate dimensional data using relative time
functions

2012 IBM Corporation

7-42

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

RELATIVE

FUNCTIONS

Workshop 1
Create a Dashboard Report to Compare Various Time
Periods

2012 IBM Corporation

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

7-43

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Workshop 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

7-44

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

RELATIVE

FUNCTIONS

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
enable tooltips on the charts so that when consumers pause their pointers over
an item, they can view more information
center the report objects on the page and ensure they are formatted to appear in
an appropriate size
For more detailed information outlined as tasks, see the Task Table section.
For the final results, see the Workshop Results section that follows the Task Table
section.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

7-45

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Workshop 1: Task Table


Task 1: Create a map report.
Where to Work
Hints
Report Studio\ File
menu

Package: Sales and Marketing (cube)

Source tab\report layout

Add the Retailer country level to the Location drop


zone.

Properties pane

Show the tooltips and hide the legend for the map.

Toolbar

Change the page alignment to the top center.

Create a new report, choose Map, and accept the default


settings.

Task 2: Add a column chart to the report and add a calculation that returns
the latest month.
Where to Work
Hints
Toolbox tab\report
layout

Add a Block item below the map.

Properties pane

Add a Column with 3-D visual Effect chart below the


block item and associate the new chart with Query1.

Source tab\report
layout\column chart

Default measure (y-axis): Revenue measure

Set Expression dialog


box\Expression
Definition box

Properties pane

7-46

Series: Product line level


Categories (x-axis): Query Calculation named Latest
Month with the following expression:
item (tail (filter ([sales_and_marketing].[Time].[Time].
[Month], currentMeasure is not null)),0)
Show the tooltips for the chart.

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

RELATIVE

FUNCTIONS

Task 3: Display the revenue and latest month data in the map object.
Where to Work
Hints
Source tab\report
layout\map

Color drop zone: Data Item: Latest Month


Default drop zone: Data Item: Revenue

Task 4: Create calculations to compare the latest month to other periods.


Where to Work
Hints
Toolbox tab\report
layout\column chart
Set Expression dialog
box\Expression
Definition box
Toolbox tab\report
layout\ column chart
Set Expression dialog
box\Expression
Definition box
Toolbox tab\report
layout\ column chart
Set Expression dialog
box\Expression
Definition box

2007, 2012, IBM Corporation

Drag a Query Calculation named Same Month


Previous Quarter to the right of Latest Month, with
the following expression:
parallelPeriod ([sales_and_marketing].
[Time].[Time].[Quarter],1,[Latest Month])

Drag a Query Calculation named Same Month


Previous Year to the right of Same Month Previous
Quarter, with the following expression:
parallelPeriod ([sales_and_marketing].
[Time].[Time].[Year],1,[Latest Month])
Drag a Query Calculation named Same Month 2
Years Ago to the right of Same Month Previous
Year, with the following expression:
parallelPeriod ([sales_and_marketing]. [Time].[Time].
[Year],2,[Latest Month])

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

7-47

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Task 5: Create a calculation called Quarter-to-Period to show revenue


totals.
Where to Work
Hints
Toolbox tab\report
layout\ column chart
Calculated Member
Expression dialog
box\Expression
Definition box

Drag a Query Calculation named Quarter-to-Period


to the right of Same Month 2 Years Ago, with 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.
Where to Work
Hints
Toolbox tab\report
layout\ column chart
Set Expression dialog
box\Expression
Definition box

Drag a Query Calculation named Total Previous


Quarter to the right of Quarter-to-Period, with the
following expression:
prevMember (parent ([Latest Month]))

Task 7: Format the chart and test the report.


Where to Work
Hints
Report layout\Properties Change the Size & Overflow property for the chart to
pane\ column chart
have a width of 10 inches.
IBM Cognos Viewer

On the toolbar, click Run Report to view the results.

If you need more information to complete a task, see the Step-by-Step Instructions
section at the end of the Workshop.

7-48

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

RELATIVE

FUNCTIONS

Workshop 1: Workshop Results


The report results appear as shown below:

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

7-49

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Workshop 1: Step-by-Step Instructions


Server:
User/Password:
Studio:
Package:
Report type:

http://localhost:88/ibmcognos
brettonf/Education1
Report Studio
Public Folders\Samples_PowerCube\Cubes\Sales and
Marketing (cube)
Map

Task 1. Create a map report.


1.
2.
3.
4.
5.

6.

In Report Studio, from the File menu, click New, click No to saving the
report, and then double-click Map.
Click OK to accept the Choose Map default settings.
Add the following query item to the new map:
Location: Retailers dimension\Retailers hierarchy\Retailer country level
Click the map background to select it.
In the Properties pane, ensure the following properties have been set:
Chart Labels: Tooltips property\Show
Chart Annotations: Legend property\Hide
Click the report page to select the Page Body, on the toolbar, click
Center

, and then click Top

Task 2. Add a column chart to the report and add a


calculation that returns the latest month.
1.
2.

7-50

From the Toolbox tab, drag a Block object to the right of the map, and then
drag a Chart object below the block object.
In the Chart type pane, click Clustered Column with 3-D Effects, and then
click OK.
You will associate this new chart with Query1.

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

RELATIVE

3.
4.

5.
6.

7.
8.

FUNCTIONS

On the report layout, click the column chart background, and then in the
Properties pane, under Data, change the Query property to Query1.
Add the following query items to the column chart:
Series (primary axis): Products dimension\Products hierarchy\Product
line level
Default measure (y-axis): Measures dimension\Revenue measure
From the Toolbox tab, drag a Query Calculation named Latest Month, as a
Set expression of the Time hierarchy, to the Categories (x-axis) drop zone.
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
You have dynamically determined the latest month with data, which in this data
source is July 2013.
Click OK to close the Set Expression dialog box.
Click the column chart background, and then in the Properties pane, under
General, ensure that the Tooltips property is Absolute.

Task 3. Display the revenue and latest month data in the map
object.
1.
2.

From the Data Items tab, drag Latest Month to the Color drop zone on the
map report layout.
From the Data Items tab, drag Revenue to the Default drop zone on the
map report layout.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

7-51

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Task 4. Create calculations to compare the latest month to


other periods.
1.

2.

3.
4.

5.

6.

7-52

From the Toolbox tab, drag a Query Calculation object named Same Month
Previous Quarter, as a Set expression of the Time hierarchy, to Categories
(x-axis) to the right of <#Latest Month#> on the column chart.
Create and validate the following expression:
parallelPeriod ([sales_and_marketing].[Time].[Time].[Quarter],1,
[Latest Month])
Hints:
Available Components pane\Source tab: Time dimension\Time
hierarchy\Quarter level
Available Components pane\Data Items tab: Latest Month
Click OK to close the Set Expression dialog box.
From the Toolbox tab, drag a Query Calculation object named Same Month
Previous Year, as a Set expression of the Time hierarchy, to the Categories
(x-axis) drop zone, to the right of <#Same Month Previous Quarter#> on
the column chart.
Create and validate the following expression:
parallelPeriod ([sales_and_marketing].[Time].[Time].[Year],1,[Latest
Month])
Hints:
Available Components pane\Source tab: Time dimension\Time
hierarchy\Year level
Available Components pane\Data Items tab: Latest Month
Click OK to close the Set Expression dialog box.

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

RELATIVE

7.

8.

9.

FUNCTIONS

From the Toolbox tab, drag a Query Calculation object named Same Month
2 Years Ago, as a Set expression of the Time hierarchy, to the Categories
(x-axis) drop zone, to the right of <#Same Month Previous Year #> on the
column chart.
Create and validate the following expression:
parallelPeriod ([sales_and_marketing].[Time].[Time].[Year],2,[Latest
Month])
In the expression, you will use 2 to go back two years.
Hints:
Available Components pane\Source tab: Time dimension\Time
hierarchy\Year level
Available Components pane\Data Items tab: Latest Month
Click OK to close the Set Expression dialog box.

Task 5. Create a calculation called Quarter-to-Period to show


revenue totals.
1.

2.

3.

From the Toolbox tab, drag a Query Calculation object named Quarter-toPeriod, as a Calculated member of the Time hierarchy, to Categories (xaxis) to the right of <#Same Month 2 Years Ago#> on the column chart.
Create and validate the following expression:
aggregate (currentMeasure within set periodsToDate([sales_and_
marketing].[Time].[Time].[Quarter],[Latest Month]))
Hints:
Available Components pane\Source tab: Time dimension\Time
hierarchy\Quarter level
Available Components pane\Data Items tab: Latest Month
Click OK to close the Calculated Member Expression dialog box.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

7-53

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Task 6. Create a calculation to return the revenue totals for


the previous quarter.
1.

2.

3.

From the Toolbox tab, drag a Query Calculation object named Total
Previous Quarter, as a Set Expression of the Time hierarchy, to the right of
<#Quarter-to-Period#> on the column chart.
Create and validate the following expression:
prevMember (parent ([Latest Month]))
Hints:
Available Components pane\Data Items tab: Latest Month
Click OK to close the Set Expression dialog box.

Task 7. Format the chart and test the report.


1.

2.
3.
4.
5.
6.

Click the column chart background, in the Properties pane, under


Positioning, click the box next to the Size & Overflow property, and then
click the ellipsis.
In the Width box, type 10, in the list, click in, and then click OK.
You have changed this setting to be 10 inches.
On the toolbar, click Run Report to view the results.
Ensure that when you hover the mouse pointer over a country with data, that a
tooltip appears to provide further information.
Close IBM Cognos Viewer and Report Studio.
Log off of IBM Cognos Connection.

Task 7, step 6: Do not log off of IBM Cognos Connection if you are advancing to the next module today.

7-54

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

Advanced Drilling Techniques


and Member Sets
IBM Cognos BI

2012 IBM Corporation

IBM Internal Enablement Purpose Only

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

8-2

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

ADVANCED DRILLING TECHNIQUES AND MEMBER SETS

Objectives
At the end of this module, you should be able to:
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
2012 IBM Corporation

Participants should be familiar with basic concepts of reporting using the dimensional style and dimensional data
sources. Other modules 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

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

8-3

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

What is Drilling?
Drilling lets you navigate the
dimensional hierarchy
up to higher-level summary
information
down to lower-level detail
information

Retailers
Region
Retailer Country
Retailer Name
Retailer Site

2012 IBM Corporation

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.

8-4

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

ADVANCED DRILLING TECHNIQUES AND MEMBER SETS

Default Drill Up and Down Behavior


[sales_and_marketing].[Products].[Products].[Product line]
Camping
Equipment
Golf Equipment

Drill Down
(New expression created)

children([Golf Equipment])

Mountaineering
Equipment

Irons

Outdoor
Protection

Putters
and so on

Personal
Accessories
2012 IBM Corporation

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.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

8-5

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

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
Camping Equipment

Product Line level

Drill Up Only

Cooking Gear
Product Type level

Drill Up or Down

2012 IBM Corporation

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.

8-6

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

ADVANCED DRILLING TECHNIQUES AND MEMBER SETS

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

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

8-7

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Demo 1
Examine Default Drilling Behavior

2012 IBM Corporation

8-8

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

ADVANCED DRILLING TECHNIQUES AND MEMBER SETS

Demo 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:
User/Password:
Studio:
Package:
Report type:

http://localhost:88/ibmcognos
brettonf/Education1
Report Studio
Public Folders\Samples_PowerCube\Cubes\Sales and
Marketing (cube)
Crosstab

Task 1. Create a basic crosstab report with drilling enabled.


1. Add the following query items to a new crosstab:
Columns area:
Time dimension\Time hierarchy\Year level
Rows area:
Retailers dimension\Retailers hierarchy\Retailers level
Measures area:
Measures dimension\Revenue measure

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

8-9

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

2.
3.
4.

From the Data menu, click Drill Behavior.


In the Drill Behavior dialog box, on the Basic tab click the Allow drill-up
and drill-down check box to select it.
Click OK, and then on the toolbar, click Run Report.
The report appears as follows:

Notice that Retailers and the years are all underlined. This hyperlink formatting
is one indication that drilling has been enabled.
Keep IBM Cognos Viewer open for the next task.
Task 2. Explore default drill-down and drill-up behavior.
1.

In IBM Cognos Viewer, 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.

8-10

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

ADVANCED DRILLING TECHNIQUES AND MEMBER SETS

2.

3.
4.

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.
On the report, click the measure intersection for Japan and 2010 labeled
75,781,108.33.
On the IBM Cognos Viewer toolbar, click 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.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

8-11

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

5.

6.

Right-click any row edge 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.
Close IBM Cognos Viewer.

Task 3. Examine default drill functionality on members within


the same hierarchy.
1.

8-12

From the Source tab\Retailers dimension\Retailers hierarchy, drag the


Region level below <#Retailers#> in the Rows drop zone, as a peer of
<#Retailers#> on the report layout.

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

ADVANCED DRILLING TECHNIQUES AND MEMBER SETS

2.

3.

On the toolbar, click Run Report.


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

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

8-13

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

4.

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.
Close IBM Cognos Viewer.

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.

8-14

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

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 Top 3
combined calculations, such as percent of total

2012 IBM Corporation

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

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

8-15

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Demo 2
Configure Advanced Drill Behavior

2012 IBM Corporation

8-16

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

ADVANCED DRILLING TECHNIQUES AND MEMBER SETS

Demo 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:
User/Password:
Studio:
Package:
Report type:

http://localhost:88/ibmcognos
brettonf/Education1
Report Studio
Public Folders\Samples_PowerCube\Cubes\Sales and
Marketing (cube)
Crosstab

Task 1. Create a basic crosstab report and examine default


drilling behavior.
1.

2.
3.

Add the following query item to a new crosstab:


Rows area:
Products dimension\Products hierarchy\Product line level
From the Source tab, drag the Product type level to the Rows drop zone to
the right of <#Product line#>, to nest as a child.
, expand the Time
From the Source tab, click View Members Tree
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.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

8-17

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

4.
5.
6.
7.

8-18

From the Source tab, from the Measures dimension, drag the Revenue
measure to the Measures drop zone.
From the Data menu, click Drill Behavior.
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.
On the toolbar, click Run Report.
A section of the report appears as follows:

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

ADVANCED DRILLING TECHNIQUES AND MEMBER SETS

8.

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.
Close IBM Cognos Viewer.

Task 2. Configure advanced drilling options.


1.
2.
3.
4.

From the Data menu, click Drill Behavior.


Click the Advanced tab, and then click Product line to select it.
In the Drill-up behavior drop-down list, click Preserve.
In the Drill-down behavior drop-down list, click Preserve, and then click OK.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

8-19

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

5.

On the toolbar, click Run Report.


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 IBM Cognos Viewer open for the next task.

8-20

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

ADVANCED DRILLING TECHNIQUES AND MEMBER SETS

Task 3. Test the drill behavior of the report.


1.

Click Binoculars to drill down.


A section of the report appears as follows:

You can see that while the expression for Binoculars was replaced with the
children of binoculars, the expression for the Product line set remained the
same, and all five product lines are still visible.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

8-21

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

2.

3.

Right-click Seeker 35 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.
Close IBM Cognos Viewer.

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.

8-22

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

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.

2012 IBM Corporation

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.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

8-23

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

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.

2012 IBM Corporation

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.

8-24

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

ADVANCED DRILLING TECHNIQUES AND MEMBER SETS

Independent Drill Up and Down


Default Behavior
All levels in the
same hierarchy
drill up and
down together

Camping Equipment

Drill Up Only

Cooking Gear

Drill Up or Down

Advanced Drill with Explicit Member Sets


Camping Equipment
Cooking Gear

Enable independent drill up and down


behavior on multiple levels from one
hierarchy

2012 IBM Corporation

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.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

8-25

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Demo 3
Enable Independent Drilling on Members of the Same
Hierarchy

2012 IBM Corporation

8-26

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

ADVANCED DRILLING TECHNIQUES AND MEMBER SETS

Demo 3: Enabling 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.
Server:
User/Password:
Studio:
Package:
Report type:

http://localhost:88/ibmcognos
brettonf/Education1
Report Studio
Public Folders\Samples_PowerCube\Cubes\Sales and
Marketing (cube)
Crosstab

Task 1. Create a crosstab report with two sections.


1.
2.
3.
4.

Create a new crosstab report without saving the previous report.


From the Source tab (members tree), expand the Time folder\Time root
node\2012 member\2012 Q 4 member.
Click the member 2012/Oct, Ctrl+click 2012/Nov and 2012/Dec, and then
drag them to the Columns drop zone.
From the Source tab, from the Measures dimension, drag Revenue and
Planned revenue to the Columns drop zone below each month.

This demo 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.
2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

8-27

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

5.

From the Source tab (metadata tree view), expand the Retailers
dimension\Retailers hierarchy, and then drag the Region level to the Rows
drop zone.
6. From the Source tab, 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.
7. From the Toolbox tab, drag a Text Item to the Rows drop zone above
<#Region#>, in the Text dialog box type Summary Data, and then click
OK.
8. From the Toolbox tab, 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.
9. 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.
10. Change the font to 10pt, Bold and Navy.
Task 2. Create member sets and configure drill behavior.

1.
2.

8-28

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.
On the Explorer bar, point to Query Explorer, and then under Queries, click
Query1.
In the Properties pane, under Data, click the Define Member Sets dropdown box and click Yes.
A Member Sets tab appears at the bottom of the Query Explorer.

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

ADVANCED DRILLING TECHNIQUES AND MEMBER SETS

3.
4.

5.

6.

Click the Member Sets tab.


From the Source tab, drag Region to the work area.
You need to rename the member set so that it has a name distinct from the
Region level.
In the Properties pane, under Miscellaneous, click the Name property, click
after Region, press the space bar, type MS after Region, and then press
Enter.
From the Source tab, drag Retailer name to the work area below Region MS,
and rename it using the same method as step 5.
Your member set definition should appear as follows:

7.

From the Data menu, click Drill Behavior, and then on the Basic tab click the
Allow drill-up and drill-down check box to select it.
8. Click 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 drop-down lists.
9. In the Data items pane click Retailer name, and then click Replace
Expression for both the Drill-up behavior and Drill-down behavior dropdown lists.
All explicitly defined member sets must have drill behavior manually defined.
By selecting Replace Expression, you are requesting default drilling behavior.
10. Click OK to close the Drill Behavior dialog box.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

8-29

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Task 3. Test the report and drilling behavior.


1.

On the toolbar, click Run Report.


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.

8-30

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

ADVANCED DRILLING TECHNIQUES AND MEMBER SETS

2.

Right-click Americas, and then click Drill Up.


IBM Cognos 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.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

8-31

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

3.

4.

Click VIP Department Stores to drill down on that retailer.


A section of the report appears as follows:

Once again, IBM Cognos 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.
Close IBM Cognos Viewer.

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.

8-32

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

ADVANCED DRILLING TECHNIQUES AND MEMBER SETS

Bind Report Expressions


Sorted Products Expression
order([Products Set], tuple([Revenue], [2012]), desc)
based on

Product Set Expression


children([Products])

By default,
when you drill down,
the underlying expression is
replaced, removing the
desired order

Default Drilled Expression


children([DrilledMember])
2012 IBM Corporation

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.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

8-33

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Bind Report Expressions (cont'd)


Sorted Products Expression
order([Product Set], tuple([Revenue], [2012]), desc)

Drill Down
on
Camping
Equipment

Product Set Expression


children([Products])

Preserve Expression
Sorted Products Expression
order([Product Set], tuple([Revenue], [2012]), desc)

Product Set Expression


children([Camping Equipment])

Replace Expression

2012 IBM Corporation

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

8-34

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

ADVANCED DRILLING TECHNIQUES AND MEMBER SETS

Demo 4
Preserve Order When Drilling Up or Down

2012 IBM Corporation

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

8-35

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Demo 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:
User/Password:
Studio:
Package:
Report type:

http://localhost:88/ibmcognos
brettonf/Education1
Report Studio
Public Folders\Samples_PowerCube\Cubes\Sales and
Marketing (cube)
Crosstab

Task 1. Create a crosstab report.


1.

8-36

Add the following query items to a new crosstab:


Columns area:
Time dimension\Time hierarchy\Year level
Rows area:
Products dimension\Products hierarchy\Product line level
Measures area:
Measures dimension\Revenue measure

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

ADVANCED DRILLING TECHNIQUES AND MEMBER SETS

2.

3.

On the toolbar, click Run Report.


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.
Close IBM Cognos Viewer.

Task 2. Sort the crosstab report using dimensional functions.


1.
2.
3.

4.
5.

In the report layout, click <#Product line#>, and on the toolbar click Delete.
From the Toolbox tab, drag a Query Calculation object named Products
Set, as a Set Expression of the Products hierarchy, to the Rows drop zone.
Create and validate the following expression:
children ([Products])
Hints:
Available Components pane\Source tab (members tree view): Products root
node
Click OK to close the Set Expression dialog box.
In the report layout, click <Products Set>, and 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.

Task 2, step 3: In dimensional reporting, there are many ways to achieve the same results. In this demo, 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.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

8-37

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

6.

7.

8.
9.

From the Toolbox tab, drag a Query Calculation object named Sorted
Products, as a Set Expression of the Products hierarchy, to the Rows drop
zone.
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
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).
Click OK to close the Set Expression dialog box.
On the toolbar, click Run Report.
The report appears as shown below:

The product lines now appear in descending order by their revenue in 2012.
10. Close IBM Cognos Viewer.

8-38

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

ADVANCED DRILLING TECHNIQUES AND MEMBER SETS

Task 3. Create member set structures and configure


advanced drill behavior.

1.

2.
3.
4.

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.
On the Explorer bar, point to Query Explorer, under Queries click Query1,
and then in the Properties pane, under Data, change the Define Member
Sets property to Yes.
At the bottom of the query work area, click the Member Sets tab, and then
from the Source tab, drag Products Set to the Member Sets work area.
From the Source tab, drag Sorted Products on top of the Products Set
member set to nest it.
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.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

8-39

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

5.
6.
7.

8.

9.

8-40

From the Data menu, click Drill Behavior, and then on the Basic tab click the
Allow drill-up and drill-down check box to select it.
Click the Advanced tab, and then in the Data items pane, click Products Set.
Change the Drill-up behavior and Drill-down behavior to Replace
Expression.
The drill-up and drill-down behavior settings appear as shown below:

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.
Click OK to close the Drill Behavior dialog box.

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

ADVANCED DRILLING TECHNIQUES AND MEMBER SETS

Task 4. Test the report.


1.

2.

On the toolbar, click Run Report.


The report appears as follows:

The product lines are sorted by revenue for 2012.


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.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

8-41

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

3.

4.

5.

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.
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.
Close IBM Cognos Viewer.

Results:
Using dimensional expressions in conjunction with member set
structures, you created a report that preserves the sort order when
drilling up or down.

8-42

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

ADVANCED DRILLING TECHNIQUES AND MEMBER SETS

Synchronized Drill Up and Down with Multiple


Queries

Drilling down on
the chart is reflected
in the crosstab

2012 IBM Corporation

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.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

8-43

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Demo 5
Synchronized Drill Up and Drill Down Behavior

2012 IBM Corporation

8-44

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

ADVANCED DRILLING TECHNIQUES AND MEMBER SETS

Demo 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:
User/Password:
Studio:
Package:
Report Type:

http://localhost:88/ibmcognos
brettonf/Education1
Report Studio
Public Folders\Samples_PowerCube\Cubes\Sales and
Marketing (cube)
Chart

Task 1. Create a report with a chart and a crosstab.


1.
2.
3.

4.

From the File menu, click New, click No to saving the report, and then
double-click Chart.
In the Insert Chart dialog box, in the right pane, click Clustered Column
, and then click OK.
with 3-D Effects
Add the following query items to the new chart:
Default measure (y-axis) drop zone:
Measures dimension \Revenue
Series (primary axis) drop zone:
Product dimension\Product hierarchy\Product line level
Categories (x-axis) drop zone:
Time dimension\Time hierarchy\Year level
From the Toolbox tab, drag a Crosstab object below the chart.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

8-45

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

5.

Add the following query items to the new crosstab:


Columns area:
Time dimension\Time hierarchy\Year level
Rows area:
Products dimension\Products hierarchy\Product line level
Order method dimension\Order method hierarchy\Order method
type level (to the right of Product line to nest as a child)
Measures area:
Measures dimension\Revenue
The results appear as follows:

8-46

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

ADVANCED DRILLING TECHNIQUES AND MEMBER SETS

Task 2. Enable drill up and down behavior.


1.
2.
3.
4.

From the Data menu, click Drill Behavior.


On the Basic tab, select Allow drill-up and drill-down, and then click OK.
On the toolbar, click Run Report, and then drill down on 2012 on the chart.
Notice that the crosstab is not affected when drilling.
Close IBM Cognos Viewer.

Task 3. Link data items to enable synchronized drill up and


down behavior.
1.
2.
3.
4.
5.

From the Data menu, click Drill Behavior.


Click the Data Items Linking tab.
From Query1, drag Year to the Linked data items pane.
From Query2, drag Year to the Drop item here drop zone.
Repeat steps 3 and 4 for Product Line.
The results appear as follows:

6.

Click OK.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

8-47

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

7.

8.
9.

On the toolbar, click Run Report, and then drill down on 2012 on the chart.
A section of the report appears as follows:

Notice that the crosstab now reflects the drill action of the chart.
Continue to drill up and down on either the chart or crosstab to observe the
synchronized drill up and down behavior.
Close IBM Cognos Viewer.

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.

8-48

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

ADVANCED DRILLING TECHNIQUES AND MEMBER SETS

Apply One Function to Member Sets


Renamed to a
Single Name

Default Member Set


Structure Names

MySet
MySet
MySet

Products
Sales Territory
Order Method

Referenced in
One Function

rank(currentMeasure tuple [2012] within set [MySet])

2012 IBM Corporation

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.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

8-49

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Demo 6
Apply a Single Function to Multiple Member Sets

2012 IBM Corporation

8-50

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

ADVANCED DRILLING TECHNIQUES AND MEMBER SETS

Demo 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:
User/Password:
Studio:
Package:
Report type:

http://localhost:88/ibmcognos
brettonf/Education1
Report Studio
Public Folders\Samples_PowerCube\Cubes\Sales and
Marketing (cube)
Crosstab

Task 1. Create a crosstab report with multiple levels from


different dimensions.
1.

Add the following query items to a new crosstab:


Columns area:
Time dimension\Time hierarchy\Year level
Measures area:
Measures dimension\Revenue measure

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

8-51

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

2.

3.

From the Toolbox tab, drag a Query Calculation object named Product
Line Members, as a Set Expression of the Products hierarchy to the Rows
drop zone.
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 demo expects members as a parameter.
Hints:
Available Components pane\Source tab: Products dimension\Products
hierarchy\Product line level

4.
5.

Click OK to close the Set Expression dialog box.


Repeat steps 2-4 to add Query Calculations named Region Members
(Retailers hierarchy, the expression using Region level), and Order Method
Type Members (Order method hierarchy, the expression using Order
method type level), that use the member function.
Add the Region Members and Order Method Type Members calculations as
peers to <Product line Members> so that the report layout will appear as
follows:

Hints:
Available Components pane\Source tab: Retailers dimension\Retailers
hierarchy\Region level
Available Components pane\Source tab: Order method dimension\Order
method hierarchy\Order method type level

8-52

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

ADVANCED DRILLING TECHNIQUES AND MEMBER SETS

6.
7.

From the Toolbox tab, drag a Crosstab Space object to the Rows zone
between <Product Line Members> and <Region Members>.
From the Toolbox tab, drag a Crosstab Space object to the Rows zone
between <Region Members> and <Order Method Type Members>.
The report appears as follows:

Task 2. Create member sets with same name.


1.
2.
3.

On the Explorer bar, point to Query Explorer, and then under Queries, click
Query1.
In the Properties pane, under Data, change the Define Member Sets
property to Yes.
Click the Member Sets tab, and then from the Source tab, drag Product Line
Members, Region Members, and Order Method Type Members to the
work area.
The member set structures appear as shown below:

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

8-53

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

4.
5.

In the work area, click Product Line Members, and then in the Properties
pane, under Miscellaneous, rename Product Line Members to MySet.
Repeat step 4 to 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.
2.

3.

On the Explorer bar, point to Page Explorer, and then click Page1.
From the Toolbox tab, drag a Query Calculation object named Rank in
2012, as a Set expression, to the right of the second <#Year#> column as a
peer.
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

Task 3, Step 2: You could try declaring the Time hierarchy at this step.

8-54

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

ADVANCED DRILLING TECHNIQUES AND MEMBER SETS

4.
5.

6.

Click OK to close the Set Expression dialog box.


On the toolbar, click Run Report.
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.
Close IBM Cognos Viewer.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

8-55

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Task 4. Sort the rank column.


1.
2.

3.
4.

8-56

In the report layout, right-click <Product Line Members>, click Edit Set,
and then double-click Set Expression.
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
Click OK to close the Set Expression dialog box, and then click OK to close
the Set Definition dialog box.
Repeat steps 1-3 to sort Region Members and Order Method Type
Members.

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

ADVANCED DRILLING TECHNIQUES AND MEMBER SETS

5.

On the toolbar, click Run Report.


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.
6. Close IBM Cognos Viewer.
Results:
By renaming member set structures to use a common name, you
applied one instance of the rank function to several members sets.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

8-57

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Summary
At the end of this module, you should be able to:
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
2012 IBM Corporation

8-58

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

ADVANCED DRILLING TECHNIQUES AND MEMBER SETS

Workshop 1
Create a Report with Drillable Complex Functions

2012 IBM Corporation

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

8-59

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Workshop 1: Create a Report with Drillable Complex


Functions
Channels management wants to have 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
For more detailed information outlined as tasks, see the Task Table section.
For the final query results, see the Workshop Results section that follows the Task
Table section.

8-60

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

ADVANCED DRILLING TECHNIQUES AND MEMBER SETS

Workshop 1: Task Table


Task 1: Create the base crosstab report.
Where to Work
Hints
File menu

Create a new crosstab report, using the Public


Folders\Samples\Cubes\Sales and Marketing
(cube) package.

Source tab

Measures area: Measure dimension\Revenue


Columns area: Year dimension\Year hierarchy\Year
level

Toolbox tab
Set Expression dialog
box\Expression
Definition box

Rows: Query Calculation for Products Set:


Set expression
Products hierarchy
children([Products])

Task 2: Create a query calculation to show the top three product members.
Where to Work
Hints
Toolbox tab
Set Expression dialog
box\Expression
Definition box
Report layout\ toolbar

Rows: as a peer to <Products Set>, Query


Calculation for Top Products:
Set expression
Products hierarchy
topCount([Products Set],3,[Revenue])
Cut Products Set from the report layout.
Run Report.

IBM Cognos Viewer

2007, 2012, IBM Corporation

Close IBM Cognos Viewer.

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

8-61

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Task 3: Create query calculations to show overall summaries and


summaries for excluded members.
Where to Work
Hints
Toolbox tab
Calculated Member
Expression dialog
box\Expression
Definition box

Rows:
as a peer to <Top Products>, Query Calculation
for Summary:
Calculated member
Product Hierarchy
aggregate(currentMeasure within set [Products
Set])
as a peer above Summary, Query Calculation for
Excluded:

Calculated member
Product Hierarchy
aggregate(currentMeasure within set
except([Products Set],[Top Products]))
Task 4: Enable drilling up and drilling down.
Where to Work
Hints
Data menu\Drill
behavior

Enable Allow drill-up and drill-down.

Toolbar

On the toolbar, click Run Report.

IBM Cognos Viewer

Test the report.


Close IBM Cognos Viewer.

8-62

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

ADVANCED DRILLING TECHNIQUES AND MEMBER SETS

Task 5: Create member sets to enable advanced drill behavior.


Where to Work
Hints
Query Explorer\
Query1\Properties pane

Change Define Member Sets property to Yes.


Drag Products Set to the work area.

Query Explorer\
Drag the following items on top of Products Set in the
Query1\Member Sets tab
work area:
Top Products
Total
Excluded
Query Explorer\
Query1\Properties pane

Change the Name property of each item to add MS to


the end.

Data menu\ Drill


Behavior\ Advanced tab

Configure advanced drilling behavior:


Set Drill-up behavior and Drill-down behavior to
Replace Expression for Products Set.
Set Drill-up behavior and Drill-down behavior to
Preserve for Top Products, Summary, and
Excluded.

Toolbar

Run Report.

IBM Cognos Viewer

Drill down on Camping Equipment.


Close IBM Cognos Viewer, Report Studio and IBM
Cognos Connection.

If you need more information to complete a task, see the Step-by-Step instructions at
the end of the Workshop.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

8-63

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Workshop 1: Results
The result of the workshop is a report that appears as follows:

When you drill down on Camping Equipment, the report appears as follows:

8-64

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

ADVANCED DRILLING TECHNIQUES AND MEMBER SETS

Workshop1: Step-by-Step Instructions


Server:
User/Password:
Studio:
Package:
Report type:

http://localhost:88/ibmcognos
brettonf/Education1
Report Studio
Public Folders\Samples_PowerCube\Cubes\Sales and
Marketing (cube)
Crosstab

Task 1. Create the base crosstab report.


1.

2.
3.

4.

Add the following query items to a new crosstab:


Columns area:
Time dimension\Time hierarchy\Year level
Measures area:
Measures dimension\Revenue measure
From the Toolbox tab, drag a Query Calculation object named Products
Set, as a Set expression of the Products hierarchy, to the Rows drop zone.
Create and validate the following expression:
children ([Products])
Hints:
Available Components pane\Source tab: Products dimension\Products
hierarchy\Members folder\Products member
Click OK to close the Set Expression dialog box.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

8-65

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

5.

6.

On the toolbar, click Run Report.


The report appears as shown below:

You see totals for all children of the Products member and values for each year
in the data. You want to modify this report so that you see values for only the
top three product lines, a summary for excluded members, and an overall
summary. You will implement these items over the next few tasks.
Close IBM Cognos Viewer.

Task 2. Create a query calculation to show the top three


product members.
1.

2.

3.

8-66

From the Toolbox tab, drag a Query Calculation object named Top
Products, as a Set expression of the Products hierarchy, to the Rows below
<Products Set>.
Create and validate the following expression:
topCount ([Products Set],3,[Revenue])
Hints:
Available Components pane\Data Items tab: Products Set
Available Components pane\Data Items tab: Revenue
Click OK to close the Set Expression dialog box, and then click OK to close
the Set Definition dialog box.

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

ADVANCED DRILLING TECHNIQUES AND MEMBER SETS

4.
5.

6.

Cut <Products Set> from the report layout.


On the toolbar, click Run Report.
The results appear as follows:

Only the top three product lines are returned.


Close IBM Cognos Viewer.

Task 3. Create query calculations to show overall summaries


and summaries for excluded members.
1.

2.

3.

4.

From the Toolbox tab, drag a Query Calculation object named Summary, as
a Calculated member of the Products hierarchy, to the Rows under <Top
Products>.
Create and validate the following expression:
aggregate (currentMeasure within set [Products Set])
This expression returns the totals for all product members.
Hints:
Available Components pane\Data Items tab: Products Set
Click OK to close the Calculated Member Expression dialog box.
You will create a calculation to show the totals for members not shown. You
will use the except() function to filter out the top products in our aggregation.
From the Toolbox tab, drag a Query Calculation object named Excluded, as
a Calculated member of the Products hierarchy, to the Rows above
Summary.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

8-67

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

5.

6.

Create and validate the following expression:


aggregate (currentMeasure within set except ([Products Set],[Top
Products]))
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.
Hints:
Available Components pane\Data Items tab: Products Set
Available Components pane\Data Items tab: Top Products
Click OK to close the Calculated Member Expression dialog box.
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.

Task 4. Enable drilling up and drilling down.


1.
2.

8-68

From the Data menu, click Drill Behavior.


On the Basic tab, select the Allow drill-up and drill-down check box, click
OK, and then on the toolbar, click Run Report.

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

ADVANCED DRILLING TECHNIQUES AND MEMBER SETS

3.

4.

In the 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 did not define 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 IBM Cognos Viewer.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

8-69

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Task 5. Create member sets to enable advanced drill


behavior.
1.
2.
3.
4.
5.
6.

7.
8.

8-70

On the Explorer bar point to Query Explorer, and then under Queries click
Query1.
In the Properties pane under Data, change the Define Member Sets property
to Yes.
Click the Member Sets tab.
You will bind Products Set with the other expressions that reference it.
From the Source tab, drag Products Set to the work area.
From the Source tab, drag Top Products, Summary and Excluded onto
Products Set in the work area.
Rename each member set by appending the Name property 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:

From the Data menu, click Drill Behavior, and then click the Advanced tab.
In the Data items pane, click Products Set, and then change Drill-up
behavior and Drill-down behavior to Replace Expression.

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

ADVANCED DRILLING TECHNIQUES AND MEMBER SETS

9.

Repeat step 8 for the Top Products, Summary, and Excluded data items
using the Preserve setting.
10. On the Basic tab, select the check boxes to disable drill-up and drill-down for
Summary and Excluded.

11. Click OK to close the Drill Behavior dialog box.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

8-71

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

12. On the toolbar, click Run Report, and then 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.
13. Close IBM Cognos Viewer and then close Report Studio without saving the
report.
14. Log off of IBM Cognos Connection.

Task 5, step 12: Do not log off of IBM Cognos Connection if you are advancing to the next module today.

8-72

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

Set Up Drill-through Reports


IBM Cognos BI

2012 IBM Corporation

IBM Internal Enablement Purpose Only

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

9-2

IBM Internal Enablement Purpose Only

2007, 2012 IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

SET UP DRILL-THROUGH REPORTS

Objectives
At the end of this module, you should be able to:
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

2012 IBM Corporation

Participants should be familiar with basic concepts of reporting using the dimensional style and dimensional data
sources. Other modules 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

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

9-3

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

What is Drill-through Access?


Source Report
Revenue

2004

2005

2006

2007

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

36,165,521.07

25,008,574.08

10,349,175.84

4,471,025.26

153,553,850.98

168,006,427.07

230,110,270.55

174,740,819.29

107,099,659.94

161,039,823.26

141,520,649.70

Outdoor Protection
Golf Equipment
Mountaineering Equipment

Target Report
Year

Product line

2005 Mountaineering
Equipment

Product type
Climbing
Accessories

Product
Firefly Rechargeable
Battery
Granite Chalk Bag

Tools

Revenue
2,734,308.88
960,521.94

Granite Ice

6,306,347.20

Granite Hammer

4,326,684.18

Granite Shovel

2,421,545.46

2012 IBM Corporation

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.

9-4

IBM Internal Enablement Purpose Only

2007, 2012 IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

SET UP DRILL-THROUGH REPORTS

Drill-through Access from a Report

Source Report
(Created in
Report
Studio)

Target Report
Drill through to a
target report to
view related data

(Created in
Report Studio,
Analysis Studio,
Query Studio, or
Business Insight
Advanced)

2012 IBM Corporation

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

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

9-5

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Drill-through Access for a Package


Reports created using the Sales and Marketing (cube) package

Analysis
Studio
Report

Query
Studio
Report

Workspace
Advanced
Report

Report
Studio
Report
A

Report
Studio
Report
B

Target
Report

2012 IBM Corporation

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.
.
9-6

IBM Internal Enablement Purpose Only

2007, 2012 IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

SET UP DRILL-THROUGH REPORTS

Steps to Set Up a Package-based Drill-through


Definition
1. Create the target
report.

2. Create the drillthrough definition.

Create the target


report*

Select the package

Add a parameter to
the target report*

Limit the data items


from which users
can drill through*

Save the target


report

Select the target


report

Hide the target


report*

Map the parameter


values passed to
the target report if
needed, or specify
dynamic filtering of
target*

3. Drill through to
the target report.
Create a report,
using the source
package
Drill through to
view related data in
the target report
The target report
appears and
displays filtered
data

* Optional
2012 IBM Corporation

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 Studio 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 demos 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.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

9-7

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Specify the Values Passed to Target


Parameters
Report-based drill-through definition

Parameters in the
target report

Values passed from


the source report

Properties passed from


the source report

Package-based drill-through definition


2012 IBM Corporation

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.

9-8

IBM Internal Enablement Purpose Only

2007, 2012 IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

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

2012 IBM Corporation

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
Report Studio 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 Report Studio 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".

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

9-9

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Demo 1
Set Up Member-to-Member Drill-through Access

2012 IBM Corporation

9-10

IBM Internal Enablement Purpose Only

2007, 2012 IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

SET UP DRILL-THROUGH REPORTS

Demo 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://localhost:88/ibmcognos
User/Password: brettonf/Education1
Studio:
Report Studio
Package:
Public Folders\Samples\Cubes\Sales and Marketing (cube)
Report type:
List
Task 1. Create the target report.
1.

Add the following query items to a new list:


Retailers dimension\Retailers hierarchy\Retailer name, Retailer site
Order method dimension\Order method hierarchy\Order method type
Measures dimension\Revenue, Planned revenue

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

9-11

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

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.

2.

9-12

Fro the Source tab, expand the Retailers dimension\Retailers


hierarchy\Retailer country level\Members folder.
You can see that the Retailer country level contains a member for each retailer
country.
A section of the tree appears as shown below:

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.
From the Toolbox tab, drag a Query Calculation object named Selected
Retailer Country, as a Set expression of the Retailers hierarchy, to the left of
Retailer name column on the report.

IBM Internal Enablement Purpose Only

2007, 2012 IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

SET UP DRILL-THROUGH REPORTS

3.

4.
5.
6.

7.
8.

Create and validate the following expression:


[sales_and_marketing].[Retailers].[Retailers].[Retailer country]->?retail
country?
Hints:
Available Components pane\Source tab: Retailers dimension\Retailers
hierarchy\Retailer country level
Validate using Australia
Click OK to close the Set Expression dialog box.
On the report layout, click Selected Retailer Country, Ctrl+click Retailer
name, and Retailer site, and then on the toolbar, click Group / Ungroup.
On the report layout, click the Revenue column, Ctrl+click Planned revenue,
on the toolbar, click Summarize, and then in the drop-down menu click
Total.
A section of the report layout appears as follows:

From the File menu, click Save, and then navigate to My Folders.
In the Name box, type Module9_Demo1_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.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

9-13

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Task 3. Create a drill-through definition for the package.

1.
2.

If you are on the IBM Cognos Welcome Page, click IBM Cognos content to go
to IBM Cognos Connection.
In IBM Cognos Connection, from the Launch menu, click Drill-through
Definitions.
Navigate to Public Folders\Samples_PowerCube\Cubes\Sales and
Marketing (cube), and then click New Drill-through Definition

3.

4.
5.
6.
7.

9-14

In the Name box, type Module 9 Demo 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.
Click Set the scope, and expand the Retailers dimension.
You can also set the scope to a measure.
Click the Retailer country level, and then click OK.
Click Set the target, navigate to My Folders, click Module9_Demo1_Target,
and then click OK.
Click Next.
The Specify the target details page appears and displays the retail country
parameter you created in the target report as shown below:

IBM Internal Enablement Purpose Only

2007, 2012 IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

SET UP DRILL-THROUGH REPORTS

8.

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.
Beside the retail country parameter, in the Source metadata item list, click
Set the value

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 Report Studio using the Sales and Marketing package.
Task 4. Test the drill-through definition.
1.
2.

Maximize Report Studio, from the File menu, click New, and then doubleclick List.
Add the following query items 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.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

9-15

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

3.

4.

5.

6.

9-16

From the Data menu, click Drill Behavior, on the Basic tab, ensure that the
Allow this report to be a package-based drill-through source check box is
selected, and then click OK.
On the toolbar click Run Report.
You want to navigate to the target report to view more details about sales in
Korea.
In the report, right-click Australia, point to Go To, and click Related Links.
The drill-through definition that you created (Module 9 Demo 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.
Expand the Go to window, and then click View passed source values.
The drill-through values are shown as follows:

IBM Internal Enablement Purpose Only

2007, 2012 IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

SET UP DRILL-THROUGH REPORTS

7.

8.

9.

Because this drill-through passes a member from the source to the target, a
MUN representing the Australia member is passed. In following demos, be sure
to check the passed source values to see what type of data is being passed.
Under Available links, click Module 9 Demo 1 Drill-through Definition.
IBM Cognos drills through to the Module9_Demo1_Target report.
A section of the report appears as follows:

In the report, click Bottom and observe that the report displays data for only
Australia.
Drill-through access works as expected.
Close both IBM Cognos Viewer windows.

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.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

9-17

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Drill Down then Drill Through


Source
Report

Source
Report

Target
Report

Product
Line

Golf
Equipment

Golf
Equipment

Data

Data

Data

Drill down to
view data for Golf
Equipment

Drill through to
view related data
for Golf Equipment

2012 IBM Corporation

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

9-18

IBM Internal Enablement Purpose Only

2007, 2012 IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

SET UP DRILL-THROUGH REPORTS

Demo 2
Let Users Drill Down and Then Drill Through

2012 IBM Corporation

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

9-19

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Demo 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://localhost:88/ibmcognos
User/Password: brettonf/Education1
Studio:
Report Studio
Package:
Public Folders\Samples\Cubes\Sales and Marketing (cube)
Report type:
Clustered Column Chart
Task 1. Create the target report.
1.

2.

9-20

Add the following query items to a new clustered column chart:


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
level
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.
On the Explorer bar point to Query Explorer, and then under Queries click
Query1.

IBM Internal Enablement Purpose Only

2007, 2012 IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

SET UP DRILL-THROUGH REPORTS

3.
4.

5.

From the Toolbox tab, drag a Slicer Member Set object to the Slicer pane.
Create and validate the following expression:
[sales_and_marketing].[Products].[Products]->?product?
Hints:
Available Components pane\Source tab: Products dimension\Products
hierarchy
Validate using Products member
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.
2.
3.
4.

5.

On the Explorer bar point to Page Explorer, and then under Report Pages
click Page1.
Double-click the report title text, type Quantity Sold for, press the space bar,
and then click OK.
From the Toolbox tab, drag a Layout Calculation object to the end of the
report title text.
On the Available Components pane\Parameters tab, drag the product
parameter to the Expression Definition box.
The expression appears as shown below:
ParamDisplayValue('product')
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.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

9-21

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

6.

7.

8.

9-22

In the report title area, click the report title text, on the toolbar click
, in the report layout header, click the Layout Calculation,
Pick up Style
and then on the toolbar click Apply Style
.
Click the report title area, and then on the toolbar click Left.
The results appear as follows:

Save the report in the My Folders folder as Module9_Demo2_Target.


You will create a drill-through definition to let users navigate to this report from
reports created using the Sales and Marketing package.

IBM Internal Enablement Purpose Only

2007, 2012 IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

SET UP DRILL-THROUGH REPORTS

Task 3. Create the package-based drill-through definition.


1.

2.

3.
4.
5.

6.
7.

In IBM Cognos Connection, launch Drill-through Definitions, navigate to


Public Folders\Samples_PowerCub\Cubes\Sales and Marketing (cube)
package, and then click New Drill-through Definition.
In the Name box, type Module 9 Demo 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.
Click Set the scope, click the Products dimension, and then click OK.
Click Set the target, navigate to My Folders, click Module9_Demo2_Target,
and then click OK.
Click Next.
The Specify the target details page appears and displays the parameter from the
Module9_Demo2_Target report as shown below:

You want this parameter to receive members from any level in the Products
hierarchy.
Beside the product parameter, in the Source metadata item column, click Set
the value, click the Products dimension, and then click OK.
Click Finish.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

9-23

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Task 4. Test the drill-through definition.


1.

2.

3.

4.

9-24

Add the following query items to a new list.


Products dimension\Products hierarchy\Product line
Measures dimension\Revenue
From the Data menu, click Drill Behavior, on the Basic tab, ensure that the
Allow drill-up and drill-down and Allow this report to be a package-based
drill-through source check boxes are selected, and then click OK.
On the toolbar click Run Report.
The report appears as follows:

Click Golf Equipment to drill down to view details about golf equipment
product types.
The report appears as follows:

IBM Internal Enablement Purpose Only

2007, 2012 IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

SET UP DRILL-THROUGH REPORTS

5.

6.

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

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

9-25

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

7.

8.

Click Module 9 Demo 2 Drill-through Definition.


IBM Cognos drills through to the Module9_Demo2_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.
Close both IBM Cognos Viewer windows.

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.

9-26

IBM Internal Enablement Purpose Only

2007, 2012 IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

SET UP DRILL-THROUGH REPORTS

Drill Through to Different Data Sources

Golf
Equipment

Product
Line
Data

Drill through to view


detailed data for the Golf
Equipment product line

Data

Report Created
Using
Relational Data

Report Created
Using
OLAP Data

2012 IBM Corporation

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

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

9-27

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Drill Through to Different Data Sources (cont'd)

Drilled
Data Item
in Source
Report

Data Item
Expected by
Target
Parameter

Supported
Combination?

Value

Value

Yes

Member

Member

Yes *

Member

Value

Yes

Value

Member

No

2012 IBM Corporation

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.

9-28

IBM Internal Enablement Purpose Only

2007, 2012 IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

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

2012 IBM Corporation

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.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

9-29

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

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

2012 IBM Corporation

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.

9-30

IBM Internal Enablement Purpose Only

2007, 2012 IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

SET UP DRILL-THROUGH REPORTS

From Members to Values

Primary Keys in the PRODUCT_LINE


Table in a Relational Database

Query Item
Containing These
Business Key Values

2012 IBM Corporation

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.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

9-31

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Demo 3
Drill Through from Members to a Parameter Expecting
a Business Key

2012 IBM Corporation

9-32

IBM Internal Enablement Purpose Only

2007, 2012 IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

SET UP DRILL-THROUGH REPORTS

Demo 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:
User/Password:
Studio:
Package:
Report Type:
Folder:
Namespace:

http://localhost:88/ibmcognos
brettonf/Education1
Report Studio
Public folders\Samples\Models\GO Data Warehouse (query)
Map
Sales and Marketing (query)
Sales (query)

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

9-33

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Task 1. Create the target report.


1.
2.

3.

4.
5.
6.

7.
8.

9-34

In Report Studio, without saving the previous report, create a map report, and
set the Display layers to Oceans.
Add the following query items to the map:
Color drop zone: Sales fact query subject\Revenue measure
Location drop zone: Retailers query subject\Retailer country query item
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.
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.
On the toolbar, click Filters, click Edit Filters, and then on the Detail Filters
tab, click Add.
In the Create Filter dialog box, click Advanced, and then click OK.
In the Expression Definition box, create the expression as follows:
[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
Click OK to close the Prompt dialog box, and then click OK to close the
Detail Filter Expression dialog box.
Click OK to close the Filters dialog box.

IBM Internal Enablement Purpose Only

2007, 2012 IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

SET UP DRILL-THROUGH REPORTS

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.
2.
3.
4.

5.
6.
7.

From the Toolbox tab, drag a Table object to the right of the block holding
the report title text.
In the Number of columns box type 1, in the Number of rows box type 2,
and then click OK.
From the Toolbox tab, drag a Text Item object to the top table cell, type
Parameter Display Value:, click the Space bar, and then click OK.
From the Toolbox tab, drag a Layout Calculation object to the right of the
text in the top table cell, and then on the Available Components
pane\Parameters tab drag the Order method parameter to the Expression
Definition box.
The expression appears as follows:
ParamDisplayValue('Order method')
Validate the expression, and then click OK to close the Report Expression
dialog box.
From the Toolbox tab, drag a Text Item object to the bottom table cell, type
Parameter Use Value:, click the Space bar, and then click OK.
From the Toolbox tab, drag a Layout Calculation object to the right of the
text in the bottom table cell, and then on the Available Components
pane\Parameters tab, and then drag the Order method parameter to the
Expression Definition box.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

9-35

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

8.

In the expression, delete Display.


The expression appears as shown below:
ParamValue('Order method')
9. Validate the expression to ensure there are no errors, and then click OK to
close the Report Expression dialog box.
10. 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:

11. Save this report as Module9_Demo3_Target in My Folders.


Task 3. Create a package-based drill-through definition.
1.

9-36

In IBM Cognos Connection, launch Drill-through Definitions, navigate to


Public Folders\Samples\Models\GO Data Warehouse (analysis), and
then click New Drill-through Definition.

IBM Internal Enablement Purpose Only

2007, 2012 IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

SET UP DRILL-THROUGH REPORTS

2.

3.

4.

5.

6.
7.
8.

In the Name box, type Module 9 Demo 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.
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.
Click Set the target, navigate to My Folders, click Module9_Demo3_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.
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.
Beside the Order method parameter, in the Source metadata item column
click Set the value.
Expand the Sales and Marketing (analysis) folder\Sales namespace\Order
method dimension, click the Order method type level, and then click OK.
In the Source metadata item properties list, click Business Key, and then
click Finish.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

9-37

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Task 4. Create a source report and test the drill-through


definition.
1.
2.

3.

4.

5.

9-38

In Report Studio, use the Public Folders\Samples\Models\GO Data


Warehouse (analysis) package to create a list report.
Add the following query items to the new list:
Order method dimension\Order method hierarchy\Order method type.
Sales fact measure dimension\Quantity.

From the Data menu, click Drill Behavior, on the Basic tab, ensure that the
Allow this report to be a package-based drill-through source check box is
selected, and then click OK.
On the toolbar, click Run Report.
The report appears as follows:

You will drill through to view details about telephone sales in each country.
In the list report, right-click Telephone, point to Go To, and then click
Related Links.

IBM Internal Enablement Purpose Only

2007, 2012 IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

SET UP DRILL-THROUGH REPORTS

6.

7.

Click Module 9 Demo 3 Drill-through Definition.


IBM Cognos drills through to the Module9_Demo3_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.
Close both IBM Cognos Viewer windows.

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.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

9-39

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Demo 4
Drill Through from Member Captions to Values

2012 IBM Corporation

9-40

IBM Internal Enablement Purpose Only

2007, 2012 IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

SET UP DRILL-THROUGH REPORTS

Demo 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://localhost:88/ibmcognos
User/Password: brettonf/Education1
Studio:
Report Studio
Package:
Public folders\Samples\Models\GO Data Warehouse (query)
Report Type:
List
Folder:
Sales and Marketing (query)
Namespace:
Sales (query)
Task 1. Create the target report.
1.

Add the following query items to a new list:


Product: Product line, Product type, Product
Sales fact: Revenue

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

9-41

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

2.
3.

In the layout report, click Product line, Ctrl+click Product type, and then in
the toolbar click Group / Ungroup.
In the layout report, click the Revenue column, on the toolbar click
Summarize, and then in the drop-down menu click Total.
Your report layout appears as follows:

4.

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.
On the toolbar click Filters, click Edit Filters, and then on the Detail Filters
tab, click Add.
In the Create Filter dialog box, click Advanced, and then click OK.

5.

9-42

IBM Internal Enablement Purpose Only

2007, 2012 IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

SET UP DRILL-THROUGH REPORTS

6.

7.
8.

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
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.
Save the report in My Folders as Module9_Demo4_Target.

Task 2. Create the source report.


1.
2.

In Report Studio, use the Public Folders\Samples_PowerCube\Cubes\


Sales and Marketing (cube) package to create a crosstab report.
Add the following query items to the new crosstab:
Columns area: Order method dimension\Order method
hierarchy\Order method type level
Rows area: Products dimension\Products hierarchy\Product line level
Measures area: Measures dimension\Revenue measure

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

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

9-43

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Task 3. Set up report-based drill-through access.


1.

2.

3.
4.

5.

6.

9-44

You want to let users drill through from the product lines listed in the rows.
In the report, click <#Product line#>, on the toolbar, click Drill-Through
Definitions, and then in the Drill-Through Definitions dialog box, click
New Drill-Through Definition.
Beside the Report box, click the ellipsis, navigate to My Folders, click
Module9_Demo4_Target, and then click Open.
You will specify that the caption for the Product line be passed to the target
parameter.
Under Parameters, click Edit.
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.
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.
On the toolbar, click Run Report.
The report runs and appears in IBM Cognos Viewer. You can drill through
from items in the rows.

IBM Internal Enablement Purpose Only

2007, 2012 IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

SET UP DRILL-THROUGH REPORTS

7.

In the rows, click Personal Accessories.


IBM Cognos drills through to the Module9_Demo4_Target report and a
section of the report appears as follows:

8.

In the report click Bottom.


Observe that the report contains only data for the Personal Accessories product
line. Drill-through access works as expected.
9. Close IBM Cognos Viewer, and then close Report Studio without saving the
report.
10. Log off of IBM Cognos Connection.
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.

Task 3, step 10: Do not log off of IBM Cognos Connection if you are advancing to the next module today.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

9-45

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Drilling to Different Data Sources

Product line
Dimension in the
OLAP Source
Model

Target Parameters Created


Using Values

2012 IBM Corporation

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.

9-46

IBM Internal Enablement Purpose Only

2007, 2012 IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

SET UP DRILL-THROUGH REPORTS

Drill Through from Dates


This member
represents a
date range

This target parameter expects a date range


2012 IBM Corporation

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.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

9-47

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Summary
At the end of this module, you should be able to:
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

2012 IBM Corporation

9-48

IBM Internal Enablement Purpose Only

2007, 2012 IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

10

End-to-End Workshop
IBM Cognos BI

2012 IBM Corporation

IBM Internal Enablement Purpose Only

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

10-2

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

END-TO-END WORKSHOP

Workshop 1: End-to-End Workshop


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)

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

10-3

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

The report will also have a detailed crosstab that examines revenue for each campaign,
for each retailer within the selected country. The crosstab will also include:
revenue for each promotional (non-Regular Sale) campaign, for each retailer
name
a calculation to display the promotional sales percent of the total sales
current year totals
previous year totals
quarter by quarter totals for the current year
a filter to eliminate rows with no promotional sales in the current or past year
sorting of campaigns by total revenue in the current year
The report must have drilling enabled. Ensure that the calculations, filters, and sorting
are all maintained when the user drills up or down.
Finally, the report will be configured with a drill-through definition. From the initial
report, the user will be able to drill-through from Retailer name to a report based on
the Go Data Warehouse (query) package. The target report will include:
a parameter to filter based on the retailer that is selected in the initial report
Retailer, Campaign name, and Product
Quantity, Revenue, and Unit Cost
For more detailed information outlined as tasks, see the Task Table section.
For the final results, see the Workshop Results section that follows the Task Table
section.

10-4

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

END-TO-END WORKSHOP

Workshop 1: Task Table


Task 1: Build a crosstab and include a prompt for Retailer country.
Where to Work
Hints
File menu

Create a new crosstab report, using the Sales and


Marketing (cube) package.

Source tab

Measures drop zone: Revenue

Toolbox tab
Set Expression dialog
box\Expression
Definition box

Rows drop zone:

Crosstab in report layout

Cut <Selected Retailer Country> from the report


layout.

2007, 2012, IBM Corporation

Query Calculation for Selected Retailer Country:


[sales_and_marketing]. [Retailers].[Retailers].[Retailer
country]-> ?Country?
Query Calculation for Retailer Names:
children([Selected Retailer Country])

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

10-5

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Task 2: Add time to columns in report layout.


Where to Work
Hints
Toolbox tab
Set Expression dialog
box\Expression
Definition box

Columns drop zone:


Query Calculation for Current Year:
closingPeriod([sales_and_marketing].
[Time].[Time].[Year])
Query Calculation for Quarters of Current Year,
as a peer to the left of <Current Year>:
children([Current Year])
Query Calculation for Total Previous Year, as a peer
to the right of <Current Year>:
prevMember([Current Year])

10-6

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

END-TO-END WORKSHOP

Task 3: Add promotional campaigns to report layout, excluding regular


sales, and aggregate the results.
Where to Work
Hints
Toolbox tab
Set Expression dialog
box\Expression
Definition box

Rows drop zone:


Query Calculation for Promotional Campaigns,
nested as a child of <Retailer Names>:
except([sales_and_marketing].
[Promotions].[Promotions].[Campaign], [Regular
sale])

Toolbox tab
Calculated member
dialog box\Expression
Definition box

Rows drop zone:


Calculated Member for Aggregate(Promotional
Campaigns), nested as a peer of <Promotional
Campaigns>:
aggregate (currentMeasure within set [Promotional
Campaigns])

Crosstab in report layout


\Properties pane

Format the Aggregate(Promotional Campaigns)


member fact cells to set the Classes property to
Crosstab fact cell (inner total nested).

Toolbox tab
Calculated member
dialog box\Expression
Definition box

Rows drop zone:

2007, 2012, IBM Corporation

Query Calculation for Total All Campaigns, as a


peer to Aggregate (Promotional Campaign):
aggregate(currentMeasure within set
[sales_and_marketing].[Promotions]. [Promotions].
[Campaign])

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

10-7

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Task 4: Create and format a percent of total metric.


Where to Work
Hints
Rows drop zone:
Toolbox tab
Query Calculation for % of Total, as a peer to
Calculated member
Aggregate (Promotional Campaigns):
dialog box\Expression
[Aggregate(Promotional Campaigns)]/ [Total All
Definition box
Campaigns]
Crosstab in report layout

Cut <Total All Campaigns> from the report layout.

Crosstab in report
layout\ Properties pane

Format the % of Total member fact cells to set the


Data Format property to Percent.
Format the % of Total member fact cells to set the
Classes property to Crosstab fact cell (inner total
nested).

Task 5: Filter out nulls.


Where to Work
Hints
Toolbox tab
Set expression dialog
box\Expression
Definition box

Query Calculation for Non-null Promotional


Campaigns, as a peer to <Promotional Campaigns>:
filter ([Promotional Campaigns],tuple ([Current
Year],[Revenue])<>null or tuple ([Total Previous
Year],[Revenue])<>null)

Crosstab in report layout

Cut <Promotional Campaigns> from the report


layout.
Modify <Retailer Names>:
filter (children ([Selected Retailer Country]), tuple
([Current Year],[Aggregate(Promotional
Campaigns)])<>null or tuple ([Total Previous
Year],[Aggregate(Promotional Campaigns)])<>null)

10-8

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

END-TO-END WORKSHOP

Task 6: Order the Promotional Campaigns in descending order by Revenue


for the current year.
Where to Work
Hints
Toolbox tab
Set expression dialog
box\Expression
Definition box

Query Calculation object named Ordered Non-null


Promotional Campaigns, as a peer to <Non-null
Promotional Campaigns>:
order([Non-null Promotional Campaigns],
tuple([Current Year],[Revenue]), desc)

Crosstab in report layout

Cut <Non-null Promotional Campaigns>, from the


report layout.

Task 7: Add a Slicer tree prompt for products.


Where to Work
Hints
Query Explorer\
Queries\ Query1\
Slicer pane

Create a Slicer Member Set:


[sales_and_marketing].[Products]. [Products]->
?Product?

Toolbox tab

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

10-9

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Task 8: Add a chart to the report layout.


Where to Work
Hints
Page Explorer\ Report
Pages\ Page1
Toolbox tab

Drag a Chart object to the report layout above the


crosstab: Clustered Column with 3-D Visual Effect
chart.

Chart in report layout\


Properties pane

In the Properties pane\Data section, modify the


Query, property to use Query1.

Data Items tab

Populate the column chart with the following items:


Default measure (y-axis): Query1\Revenue
Series (primary axis): Query1\Quarters of
Current Year
Categories (x-axis): Aggregate(Promotional
Campaigns)

Toolbox tab

Series: above Quarters of Current Year insert a Query


Calculation for Quarters of Previous Year:
children(prevMember([Current Year]))

Task 9: Add a dynamic title to the report.


Where to Work
Hints
Set the Source Type property to Report Expression.
Report layout\ Title
area\ Properties pane
Modify the Report Expression property to the
Country parameter.
Report Studio toolbar

Unlock the report layout.

Toolbox tab

Drag a Text Item object to the left of


<%ParamDisplay...%>, type Promotional
Campaign Assessment: and then type a space.
Change the title class to Report Title text.

10-10

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

END-TO-END WORKSHOP

Task 10: Add a subtitle for the chart report.


Where to Work
Hints
Above the chart report:
Toolbox tab
Add a Block.
Drag a Text Item into the Block, type Quarter by
Quarter Comparison of Promotional Sales for,
type a space, and then click OK.
Drag a Layout Calculation object to the right of
Quarter by Quarter Comparison of Promotional
Sales for, and add the Product parameter.
Change the subtitle to class Chart title.
Task 11: Add a subtitle for the crosstab report.
Where to Work
Hints
Between the chart report and the crosstab:
Toolbox tab
Add a Block.
Drag a Text Item into the Block, type Comparison
of Promotional Sales to All Sales for, type a space,
and then click OK.
Drag a Layout Calculation object to the right of
Comparison of Promotional Sales to All Sales for,
and add the Product parameter.
Lock the report layout and format:
Report Studio toolbar
Add a 20 pixel high Block below the chart report.
Properties pane
Center the entire report.
Change the subtitle to class Chart title.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

10-11

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Task 12: Enable drilling and configure advanced behavior.


Where to Work
Hints
Data menu

Select Drill Behavior, then select the Allow drill-up


and drill-down check box.

Query Explorer\
Queries\ Query1
Properties pane

Change the Define Member Sets property to Yes.

Member Sets tab\


Insertable Objects pane

Drag Promotional Campaigns to the member sets


work area.
Select Aggregate(Promotional Campaigns),
Ctrl+click Non-null Promotional Campaigns,
Ordered Non-null Promotional Campaigns, and %
to Total and then drag them on top of Promotional
Campaigns in the member sets work area.

Member sets work area\


Properties pane

For Promotional Campaigns, rename Promotional


Campaigns to Promotional Campaigns MS, and
repeat this for the remaining member set structures to
add MS to the end of each name.

Data menu\ Drill


Behavior\ Advanced
tab\ Data Items pane

Change the Drill-up behavior and Drill-down


behavior to Replace Expression for Promotional
Campaigns.
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

10-12

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

END-TO-END WORKSHOP

Task 13: Create a report from relational data to provide a drill-through


target.
Where to Work
Hints
Save the report as End-to-End Workshop Source in
File menu
My Folders.
Create a new list report using the Go Data Warehouse
(query) package.
Add the following items to the list report:
Source tab\ Sales and
Retailers\Retailer
Marketing (query)\ Sales
(query)
Promotions\Campaign name
Products\Product
Sales fact\Quantity
Sales fact\Revenue
Sales fact\Unit cost
Group Retailer name, Campaign name and Product
name.
List report
Report Studio toolbar

In the list report, click Retailer name, and click the


Section button.

Task 14: Create a detail filter to provide the parameter for the target report
and save the report.
Where to Work
Hints
Report Studio toolbar
Available Components
pane\ Source tab
File menu

2007, 2012, IBM Corporation

Click the Filter button, and in the Filters dialog box,


click Add to create and validate the following
expression:
[Sales (query)].[Retailer].[Retailer key]=?retailer?
Save the report as End-to-End Workshop Target.

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

10-13

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Task 15: Add the drill-through definition to the source report and test the
report.
Where to Work
Hints
File menu

Open the End-to-End Workshop Source report.

Report layout

Click Retailer names, and click Drill-Through


Definitions.

Drill-Through
Definitions dialog box

Add a definition with the End-to-End Workshop


Target report as the target report, with the Parameter
Method as Pass data item value, and set the Value as
Retailer Names.

IBM Cognos Viewer

On the toolbar, click Run Report.

If you need more information to complete a task, see the Step-by-Step instructions at
the end of the Workshop.

10-14

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

END-TO-END WORKSHOP

Workshop 1: Workshop Results


After completing Task 11, and selecting Camping Equipment and France at the
prompts, a section of the first page of the report appears as follows:

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

10-15

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

After completing Task 15, and selecting Camping Equipment and France at the
prompts, and then drilling through on La bonne Forme in the resulting crosstab
report, a section of the final report appears as follows:

10-16

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

END-TO-END WORKSHOP

Workshop 1: Step-by-Step Instructions


Server:
User/Password:
Studio:
Package:
Report type:

http://localhost:88/ibmcognos
brettonf/Education1
Report Studio
Public Folders\Samples\Cubes\Sales and Marketing (cube)
Crosstab

Task 1. Build a crosstab and include a prompt for Retailer


country.
1.
2.

3.

4.
5.

Add the following query item to a new crosstab:


Measures: Measures dimension\Revenue measure
From the Toolbox tab, drag a Query Calculation object named Selected
Retailer Country, as a Set expression of the Retailers hierarchy, to the Rows
area of the report layout.
Create and validate the following expression:
[sales_and_marketing].[Retailers].[Retailers].[Retailer
country]->?Country?
Hints:
Available Components pane\Source tab: Retailers dimension\Retailers
hierarchy\Retailer country level
Validate using Australia
Click OK to close the Prompt dialog box, and then click OK to close the Set
Expression dialog box.
From the Toolbox tab, drag a Query Calculation object named Retailer
Names, as a Set expression of the Retailers hierarchy, as a peer of <Selected
Retailer Country>.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

10-17

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

6.

7.
8.

9.

Create and validate the following expression:


children ([Selected Retailer Country])
Hints:
Available Components pane\Data Items tab: Selected Retailer Country
Click OK to close the Set Expression dialog box.
In the report layout, click <Selected Retailer Country>, and then click Cut.
This action will remove Selected Retailer Country from the report layout, but
leave the query in the report.
On the toolbar, click Run Report. (select Australia at the prompt).
The results appear as follows:

10. Close IBM Cognos Viewer.

10-18

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

END-TO-END WORKSHOP

Task 2. Add time to columns in report layout.


1.

2.

3.
4.

5.

6.
7.

From the Toolbox tab, drag a Query Calculation object named Current
Year, as a Set expression of the Time hierarchy, to the Columns drop zone
in the report layout.
Create and validate the following expression:
closingPeriod ([sales_and_marketing].[Time].[Time].[Year])
Hints:
Available Components pane\Source tab: Time dimension\Time
hierarchy\Year level
Click OK to close the Set Expression dialog box.
From the Toolbox tab, drag a Query Calculation object named Quarters of
Current Year, as a Set expression of the Time hierarchy, as a peer to the left
of <Current Year> in the report layout.
Create and validate the following expression:
children([Current Year])
Hints:
Available Components pane\Data Items tab: Current Year
Click OK to close the Set Expression dialog box.
From the Toolbox tab, drag a Query Calculation object named Total
Previous Year, as a Set expression of the Time hierarchy, as a peer to the
right of <Current Year> in the report layout.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

10-19

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

8.

Create and validate the following expression:


prevMember ([Current Year])
Hints:
Available Components pane\Data Items tab: Current Year
9. Click OK to close the Set Expression dialog box.
10. On the toolbar, click Run Report. (select Australia at the prompt).
A section of the report appears as follows:

11. Close IBM Cognos Viewer.

10-20

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

END-TO-END WORKSHOP

Task 3. Add promotional campaigns to report layout,


excluding regular sales, and aggregate the results.
1.

2.

3.
4.

5.

6.
7.

From the Toolbox tab, drag a Query Calculation object named Promotional
Campaigns, as a Set expression of the Promotions hierarchy, to the Rows
area of the report layout, to nest as a child of <Retailer Names>.
Create and validate the following expression:
except ([sales_and_marketing].[Promotions].[Promotions].[Campaign],
[Regular sale])
Hints:
Available Components pane\Source tab: Promotions
dimension\Promotions hierarchy\Campaign level
Available Components pane\Source tab: Promotions
dimension\Promotions hierarchy\Campaign level\Members folder\Regular
sale member
Click OK to close the Set Expression dialog box.
From the Toolbox tab, drag a Query Calculation object named
Aggregate(Promotional Campaigns), as a Calculated Member of the
Promotions hierarchy, as a peer to <Promotional Campaigns> in the report
layout.
Create and validate the following expression:
aggregate (currentMeasure within set [Promotional Campaigns])
Hints:
Available Components pane\Data Items tab: Promotional Campaigns
Click OK to close the Calculated Member Expression dialog box.
In the report layout, click Aggregate(Promotional Campaigns), in the
Properties pane under Miscellaneous, click the Classes property, and then
click the ellipsis.

Task 3, Step 4: In 8.3 this was done by using the Aggregate tool, however in 8.4 there were new warnings displayed
regarding the expectation of a member, not a numeric value when the extended data item was reused in other
expressions. Because of this, in 10.1, this workshop changed to use a calculated member, rather than the Aggregate
tool.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

10-21

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

8.

9.

10.
11.

12.

13.

14.

10-22

In the Selected classes pane, click Crosstab member cell (calculated), click
the green left arrow to remove it from the list, in the Global classes pane,
double-click Crosstab member cell (inner total nested) to add it to the
Selected classes pane, and then click OK.
In the report layout, right-click Aggregate(Promotional Campaigns), and
then click Select Member Fact Cells.
You will format the cells to be consistent with a summary row.
In the Properties pane under Miscellaneous, click the Classes property, and
then click the ellipsis.
In the Selected classes pane, click Crosstab fact cell (calculated member),
click the green left arrow to remove it from the list, in the Global classes
pane, double-click Crosstab fact cell (inner total nested) to add it to the
Selected classes pane, and then click OK.
From the Toolbox tab, drag a Query Calculation object named Total All
Campaigns, as a Calculated member of the Promotions hierarchy, as a peer
to <Aggregate(Promotional Campaigns)> in the report layout.
Create and validate the following expression:
aggregate(currentMeasure within set
[sales_and_marketing].[Promotions]. [Promotions].[Campaign])
Hints:
Available Components pane\Source tab: Promotions
dimension\Promotions hierarchy\Campaign level
Click OK to close the Calculated Member Expression dialog box.

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

END-TO-END WORKSHOP

15. On the toolbar, click Run Report. (select Australia at the prompt).
A section of the report appears as follows:

16. Close IBM Cognos Viewer.


Task 4. Create and format a percent of total metric.
1.

2.

3.
4.

From the Toolbox tab, drag a Query Calculation object named % of Total,
as a Calculated member of the Promotions hierarchy, as a peer to
Aggregate(Promotional Campaigns) in the report layout.
Create and validate the following expression:
[Aggregate(Promotional Campaigns)]/[Total All Campaigns]
Hints:
Available Components pane\Data Items tab: Aggregate(Promotional
Campaigns)
Available Components pane\Data Items tab: Total All Campaigns
Click OK to close the Calculated Member Expression dialog box.
In the report layout, click Total All Campaigns, and then click Cut.
This action will remove Total All Campaigns from the report layout, but leave
the query in the report.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

10-23

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

5.

In the report layout, click % of Total, in the Properties pane under


Miscellaneous, click the Classes property, and then click the ellipsis.
6. In the Selected classes pane, click Crosstab member cell (calculated), click
the green left arrow to remove it from the list, in the Global classes pane,
double-click Crosstab member cell (inner total nested) to add it to the
Selected classes pane, and then click OK.
7. In the report layout, right-click % of Total, and then click Select Member
Fact Cells.
8. In the 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.
9. In the crosstab, ensure that the cells selected in step 7 are still selected, in the
Properties pane under Miscellaneous, click the Classes property, and then
click the ellipsis.
10. In the Selected classes pane, click Crosstab fact cell (calculated member),
click the green left arrow to remove it from the list, in the Global classes
pane, double-click Crosstab fact cell (inner total nested) to add it to the
Selected classes pane, and then click OK.

10-24

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

END-TO-END WORKSHOP

11. On the toolbar, click Run Report. (select Australia at the prompt).
A section of the report appears as follows:

12. Close IBM Cognos Viewer.


Task 5. Filter out nulls.
1.

2.

3.

Toolbox tab, drag a Query Calculation object named Non-null


Promotional Campaigns, as a Set expression of the Promotions hierarchy,
as a peer to <Promotional Campaigns> in the report layout.
In the Expression Definition box, create and validate the expression using
items from the Available Components pane\Data Items tab as follows:
filter ([Promotional Campaigns], tuple ([Current Year],
[Revenue])<>null or tuple ([Total Previous Year],[Revenue])<>null)
Hints:
Promotional Campaigns
Current Year
Revenue
Total Previous Year
Click OK to close the Data Item Expression dialog box.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

10-25

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

4.

5.

6.
7.

8.

9.

10-26

Click <Retailer Names>, in the Properties pane, under Data Item, for the
Set Definition property, double-click (Defined), and then double-click Set
Expression.
In the Expression Definition box, create and validate the expression using
items from the Available Components pane\Data Items tab as follows:
filter (children ([Selected Retailer Country]), tuple ([Current
Year],[Aggregate(Promotional Campaigns)])<>null or tuple ([Total
Previous Year],[Aggregate(Promotional Campaigns)])<>null)
Hints:
Current Year
Aggregate(Promotional Campaigns)
Total Previous Year
Click OK to close the Set Expression dialog box, and then click OK to close
the Set Definition dialog box.
In the report layout, click <Promotional Campaigns>, and then click Cut.
This action will remove Promotional Campaigns from the report layout, but
leave the query in the report.
On the toolbar, click Run Report. (select Australia at the prompt).
A section of the report appears as follows:

Close IBM Cognos Viewer.

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

END-TO-END WORKSHOP

Task 6. Order the Promotional Campaigns in descending


order by Revenue for the current year.
1.

2.

3.
4.

5.

6.

From the Toolbox tab, drag a Query Calculation object named Ordered
Non-null Promotional Campaigns, as a Set expression of the Promotions
hierarchy, as a peer to <Non-null Promotional Campaigns> in the report
layout.
In the Expression Definition box, create and validate the expression using
items from the Available Components pane\Data Items tab as follows:
order([Non-null Promotional Campaigns],tuple([Current
Year],[Revenue]), desc)
Hints:
Non-null Promotional Campaigns
Current Year
Revenue
Click OK to close the Set Expression dialog box.
In the report layout, cut <Non-null Promotional Campaigns>.
This will remove Non-null Promotional Campaigns from the report layout, but
leave the query in the report.
On the toolbar, click Run Report. (select Australia at the prompt).
A section of the report appears as follows:

Close IBM Cognos Viewer.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

10-27

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Task 7. Add a Slicer tree prompt for products.


1.
2.
3.

4.
5.
6.

On the Explorer bar, point to Query Explorer, and then under Queries click
Query1.
From the Toolbox tab, drag a Slicer Member Set object to the Slicer pane.
Create and validate the following expression:
[sales_and_marketing].[Products].[Products]->?Product?
Hints:
Available Components pane\Source tab: Products dimension\Products
hierarchy
Validate by choosing Products at the prompt
Click OK to close the Prompt dialog box, and then click OK to close the
Slicer Member Expression dialog box.
On the toolbar, click Run Report. (select Australia and Products at the
prompts) and then review the results.
Close IBM Cognos Viewer.

Task 8. Add a chart to the report layout.


1.
2.
3.
4.

10-28

On the Explorer bar point to Page Explorer, and then under Report Pages
click Page1.
From the Toolbox tab, drag a Chart object to the report layout above the
crosstab.
In the Insert Chart dialog box, in the Chart type pane, click Clustered
Column with 3-D Effects, and then click OK.
Click the background of the chart to select the chart object, and in the
Properties pane under Data, change the Query property to Query1.

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

END-TO-END WORKSHOP

5.

6.

7.

8.

From the Data Items tab, add the following query items 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)
From the Toolbox tab, drag a Query Calculation object named Quarters of
Previous Year, as a Set expression of the Time hierarchy, to the Series
(primary axis) drop zone as a peer of <#Quarters of Current Year#>.
Create and validate the following expression:
children(prevMember([Current Year]))
Hints:
Available Components pane\Data Items tab: Current Year

Click OK to close the Set Expression dialog box.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

10-29

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

9.

On the toolbar, click Run Report. (select Products and Australia at the
prompts).
A section of the report appears as follows:

10. Close IBM Cognos Viewer.


Task 9. Add a dynamic title to the report.
1.

2.
3.

10-30

In Report Studio, click the text item in the title area of the report, and then in
the Properties pane under Text Source, change the Source Type property to
Report Expression.
In the Properties pane, click the box next to Report Expression, and then
click the ellipsis.
On the Parameters tab, drag Country to the Expression Definition box,
validate the expression to ensure there are no errors, and then click OK.

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

END-TO-END WORKSHOP

4.
5.
6.

From the Toolbox tab, drag a Text Item to the left of


<%ParamDisplay...%>.
In the Text dialog box, type Promotional Campaign Assessment: press the
space bar, and then click OK.
Click <%ParamDisplay...%>, on the toolbar, click Pick up Style.
Click Promotional Campaign Assessment:, on the toolbar, click Apply
Style.

Task 10. Add a subtitle for the chart report.


1.
2.

3.

4.
5.

From the Toolbox tab, drag a Block to the space before the chart and below
the Report title header in the report layout.
From the Toolbox tab, drag a Text Item into the block, type Quarter by
Quarter Comparison of Promotional Sales for, press the space bar, and
then click OK.
From the Toolbox tab, drag a Layout Calculation object to the right of
Quarter by Quarter Comparison of Promotional Sales for, on the
Available Components pane\Parameters tab, drag Product to the
Expression Definition box.
Validate the expression to ensure there are no errors, and then click OK to
close the Report Expression dialog box.
In the report layout, click Quarter by Quarter Comparison of Promotional
Sales for, Ctrl+click <%ParamDisplay...%>, and then in the Properties
pane under Miscellaneous, change the Classes property to Chart title.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

10-31

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Task 11. Add a subtitle for the crosstab report.


1.
2.

3.

4.
5.

6.

7.
8.

9.

10-32

From the Toolbox tab, drag a Block to the space after the chart and before
the crosstab.
From the Toolbox tab, 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.
From the Toolbox tab, drag a Layout Calculation object to the right of
Comparison of Promotional Sales to All Sales for, the Available
Components pane\Parameters tab, drag Product to the Expression
Definition box.
Validate the expression to ensure there are no errors, and then click OK to
close the Report Expression dialog box.
Click Comparison of Promotional Sales to All Sales for, Ctrl+click
<%ParamDisplay...%>, and then in the Properties pane under
Miscellaneous, change Classes to Chart title.
From the Toolbox tab, drag a Block to the space below the chart in the report
layout, select the new block and then in the Properties pane under
Positioning, change the Size & Overflow property to have a height of 20 px.
Click in the background of the report page to select the page body, and then
on the toolbar click Center.
On the toolbar, click Run Report. (select Camping Equipment and France
at the prompts) and review the results.
Refer to the Workshop Results section on page 10-15 for an example of the
report.
Close IBM Cognos Viewer.

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

END-TO-END WORKSHOP

Task 12. Enable drilling and configure advanced behavior.


1.
2.
3.

4.
5.
6.
7.
8.

From the Data menu click Drill Behavior, and then on the Basic tab, click the
Allow drill-up and drill-down check box to select it.
Click OK, and then on the toolbar, click Run Report, selecting Products and
France at the prompts.
In the results crosstab, 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 IBM Cognos Viewer.
On the Explorer bar point to Query Explorer, and then under Queries click
Query1.
In the Properties pane under Data, change the Define Member Sets property
to Yes.
Click the Member Sets tab, and then from the Source tab, drag Promotional
Campaigns to the work area.
From the Source tab, click Aggregate(Promotional Campaigns), Ctrl+click
Non-null Promotional Campaigns, Ordered Non-null Promotional
Campaigns, and % of Total, and then drag them onto Promotional
Campaigns in the work area.
The items are nested under Promotional Campaigns.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

10-33

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

9.

10.
11.
12.
13.

14.

10-34

In the work area, click Promotional Campaigns, and then in the Properties
pane under Miscellaneous, rename Promotional Campaigns to
Promotional Campaigns MS.
Repeat step 9 to rename the remaining member set structures to add MS to the
end of each name.
From the Data menu click Drill Behavior, and then click the Advanced tab.
In the Data items pane, click Promotional Campaigns, and then change the
Drill-up behavior and Drill-down behavior to Replace Expression.
In the Data items pane, 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.
Click OK to close the Drill Behavior dialog box, on the toolbar, click
Run Report. (select Camping Equipment and France at the prompts) to
review the results, and then close IBM Cognos Viewer.

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

END-TO-END WORKSHOP

Task 13. Create a report from relational data to provide a drillthrough target.
1.
2.
3.

4.
5.

6.
7.

From the File menu, click Save to save your current report.
In the Name box, type End-to-End Workshop Source, browse to My
Folders and then click OK.
From the File menu click New, select the Public
Folders\Samples\Models\Go Data Warehouse (query) package, and then
click OK.
Click List to create a list report, and then click OK.
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:

In the report layout, click Retailer name, Ctrl+click Campaign name and
Product, and then on the toolbar, click Group / Ungroup.
In the report layout, click Retailer name, and then on the toolbar click
Section.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

10-35

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

Task 14. Create a detail filter to provide the parameter for the
target report and save the report.
1.
2.

On the toolbar click Filters, click Edit Filters, in the Filters dialog box click
Add, click Advanced, and then click OK to close the Create Filter dialog box.
Create and validate the following expression:
[Sales (query)].[Retailers].[Retailer key]=?retailer?
Hints:
Available Components pane\Source tab: Sales and Marketing (query)
folder\Sales (query) namespace\Retailers query subject\Codes\Retailer key
Validate using 7351 at the prompt

3.
4.
5.

6.

10-36

Click OK to close the Prompt dialog box, and then click OK to close the
Detail Filter Expression dialog box.
From the File menu, click Save and save the report with the name End-toEnd Workshop Target in My Folders.
On the toolbar, click Run Report. (use 7351 at the prompt) and review the
results.
A section of the report appears as follows:

Close IBM Cognos Viewer.

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

END-TO-END WORKSHOP

Task 15. Add the drill-through definition to the source report


and test the report.
1.

From the File menu, click Open, click End-to-End Workshop Source, and
then click Open.
2. In the report layout in the crosstab, click <Retailer Names>, and then on the
toolbar, click Drill-Through Definitions.
3. In the Drill-Through Definitions dialog box, click New Drill-Through
Definition.
4. On the Target Report tab, click the ellipsis to select the target report, click
End-to-End Workshop Target, and then click Open.
5. In the Parameters section, click the Edit button, and then in the Parameters
dialog box, from the Method drop-down list, click Pass data item value.
6. From the Value drop-down list, click Retailer Names, and then click OK.
7. Click OK to close the Drill-Through Definitions dialog box.
8. On the toolbar, click Run Report. (select Camping Equipment and France
at the prompts) and then in the resulting crosstab report click La bonne
Forme to review the results.
Refer to the Workshop Results section on page 10-16 for an example of the
report.
9. Close IBM Cognos Viewer and Report Studio.
10. Log off of IBM Cognos Connection.

2007, 2012, IBM Corporation

IBM Internal Enablement Purpose Only

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

10-37

IBM COGNOS REPORT STUDIO: AUTHOR REPORTS WITH MULTIDIMENSIONAL DATA (V10.2)

10-38

IBM Internal Enablement Purpose Only

2007, 2012, IBM Corporation

This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

IBM Internal Enablement Purpose Only

This information was developed for products and services offered in the U.S.A.
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
Armonk, NY 10504-1785
U.S.A.
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 Web sites are provided for convenience only and
do not in any manner serve as an endorsement of those Web sites. The materials at those Web
sites are not part of the materials for this IBM product and use of those Web sites 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 nonIBM 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.
If you are viewing this information softcopy, the photographs and color illustrations may not
appear.
IBM Internal Enablement Purpose Only

Potrebbero piacerti anche