Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
18 views

Module 8

The document describes how to create and modify dimensions in Planning Analytics (PA). It explains what dimensions are and different types of dimensions. It then demonstrates how to manually create dimensions and add elements. It also shows how to modify existing dimensions by adding new elements and attributes.

Uploaded by

Shashank shekhar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

Module 8

The document describes how to create and modify dimensions in Planning Analytics (PA). It explains what dimensions are and different types of dimensions. It then demonstrates how to manually create dimensions and add elements. It also shows how to modify existing dimensions by adding new elements and attributes.

Uploaded by

Shashank shekhar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 49

APEX INSTITUTE OF TECHNOLOGY.


AIT-IBM CSE
CHANDIGARH UNIVERSITY, MOHALI
Create Dimensions
Objectives of
Planning Analytics
Objectives

•Describe cubes and dimensions


•Create dimensions manually
•Edit dimensions
•Create dimensions using TurboIntegrator
What is a Dimension

Dimension in PA are fundamental building blocks of TM1 cubes. They


contain one or more hierarchies.
Dimensions are made up of elements (sometimes also called "members"),
which are structured lists of related items that define the data stored in cubes.
The slide shows that the Time dimension contains hierarchies, where months
roll up into quarters, and quarters into the year. The Product dimension also
contains hierarchies, where product types roll into a product line, and product
lines into all product lines. TM1's aggregation is implicit. You do not need to
specify the children who roll up to a parent. The consolidation is assumed and
does not need to be defined by calculations.
Classes of Dimensions
Dimensions may be classified in the following categories:
▪Foundation
−Example: Account, Customer, Product
▪Control
−Example: Version, Scenario
▪Time
−Example: Year, Month, Hour
▪Measure
Foundation dimensions describe the data. Control dimensions are most often used to
implement business processes. Time dimensions represent the critical time of the data.
The measures dimension represents the cardinal values of interest. There should be a
measures dimension for almost every cube. It may be a good idea to name it after the
cube for which it will be used, along with a prefix or suffix marking it as the measures.
Cubename_m or cubename_Measures may be used. In this course, we will use
cubename_Measures to identify the measures dimensions.
Note: These dimension classifications are theoretical and are not enforced or marked in
TM1.
Naming Dimensions

Effective and consistent naming is vital for maintainability.


•Dimension names should be:
▪indicative of the dimension granularity
▪concise
▪unambiguous
Dimensions identify the location of data points in a cube. Consistent naming
conventions should be established and enforced in the model. Objects in TM1
may not be renamed. Instead they must be deleted and recreated. It is
recommended that the data be exported to text before the object is deleted.
This concept is true for all objects in TM1, including dimensions, elements,
cubes, processes, and so forth.
What is an Element

Simple :-An element without any children. Also known as a leaf element. It is
the lowest level in the hierarchy.
String :-An element that stores text strings in cells.
Consolidated :-An element that has aggregated data in a cube. Two or more
elements roll up to a consolidated element.
String elements are not aggregated and are typically used for descriptive
purposes. To include a string in a cell in a cube, the element from the last
dimension defining the cell must be a string element. TM1 treats string
elements that occur in any dimension other than the last one as numeric
elements. It is best practice to make the measures dimension the last
dimension. In a later exercise, you will add a string element to a measures
dimension that is in a cube. TM1 only stores data at the leaf level element, and
consolidations are done in RAM. This allows TM1 to quickly compute
calculations.
Using weights with elements
•Weights identify the contribution of an element to a consolidation.
•Default weight factor is 1.0.

TM1 assumes all children will be aggregated (addition). Credit balances may be stored.
Unsigned and negative weights allow you to apply a reduction. Weighting is a property
of a child's relationship to a parent. It allows the value of the child element to be
subtracted from the parent value (instead of aggregated). Net Revenue = Total
Revenue + (Total Sales Deductions * (-1))
Using attributes
If you want to Attribute type Example

describe features of an text or numeric • Square footage of a


element store
• The engine size of a car
model

provide alternative alias •Descriptive names of


names, or aliases general ledger accounts
•Element name in another
language

format the display for format •Number of decimal


numeric data places
•Currency or percentage
• How negatives appear
Create dimensions

