Reporting Techniques for TM1 and IBM Cognos 8.4 BI Proven Practice

advertisement
Proven Practice
Reporting Techniques for TM1 and
IBM Cognos 8.4 BI
Product(s): TM1 9.4, IBM Cognos 8.4
Area of Interest: Reporting
Reporting Techniques for TM1 and IBM Cognos 8.4 BI
2
Copyright and Trademarks
Licensed Materials - Property of IBM.
© Copyright IBM Corp. 2009
IBM, the IBM logo, and Cognos are trademarks or registered trademarks of
International Business Machines Corp., registered in many jurisdictions worldwide.
Other product and service names might be trademarks of IBM or other companies. A
current list of IBM trademarks is available on the Web at
http://www.ibm.com/legal/copytrade.shtml
While every attempt has been made to ensure that the information in this document
is accurate and complete, some typographical errors or technical inaccuracies may
exist. IBM does not accept responsibility for any kind of loss resulting from the use of
information contained in this document. The information contained in this document
is subject to change without notice.
This document is maintained by the Best Practices, Product and Technology team.
You can send comments, suggestions, and additions to cscogpp@ca.ibm.com.
IBM Proprietary
Reporting Techniques for TM1 and IBM Cognos 8.4 BI
3
Contents
1
INTRODUCTION ............................................................................................ 4
1.1
1.2
1.3
PURPOSE ................................................................................................................ 4
APPLICABILITY ......................................................................................................... 4
EXCLUSIONS AND EXCEPTIONS ..................................................................................... 4
2
PREPARING TM1 TO BE CONSUMED IN COGNOS 8.4 ................................... 4
3
SETTING UP A TM1 CUBE FOR REPORTING .................................................. 4
3.1
3.2
DEFINING A MEASURE DIMENSION ................................................................................. 4
NAMED LEVELS ........................................................................................................ 5
4
CREATING CONNECTION STRING AND IBM COGNOS 8 PACKAGE FOR
REPORTING .............................................................................................................. 8
5
BUILDING A REPORT .................................................................................. 18
APPENDIX: SECURING THE DIMENSION .............................................................. 20
IBM Proprietary
Reporting Techniques for TM1 and IBM Cognos 8.4 BI
4
1 Introduction
1.1
Purpose
This document will discuss reporting tips and techniques when using IBM
Cognos TM1 9.4 as a datasource for IBM Cognos 8.4
When using TM1 as a datasource for IBM Cognos 8.4 write backs, or new
data entries, in TM1 can be reflected immediately within reporting.
1.2
Applicability
TM1 9.4 and IBM Cognos 8.4.
Before implementing the features in this document you may wish to review
the Integrating TM1 and IBM Cognos 8 BI document by following the
hyperlink.
1.3
Exclusions and Exceptions
At this time there are no known exclusions or exceptions.
2 Preparing TM1 to be consumed in Cognos 8.4
TM1 can be used as a direct data source for IBM Cognos 8.4 BI, in order to
define TM1 as a datasource. Framework Manager, IBM Cognos 8.4 Server
and TM1 Server components are all required.
Portlet or Security integration is not necessary to use TM1 as a reporting
source. If security from the TM1 user is required integration with IBM
Cognos 8 security is required. If you are using Native TM1 security a userid
and password that will be shared is required.
3 Setting up a TM1 cube for reporting
3.1
Defining a Measure dimension
Any cube within the TM1 server that is to be used by IBM Cognos 8 BI
requires a defined Measures dimension.
A measures dimension is typically a numeric column as found in the fact table
of a typical Database. An example of a measures dimension in TM1 would be
Revenue, Units Sold, or Dollars.
In either Architect or Perspectives right-click the cube name destined to be
reported from, and select Properties.
IBM Proprietary
Reporting Techniques for TM1 and IBM Cognos 8.4 BI
5
When the Cube Properties dialog box appears, using the Measures
Dimension list select the dimension that would best reflect the measures as
defined above. It is not necessary to define a Time dimension or use the
Load on Demand option to allow the cube to be reported on in IBM Cognos
8 BI
Click OK. This will now associate the selected cube with the measures
dimension. When reporting in Cognos 8 the measures dimension will be
identified with a unique icon we will see later on.
3.2
Named Levels
A TM1 Dimension can have unbalanced or ragged hierarchy structure. TM1 is
able to have parallel hierarchies. It is not recommended to use this approach
with an unbalanced hierarchy as the results are not what would typically be
used for reporting and may cause confusion.
In any of the BI studios you only see one hierarchy with the name of the
Dimension. However some Report features are based on MDX hierarchies. To
meet this requirement levels can be defined in the }HierarchyProperties cube.
The }HierarchyProperties is a TM1 control cube and can be displayed by
clicking View > Display Control Objects.
IBM Proprietary
Reporting Techniques for TM1 and IBM Cognos 8.4 BI
6
Using the }HierarchyProperties level names and default members can be
defined for use in an MDX hierarchy. It is not necessary to use the
}HierarchyProperties control cube, and it should only be used if named levels
are required.
The }HierarchyProperties cube consists of three dimensions }Hierarchies,
}HierarchyProperties, and }Dimensions. The dimensions are control
dimensions and with exception of }dimensions are only related to the
}HierarchyProperties cube. By opening and viewing the }HierarchyProperties
cube we see there are 20 available levels that can be defined.
In the example below the Subsidiaries dimension has a defaultmember (left
blank), and the levels defined as Total Company Regions and Country.
The order of levels in the }HierarchyProperties cube work from Level 0 being
the top level on downwards. This is a variation from a typical TM1 dimension
level where Level 0 is the lowest level.
IBM Proprietary
Reporting Techniques for TM1 and IBM Cognos 8.4 BI
7
Once the levels are defined save it as the default view and open Turbo
Integrator to create a new script.
Now that the named levels are defined we must create the
RefreshMdxHierarchy Turbo Integrator script and then executed it. This
script requires a single parameter which informs it of the dimension whose
hierarchy must be updated. This however does not affect the method TM1
creates MDX and only allows the named levels to override the defaults set in
the hierarchy generation.
When creating the TI script leave the defaults set and click the Advanced
then Prolog tab.
Enter RefreshMDXHierarchy(‘dimension name’) where dimension name is the
dimension the default member and named levels have been added.
In the example below, the Subsidiaries dimension was modified in the
}HierarchyProperties cube to reflect the required named levels therefore we
must enter Subsidiaries in the script. If there are multiple hierarchies that
must be updated they can be entered by inserting a new row in the Prolog
and using the name of the dimension.
Note: Copy/Paste of the RefreshMDXHierarchy(‘dimension name’) entry from
Microsoft Word will not work. TM1 will not recognize the single quotes used
in Word therefore it is highly recommended the script be typed rather than
copied from this article.
IBM Proprietary
Reporting Techniques for TM1 and IBM Cognos 8.4 BI
Once complete save and run the Turbo Integrator Process.
4 Creating Connection String and IBM Cognos 8 Package
for Reporting
IBM Cognos TM1 can be added for live reporting for your Plan, budget, or
analysis.
Open IBM Cognos 8 Framework Manager and click Create a new project.
IBM Proprietary
8
Reporting Techniques for TM1 and IBM Cognos 8.4 BI
Enter a name and location for the new project.
If required authenticate against IBM Cognos 8, and select the necessary
language. Once selected click OK.
Select Data Sources and click Next.
IBM Proprietary
9
Reporting Techniques for TM1 and IBM Cognos 8.4 BI
Click New and click Next on the welcome page.
IBM Proprietary
10
Reporting Techniques for TM1 and IBM Cognos 8.4 BI
11
Provide a name and a description of the connection, and click Next.
On the Specify the connection – New Data Source Wizard page select
TM1 from the Type list. Click Next.
IBM Proprietary
Reporting Techniques for TM1 and IBM Cognos 8.4 BI
12
Enter the location of the Administration Host and TM1 Server name.
Select No authentication for the signon only if using integrated IBM
Cognos 8 security. Users will reuse their own signon credentials. Click
Finish then close.
If Native TM1 security is required click the Signons radio button and enter a
User ID and Password to connect to the TM1 server.
IBM Proprietary
Reporting Techniques for TM1 and IBM Cognos 8.4 BI
Select the new datasource and click Next.
IBM Proprietary
13
Reporting Techniques for TM1 and IBM Cognos 8.4 BI
Select the cube required for reporting and click Next.
IBM Proprietary
14
Reporting Techniques for TM1 and IBM Cognos 8.4 BI
15
If there are any alias or language requirements they must be selected for
each dimension. If the defaults are ok click Next. The language for the Alias
must be selected and if the wrong language is selected you will need to run
the metadata wizard again and recreate the package.
The MUN (Member Unique Name) is the ID held in the TM1 server for each
dimension element. If you decide to change the alias being used you are
able to delete the current publish package for the cubes, rerun the metadata
wizard in Framework Manager and publish a new package, ensuring the same
name is used, with the changed alias. Due to the use of MUNs the reports
will not break and will now display the new alias.
In the following example, notice that the Shape alias is chosen for the
Subsidiaries dimension and the language is selected.
IBM Proprietary
Reporting Techniques for TM1 and IBM Cognos 8.4 BI
Select the Create a default package check box and click Finish.
IBM Proprietary
16
Reporting Techniques for TM1 and IBM Cognos 8.4 BI
17
The Create a package wizard opens. Enter a name for the package. This is
the name visible on the IBM Cognos 8 portal. You can also enter a
description and screen tip. Click Finish.
A message box appears asking to invoke the Publish Package wizard. Click
Yes.
IBM Proprietary
Reporting Techniques for TM1 and IBM Cognos 8.4 BI
18
Leaving all the defaults selected click Next > Next > Publish. Once the
Publish process has completed click the Finish button to exit the Publish
package wizard.
Close Framework Manager and save the changes.
Open the IBM Cognos 8 portal browsing to http://servername/cognos8 and
enter a User ID and password.
The Package created in Framework Manager will now be on the Portal home
page. The Commissions cube is now ready to report off of using the Named
Levels defined in section 3.2
5 Building a Report
Open IBM Cognos Connection and sign in as a user with Report Authoring
permissions and with access to the TM1 model.
Open a BI reporting studio (Analysis, Query or Report) and select the
package published earlier based on the TM1 cube.
Click Create a new Report and select a report type. In this instance a
Cross Tab report is selected.
Depending on the security used against TM1 you may be prompted to
authenticate
IBM Proprietary
Reporting Techniques for TM1 and IBM Cognos 8.4 BI
19
When the TM1 based packages loads, expand items in the Insertable
objects pane for the dimension(s) the named levels have been applied to. It
will now display the levels as set in TM1.
We can now create a report similar to any other report created in IBM
Cognos 8 BI.
IBM Proprietary
Reporting Techniques for TM1 and IBM Cognos 8.4 BI
20
Appendix: Securing the Dimension
Dimension security in TM1 when consumed in IBM Cognos 8 BI requires the user have
access to all elements in the path of a dimension. If there is no access at a level in the path
no data will be returned. Consider the following example below to explain how dimension
level security works.
Using the following Dimension:
Total Cost Centers
CostCenter Group 1
CostCenter1
CostCenter2
CostCenter3
CostCenter Group 1
CostCenter4
CostCenter5
CostCenter6
IBM Proprietary
Reporting Techniques for TM1 and IBM Cognos 8.4 BI
CostCenter Group 1
CostCenter7
CostCenter8
Example 1:
A user has read/write access only to
Total Cost Centers
CostCenter Group 1
CostCenter4
CostCenter6
(other elements have access rights set to "none")
In Report Studio the user will be able to see:
Total Cost Centers
CostCenter Group 1
CostCenter4
CostCenter6
Example 2:
A user has read/write access only to
Total Cost Centers
In Report Studio the user will be able to see:
Total Cost Centers
Example 3:
A user has read/write access only to
CostCenter4
CostCenter6
The user will see no member in this Dimension in Report Studio
Example 4:
A user has read/write access only to
CostCenter Group 1
CostCenter4
CostCenter6
The user will see no member in this Dimension in Report Studio
IBM Proprietary
21
Download