IBM Cognos Analytics
IBM Cognos Analytics
IBM Cognos Analytics
Crosstabs
Crosstab reports, also known as matrix reports are used to show the relationships between
three or more query items.
Crosstab reports show data in rows and columns with information summarized at the
intersection points.
For example, the following crosstab shows the gross profit and revenue by product line for
each year.
When you add data items to crosstabs, you create crosstab nodes and crosstab node
members. These objects allow you to easily create crosstabs, by dragging data items to
crosstabs.
We can Format crosstabs to give them the appearance you want. You can specify formatting
for rows, columns, and fact cells in a crosstab or for the entire crosstab. When you specify
formatting for all rows, columns, fact cells, or the crosstab, the formatting is automatically
applied to any new items you add.
Types of Crosstab
Single-Edge Crosstab
Create a single-edge crosstab report to show data in a list-like form. For example, to show the
quantity of products sold for each year and for each order method, you could create a crosstab
with Order Year and Order Method as rows and Quantity as the measure.
Nested Crosstab
Nest data in a crosstab report to compare information by using more than one data item in a
column or row. For example, a report shows the number of sales by product line for the past
fiscal year. You decide to add a data item to further break down the number of sales by quarter.
Lists
Lists are used to show detailed information from your
database, such as product lists and customer lists.
A list shows data in rows and columns. Each column
shows all the values for a data item in the database or a
calculation based on data items in the database.
You can specify whether to automatically add an overall
aggregate summary in the list footer and a summary for
any groups in the list by selecting Automatic group and
summary behaviour for lists.
Properties of Cognos Lists:
Set list specifications
Format lists to give them the appearance you want. You can specify formatting for individual
column titles or bodies or for all columns in a list. When you specify formatting for all columns
in a list, the formatting is automatically applied to new columns you subsequently add.
Hide columns in list reports
You can hide columns from the output of list reports. If you select to hide a column, the query
for that column is still executed.
Creating a scrollable list
Create a scrollable list so that column headings remain visible when the list contains many rows
of data.
Using Repeaters
Use repeaters to repeat items when you run the report. For example, you can use repeaters to
create mailing labels, including customer names and addresses.
Cognos Charts
IBM Cognos Analytics - Reporting provides many types of charts for presenting your data in
a way that is meaningful for your users.
You can convert a chart from one type (for example, a bar chart) to another type (for
example, a line chart).
You can convert charts from the legacy charts to the current default charts. When you
convert a legacy chart, select the template that most closely matches your legacy chart in
order to preserve as many settings as possible.
After you create a chart, you can customize it by changing its properties.
To improve performance, you can limit the number of hotspots that are generated for
If you use a dimensionally modelled data source, you can create a chart that allows you to
drill down to lower-level data or drill up to higher-level data.
Chart Properties
Data Series
A data series is a group of related data points that are plotted in a chart. Each series has a
unique color or pattern and is described in the legend. You can plot one or more data series in a
chart; pie charts have only one data series.
Categories
Categories are groups of related data from the data series that are plotted on the X-axis.
Categories of multiple data series are shown together using clustered and stacked data markers.
Axes
Axes are lines that provide references for measurement or comparison.
Legend
A legend is a key to the patterns or colours assigned to the data series or categories in a chart.
Columns, Lines, and Areas
Charts use graphical elements such as columns, horizontal bars, points, bubbles, lines, and areas
as visual representations of data points.
Types of charts
Column Charts: Column charts are useful for comparing discrete data or showing trends over
time.
Line Charts: Line charts are useful for showing trends over time and comparing many data
series.
Pie Charts: Pie charts are useful for highlighting proportions.
Bar Charts: Bar charts are useful for showing trends over time and plotting many data series.
Area Charts: Area charts are useful for emphasizing the magnitude of change over time. Stacked
area charts are also used to show the relationship of parts to the whole.
Point Charts: Point charts are useful for showing quantitative data in an uncluttered fashion.
Combination Charts: Combination charts plot multiple data series by using combinations of
columns, areas, and lines within one chart. They are useful for highlighting relationships
between the various data series.
Scatter Charts: Scatter charts use data points to plot two measures anywhere along a scale, not
only at regular tick marks.
Pareto Charts: Pareto charts help you to improve processes by identifying the primary causes of
an event. They rank categories from the most frequent to the least frequent. These charts are
frequently used for quality control data, so that you can identify and reduce the primary cause
of problems.
Conditional Styles
Add conditional styles to your report to better identify exceptional or unexpected results.
A conditional style is a format, such as cell shading or font colour that is applied to objects
when a specified condition is true.
For example, you want to automatically highlight in green the departments in your
organization that meet their budget quotas and highlight in red the departments that go
over budget.
Creating conditional styles color-codes information in your reports so that you can find areas
that need attention.
Steps
Steps to add conditional styles to a report
1. Open a report in edit mode
2. Select the report object you want to conditionally format and open the properties panel
3. In the properties panel, click the Conditional styles ellipses to open the Conditional
styles dialog
4. Click the plus button and select New conditional style
5. Select the data item you want to base the conditional style and click Ok.
6. A conditional style dialog based on the data type selected appears
- For a numeric style, click the plus button and enter a value that determines high and low
styles
- For a string style, click the plus button to select values or enter criteria such as contains,
begins with, matches.
- For a date and time style, click the plus button to select a date time that determines the
earlier or later dates and times
7. Use the Advanced conditional styles option to create more complex conditions to apply
styles the report. You can use the default advanced condition, Remaining values (including
future values), or you can click the plus button to add create custom conditions. The
conditions in top to bottom and the first condition that is met are applied.
Conditional blocks
Conditional blocks show different display results based on user interaction or parameters
read in when a report is run.
They provide a creative method for presenting either the same report data in various
formats or executing several completely different reports from one prompt page
Types of Applications:
Conditional blocks can be designed to:
A) Use a prompt page and prompts as a way to execute one of many reports from a single
interface.
B) Embed a prompt into a column/page to effect its values or order.
C) Evaluate the environment (based on the executing user or report output) in which the report
is being run and respond appropriately
Render variable
Render variable is a nice feature that allows the end user to focus primarily on the pages
they need instead of going through thousands of pages.
Render variable is used to conditionally hide particular part of the report like column,
Summary, footer, header etc..
When we use render variable, if condition is true the object will display. No need to use Box
type property.
Render Variable Specifies a variable based on which the object can be conditionally
rendered.
For Eg: We can assign a render variable to two separate pages such as the 'Summary Page'
and the 'Detail Page' in a report and control which page to be displayed based of the users
selection of the parameter being used in the expression definition of the render variable.
Layout calculation
Layout calculation is created to add run-time information to your report, such as current
date, current time, and user name.
When you create layout calculations, unsupported functions do not appear in
the Functions tab of the expression editor.
Specifically, there is no Summaries folder, and some operators, constants, and constructs are
also unavailable.
These functions are not available because only the database can perform them.
Report expressions and calculations based on layout expressions are performed in IBM®
Cognos® Analytics - Reporting.
To see the complete list of functions available in the expression editor, except for report
functions, create a query calculation.
All functions are available when you create a query calculation because these calculations
are performed in the database and not in Cognos Analytics - Reporting.
Steps:
1. Click the Toolbox icon The toolbox icon and drag Layout calculation to the report.
2. In the Available Components box, define the calculation:
To add data items that are not shown in the report, on the source tab source tab, double-
click data items.
To add data items from a specific query, on the queries tab queries tab, double-click data
items.
To add functions, summaries, and operators, on the functions tab functions tab, double-click
elements.
To add a value that is derived from a parameter, on the parameters tab parameters tab,
double-click a parameter. Parameters define prompts, drill-through reports, and master
detail relationships.
3. Click the validate button validate icon.
JOIN
A JOIN clause is used to combine rows from two or more tables, based on a related column
between them
Cross join
A cross join returns all possible combinations of rows of two tables (also
called a Cartesian product).
Inner join
An inner join, also known as a simple join, returns rows from joined tables
that have matching rows. It does not include rows from either table that have
no matching rows in the other.
Left outer join/left join
A left outer join returns all the rows from the left table that are
specified in the left outer join clause, not just the rows in which the
columns match.
Right outer join/right join
A right outer join returns all the rows from the right table that are
specified in the right outer join clause, not just the rows in which the
columns match.
Full outer join
A full outer join returns all joined rows from both tables, plus one row for
each unmatched left row (extended with nulls on the right), plus one row
for each unmatched right row (extended with nulls on the left).
Cascading Prompt
Create a cascading prompt to use values from one prompt to filter values in another
prompt. For example, a report contains the columns Product line and Product type.
You create prompts for these columns, and you specify that the Product type prompt is a
cascading prompt that uses Product line as the source.
When users select a product line, they see only the product types related to the selected
product line.
Steps:
1. To make the cascading source a required prompt, select it and, in the Properties pane, set
the Required property to Yes.
2. Click the prompt control to use as a cascading prompt.
3. In the Properties pane, double-click the Cascade source property.
4. Click the parameter that represents the cascade source.
5. If the prompt allows users to select multiple values, add a prompt button to the cascade
source to provide the cascading prompt with the appropriate values:
Click the Toolbox icon The toolbox icon, drag Prompt button prompt icon to the report.
Click the prompt button and, in the Properties pane, set the Type property to Reprompt.
To change the text in the prompt button, click the Toolbox icon, drag the Text item icon text
item object icon to the prompt button and type the text.
Union
Create a union query to combine two or more queries into one result set.
You can combine queries that use different data sources.
For example, you can combine a query that returns data from a dimensional data source
with a query that returns data from a relational data source.
To combine two queries, the following conditions must be met:
The two queries must have the same number of data items.
The data items must have compatible types and appear in the same order.
For numeric data types, integer, float, double, and decimal are compatible.
For string data types, char, varChar, and longVarChar are compatible.
For binary data types, binary and varBinary are compatible.
Date data types must match exactly.
Steps
1. Open Cognos Analytics 11 Framework Manager and find the package that you want to edit.
2. Click on ‘Actions’ at the top of the program.
3. Click on ‘Define Query Set’.
4. Specify a name for the Union query subject.
5. From the drop-down list, select ‘Union’ option.
6. Select the query subject you want to Union with your first query subject.
Detail Filter
When you use a detail filter to filter a report only on detail data items, none of the data
items in a detail filter are summary data items. Examples of detail data items are product,
order number, and customer name.
When going for a detail filters the filters are applied on individual data items in the report.
You can filter detail data items that you select from a query or a catalog.
Detail Filter --we can apply to each and every record in a database.
A detail filter applies one or more specified conditions to each row of data. If the conditions
are true for a row, the row is retrieved and appears in the report: if the conditions are not
true, the row is not retrieved and does not appear in the report.
There are two options while using a detail filter
a) Before auto aggregation or after auto aggregation i.e. before the data is brought into the
cache or after the data has been brought into the cache.
b) If we add set the property as before auto aggregation filter will be applied to where
clause otherwise filter is applied in having clause.
Summary Filter
A summary filter is used to filter summary data items in a report. Before you create a
summary filter, you must calculate the summary data items that you want to use in the
filter.
Summary data items that you include in the filter are calculated before the filter is applied
while summary data items that aren't in the filter are calculated after the summary filter is
applied.
Summary filter are applied on summary values in the report.
You can filter summary data items that select from a report query or the catalog.
A summary filter should hence be used only when groups need to be filtered out otherwise
an after aggregation filter should be used.
We Don't have option Before auto aggregation or after auto aggregation for summary filter
Query Calculation
When working with dimensional data, insert a query calculation into your report to add a
new row or column with values that are based on a calculation.
For example, you create a query calculation named Euros that converts dollars to euros by
multiplying an existing dollar measure by a conversion rate. Euros can then be displayed to
end users in a separate row or column.
Procedure
1. Click the Toolbox icon The toolbox icon and drag Query calculation to the report.
2. Click the type of calculation you want to create and if required, select the hierarchy that
contains the data that is the focus of your calculation.
3. In the Name box, type a meaningful name for the calculation.
For example, if you are calculating the difference between 2012 revenue and 2011 revenue, you
could name your expression 2012 - 2011 Revenue.
4. In the Available Components pane, define the calculation:
Specify how you want to view the available data items in your data package by clicking the
view member tree button, view members tree icon or the view metadata tree button view
package tree icon.
To add data items that are not shown in the report, on the source tab source tab, double-
click the data items.
To add data items that are in the report but not necessarily in the model, such as
calculations, on the data items tab data items tab, double-click the data items.
To add data items from a specific query, on the queries tab queries tab, double-click data
items.
To add functions, summaries, and operators, on the functions tab functions tab, double-click
elements.
To add a macro, on the macros tab macros tab, drag the parameter maps, session
parameters, or functions you want to add to the macro.
Data Warehouse
A Data Warehouse (DW) is a relational database that is designed for query and analysis
rather than transaction processing. It includes historical data derived from transaction data
from single and multiple sources.
A Data Warehouse provides integrated, enterprise-wide, historical data and focuses on
providing support for decision-makers for data modeling and analysis.
A Data Warehouse is a group of data specific to the entire organization, not only to a
particular group of users.
It is not used for daily operations and transaction processing but used for making decisions.
A Data Warehouse can be viewed as a data system with the following attributes:
o It is a database designed for investigative tasks, using data from various applications.
o It supports a relatively small number of clients with relatively long interactions.
o It includes current and historical data to provide a historical perspective of information.
o Its usage is read-intensive.
o It contains a few large tables.
Dimension Tables
A dimension is an architecture usually composed of one or more hierarchies that categorize
data. If a dimension has not got hierarchies and levels, it is called a flat dimension or list. The
primary keys of each of the dimension’s table are part of the composite primary keys of the fact
table. Dimensional attributes help to define the dimensional value. They are generally
descriptive, textual values. Dimensional tables are usually small in size than fact table.
Fact tables store data about sales while dimension tables data about the geographic region
(markets, cities), clients, products, times, channels.
Fact Tables
A table in a star schema which contains facts and connected to dimensions. A fact table has two
types of columns: those that include fact and those that are foreign keys to the dimension table.
The primary key of the fact tables is generally a composite key that is made up of all of its
foreign keys.
A fact table might involve either detail level fact or fact that have been aggregated (fact tables
that include aggregated fact are often instead called summary tables). A fact table generally
contains facts with the same level of aggregation.
Star Schema
A star schema is the elementary form of a dimensional model, in which data are organized
into facts and dimensions.
A fact is an event that is counted or measured, such as a sale or log in.
A dimension includes reference data about the fact, such as date, item, or customer.
A star schema is a relational schema where a relational schema whose design represents a
multidimensional data model.
The star schema is the explicit data warehouse schema.
It is known as star schema because the entity-relationship diagram of this schemas
simulates a star, with points, diverge from a central table.
The centre of the schema consists of a large fact table, and the points of the star are the
dimension tables.
Snowflake Schema
"A schema is known as a snowflake if one or more-dimension tables do not connect directly
to the fact table but must join through other dimension tables."
The snowflake schema is an expansion of the star schema where each point of the star
explodes into more points. It is called snowflake schema because the diagram of snowflake
schema resembles a snowflake.
The snowflake schema consists of one fact table which is linked to many dimension tables,
which can be linked to other dimension tables through a many-to-one relationship. Tables in
a snowflake schema are generally normalized to the third normal form. Each dimension
table performs exactly one level in a hierarchy.
The following diagram shows a snowflake schema with two dimensions, each having three
levels. A snowflake schemas can have any number of dimension, and each dimension can
have any number of levels.