It is best practice to name the dimension with an intuitive noun that indicates it
is a leaf-level element. TM1 supports the use of spaces and some special
characters in names. However, it is better to use underscores (_) instead of
spaces in order to minimize conflict with other applications.
Demonstration 1: Create
dimensions manually
Demonstration 1: Create
dimensions manually
Purpose: You want to create the Price and Cost, Months, and Versions
dimensions manually.
1. From the Start menu, point to All Programs\IBM Cognos TM1 - 64, and
then click Architect.
2. Maximize the window, expand TM1, and then double-
click SampleOutdoors.
3. Log on with a user ID of admin and a password of apple. Notice that this
TM1 server does not currently contain any objects.
4. From the View menu, deselect the Display Control Objects menu item if it
is currently selected.
5. Right-click Dimensions, and then click Create New Dimension.
6. From the Edit menu, click Insert Element.
7. In the Insert Element Name box, type Unit Sale Price.
8. Leave the default Element Weight and Element Type, and then click
Add. The new element appears in the Inserted Elements pane. You can
also press to add elements to the Inserted Elements pane.
9. Repeat steps 6 and 7 to add Unit Cost, Margin and Margin%. 10.
Click OK.
11. From the View menu, click Properties Window.
12. Select Unit Sale Price on the left.
If the Dimension Editor does not appear with two panes as shown you
can also click the Display Properties Window button on the toolbar.
13. From the Dimension menu, click Save.
14. In the Name box, type Price_and_Cost_Measures, and then click
OK.
15. Click OK to close the Dimension Editor
Task 2. Create the Months
dimension

Next you will create the Months dimension. Instead of typing each month, you
will use Microsoft Excel to populate the months.
1. Right-click Dimensions, and then click Create New Dimension.
2. Launch Microsoft Excel, create a new blank workbook (if necessary), and
then in cell A1, type Jan. You will use Autofill functionality to populate the
remaining months of the year.
3. Click cell A1, and then place the pointer over the lower right corner of cell
A1, until you see a plus sign.
4. Click and drag the cursor to cell A12, and then release the mouse button
5. Copy the 12 months from Microsoft Excel, and paste them in the
grey pane in the Dimension Editor.
6. Close Microsoft Excel without saving.
7. In the Dimension Editor window, from the Dimension menu, save
the dimension with the name Months.
The icon to the left of each element indicates that these are leaf-level numeric elements,
at the lowest level of detail in the dimension. In a cube that contains only numbers, all
the lowest level elements are numeric.
8. Click OK to close the Dimension Editor. It is a proven practice to include the
measures dimension as the last dimension in the cube. However, dimensions can be
created in the order of your choice. The measures dimension is usually named
something like _m or _measures. In the next unit, you will create the Price and Cost
cube. TM1 supports string elements. They are not aggregated and are usually used for
descriptive purposes. If string elements exist, they must be defined in the last dimension
in the cube (which can also be the measures dimension). A dimension does not actually
contain anything. It maps to data points when used in a cube. The text string "Jan" does
not point to text. It points to a value that "Jan" describes.
Task 3. Create the Versions
dimension

1. Right-click Dimensions, and then click Create New Dimension.


2. In the Dimension Editor, insert the following elements:
Budget Version 1
Budget Version 2
3. Save the dimension with the name Versions, and then close the Dimension
Editor.
4. Leave Architect open for the next demonstration.

Results: You have created the Price_and_Cost_Measures, Months, and


Versions dimensions.
Modify existing dimensions
Purpose: You want to modify the Months dimension to include the elements
for quarters and year, and then sort the Months dimension. You will add
descriptive attributes for each month to identify the next and previous months,
as well as an alias for each month in order to refer to each month in either
short or long form. You will also edit the attribute elements to format the
Price_and_Cost_Measures dimension.
Task 1. Add Quarters and Total Year elements to
the Months dimension and then sort the
dimension
1. In Server Explorer, right-click Months, and then click Edit Dimension
Structure.
2. From the Edit menu, click Insert Element, and then insert the following
elements with the default Element Weight and Element Type:
• Q1
• Q2
• Q3
• Q4
Total Year
3. Click OK
4. Click Jan, Shift+click Mar to select Jan to Mar, and then drag and drop the elements
onto
Q1 . The icon indicates that the selected elements will be dropped as child elements.
The "Σ" indicates consolidated items. Jan, Feb, and Mar are summed into Q1 .
5. Right-click Q1, and then click Element Properties. Notice that the element type is
"Consolidated".
6. Under Element Type, click the arrow beside Consolidated.
Notice that that the other available element types are Simple and String.
7. Click Cancel, and then view the Element Properties for Jan. Notice that the element
type is Simple.
8. Click Cancel.
9. Select Apr, May, and Jun, and then drop them onto Q2.
10. Select Jul, Aug, and Sep, and then drop them onto Q3.
11. Select Oct, Nov, and Dec, and then drop them onto Q4.
12. Collapse and select Q1, Q2, Q3, and Q4, and then drop the selection onto Total
Year.
Next, you want to make sure that these items will maintain this element order when
you open the dimension again.
13. On the toolbar, click Hierarchy Sort .
14. On the toolbar, click Set Dimension order .
This button will reset the index number of each element. Each time you add
a new element, the next available index number is assigned to it. This
number is often used in ordering the dimension. If you moved the elements
around, you may wish to reset the index number to reflect the new order.
However, index numbers are sometimes used in TM1 functions so you want
to be sure you will not alter the result of these functions if you reorder the
dimension.
Task 2. Add element attributes for Next and
Previous Months

Next you will add descriptions that identify next and previous months.
1. In Server Explorer, right-click the Months dimension and click Edit
Element Attributes.
2. From the Edit menu, click Add New Attribute.
3. In the Name box, type Next, under Type, ensure that Text is selected, and
then click OK.
4. Repeat steps 2 and 3, and in the Name box, type Previous. You will need to
identify the Next and Previous month.
5. Enter the values as shown below:
Note: You can paste Autofill values from Microsoft
Excel.
Task 3. Add attributes to alias the month name in
full name form

1. From the Edit menu, click Add New Attribute.


2. In the Name box, type Full Name, select Alias, and then click OK. The
warning that TM1 will set initial values for all objects for an alias attribute
appears.
3. Click OK. You will manually change the values in the column to use full
names.
4. Modify the values in the Full Name (Alias) column to the full names.
Task 4. Format the elements in the
Price_and_Cost_Measures dimension
1. In the Server Explorer window, right click Price_and_Cost_Measures, and
then click Edit Element Attributes.
2. Click and drag - from the Unit Sale Price cell to the Margin cell - to
highlight all three cells.
3. Click Format.
4. Click Currency, and then click OK.
5. Click the Margin% cell, and then click Format.
6. Click Comma, and then click OK.

7. Click OK.
8. Leave Architect open for the next demonstration.

Results: You modified the Months dimension to include the elements for
quarters and year, and then sorted the Months dimension. Next you added
descriptive attributes for each month to identify the next and previous
months, as well as an alias for each month to be able to refer to it in either
short or long form. Lastly, you edited the attribute elements to format the
Price_and_Cost_Measures dimension.
TurboIntegrator
What is TurboIntegrator ?

•TurboIntegrator (TI) is an extraction, transformation, and loading (ETL) tool


built into TM1.
• Use TI to:
▪ create and update dimensions
▪ create and update cubes
▪ load data
▪ maintain model objects using TI functions
TurboIntegrator (TI) is used to create a process that recognizes the data
structure of the source and transforms it into the appropriate structure for the
model. Once the TI process is developed, you can rerun it or schedule it to be
used when importing data from a dynamic source. TI may import data from a
variety of sources including TM1, text files, ODBC, and more. In this unit, the
focus is on creating dimensions. However, additional uses will be discussed in
the following units. When creating an object using TI, be sure to review the
resulting object for accuracy. It is possible for a TI process to run without an
error, while the resulting structure is not what was intended. This may be due
to bad or unexpected data (garbage in, garbage out, or GIGO), or a number of
other reasons. It is recommended that you always review the resulting objects
for accuracy.
Keys Steps in TI
TI uses a number of windows to aid in the development of a process,
including:

1) Data Source
2) Define Variables
3) Map Data
4) Advanced
5) Schedule

The Data Source tab allows you to select and preview the data from the
data source as it appears to TI. Define Variables is used to identify how
the incoming data will be transformed for use in the TM1 structures. Map
Data allows for more detailed mapping of data structures and objects.
Scripts used by a TI process are displayed and edited from the Advanced
tab. The Schedule tab is used to schedule the process to run repetitively,
or off hours.
Create a dimension using
TurboIntegrator
Demonstration 3: Create a dimension using
TurboIntegrator

Purpose: You will create the Products dimension using


TurboIntegrator. You will identify text data as the source, create
variables to transform the data, map the variables to TM1 objects,
review the scripts generated, and run the process. Finally, you will
review the resulting dimension for accuracy.
Task 1. Add data source connection
information
1. In the Server Explorer window, under SampleOutdoors, right-click
Processes, and then click Create New Process. TurboIntegrator opens.
2. On the Data Source tab, click Text.
3. Next to Data Source Name, click Browse. The Select Input File dialog box
appears.
4. Navigate to C:\Program
Files\IBM\cognos\tm1_64\samples\tm1\greatoutdoors\sourcefiles, and then
double-click products.csv to open the file.
5. Click OK to dismiss the warning. If you were working on a remote server,
you would use a Universal Naming Convention (UNC) path for files. The
UNC path is of the form \\ComputerName\SharedFolder\Resource.
6. Ensure that the Delimiter Type is Delimited and that the Delimiter is
Comma.
7. Click Preview.
Task 2. Modify variable names

1. At the top of the TurboIntegrator window, click the Variables tab.


2. In the first row, double-click V1 and rename it to vProducts. Leave the
Variable Type column as String. The Variable column is used to identify to TI
what type of data is coming from the source. You define formulas to transform
this variable type into the final data structure required for the TM1 object
being created/updated in the TI process.
3. In the Contents column, in the vProducts row, click the down arrow , and
then click Element. The Contents column identifies how the incoming data
will be used or transformed in the TI process. It is defined by selecting one of
the following settings:
Contents Description

Ignore Ignore the contents of the column when processing the data source.

Element The column contains simple elements.

Consolidatio The column contains consolidated elements.


n
Data The column contains data values in a cube.

Attribute The column contains element attributes for the dimension you want to
create or update.
Other The column contains data that does not fall into any of the previous four
categories. Typically, this setting is used for columns containing data that
will be processed through custom variables and formulas.
4.Repeat steps 2 and 3 with the following information.

Old Variable Name New Variable Name Contents

V2 vProductTypes Consolidation

V3 vTotalProduct Consolidation

The result appears as shown below


Task 3. Identify how data is mapped

1. Click the Maps tab, and then click the Dimensions sub-tab.
2. For the vProducts element variable, in the Dimension column, type
Products.
3. In the Action column, click the down arrow , and then click Create (if
necessary).
4. In the Element Type column, ensure that Numeric is selected. Numeric is
the default and should only be changed if the data will be used for a String
element. When you review the elements in a dimension in the Subset or
Dimension Editors, their icon includes either a # or ab (at the lowest level)
identifying a numeric or a string element.
5. In the Element Order column, click By Input. The Dimension Element
Ordering dialog box appears.
6. Select Automatic, and then select Hierarchy.
The result appears as shown below:
7. Click OK.
8. Click the Consolidations tab. This tab identifies the parent-child relationship(s) in the
dimension. You can map more than one hierarchy here if necessary. It is often useful to
diagram the parent-child relationships on paper or in a diagram tool prior to working in this
screen: vTotalProduct
vProductTypes
vProducts
9. For the vProductTypes consolidation variable, click the arrow to the right of the Child
Variable cell, select vProducts, and then click OK.
10. For the vTotalProduct consolidation variable, click the arrow to the right of the Child
Variable cell, select vProductTypes, and then click OK.
11. Under Component Order for vProductTypes, click By Input. The Component Element
Ordering dialog box appears.
12. Click Automatic.
The result appears as shown below:
3. Click OK.
The Server Explorer window may move to the front. Click the TurboIntegrator
window to see it.
The results appear as follows:

14. Repeat steps 11 to 13 for the vTotalProduct variable.


The results appear as follows:
Task 4. Save and execute the process

1. Click the Advanced tab.


2. Click the Prolog, Metadata, Data, and Epilog tabs.
There are four scripts that are run when executing a TI process. There is a tab
for each of them here (along with a tab to identify runtime variables) for the
given process.
It is a good practice to review each script and ensure they have been updated,
especially if you are modifying an existing process.
Clicking each tab will force the scripts on each tab to be updated and
compiled.
3. From the File menu, click Save.
4. In the Name box, type CreateProductsCSV, and then click OK.
5. Click Run .
6. Click OK when the process has completed.
7. Close TurboIntegrator.
8. In the Server Explorer window, double-click the Products dimension. The
Subset Editor opens with all the elements that were loaded from the CSV file.
You ordered your elements in the TI process. If you had not initially chosen to
order by hierarchy and elements by name, you could reorder them using the
Dimension Editor or in the Server Explorer window.
If you want to order a dimension by hierarchy after running the TI
process, in Server Explorer, right-click the dimension name, click Set
Elements Order, select Automatic, by Hierarchy, and then click OK.
Open the dimension in the Subset Editor and it should now appear
sorted by hierarchy.
9. Close the Subset Editor.
10. Leave Architect open for the upcoming exercise.

Results: You created a dimension using TurboIntegrator. You


identified the variables, mapped the data, reviewed the scripts,
executed the process, and confirmed the resulting Products dimension.
Unit summary

•Describe cubes and dimensions


•Create dimensions manually
•Edit dimensions
•Create dimensions using TurboIntegrator

You might also like