3. Dimensions in TM1
What are dimensions
In TM1 there are objects to hold data. These objects are called cubes. Dimensions in TM1 are basic building blocks of cube. So if you have an excel file which captures the grocery products’ data for different months you’ll create one cube in TM1 to keep this data. To do that you’ll create 2 dimensions 1. Products and 2. Months to create this cube.
How to create dimensions
2. Using Turbo Integrator Process
3. Using dimension work sheets
In beginner tutorial we’ll just follow the first method to create what we want.
Creating dimension with first method
Open your TM1Beginner server that we created in second tutorial. Login using Admin as ID and no password. Expand the tree to see the dimensions node.
1. What we will create
We’ll create 2 dimensions.
Products dimension will contain following elements:
Months dimension will have following hierarchy:
Let’s start to create these dimensions.
2. Insert Elements
Right click on the node and click ‘Create New Dimension’. Dimension editor will be opened for you. Go to Edit in the menu and click on Insert Element.
Doing this will open Dimension element editor. You can now write your element’s name and click on Add. This will add your element to the list of newly added (but not saved yet) elements. Write ‘Total Products’ (without quotes) in the Insert element Name box and click on Add. Notice that element type is simple. This means that this element will be of numeric type.
Click Add and then click OK. You’ll see the Total Products element in your dimension.
Now right click on Total Products and click Insert child.
Again dimension element editor will be opened and you can insert immediate children of Total Products (Soft Drinks, Chocolates and Breads) from our hierarchy. Click Ok and you’ll see them as children of Total Products. Now time to insert remaining elements.
You can even copy and paste elements from an excel file. So to test this, write all the remaining elements in an excel file. Copy them, select Total Products and paste them directly in the dimension editor. Editor will ask you where to paste the elements.
Paste Above, Paste below and Paste as Child. You should select paste below. All elements will be added to the dimension.
3. Arrange Elements
Now time to move them to their designated places. Select all three beverages (Pepsi, Cocacola, Seven Up) and drag them to the Soft Drinks element. When you do that you’ll see mouse cursor change from pointer to another pointer (as shown below)
Drop them and they will be inserted as children to that element.
Now select Chocolates (Almond Joy, Amul Chocolate, Bournville), right click on them and click Cut. Then right click on Chocolates and click ‘Paste as child’.
They will be added to the chocolates element and element’s sign (which is in front of element) will change from n to ∑ (sigma). That means the element is now of type consolidation.
Insert the remaining elements like this and you’ll have your hierarchy ready. Now you’ll notice that soft drinks are not in alphabetic order. So I need to move Cocacola above Pepsi. Just right click on cocacola and click Cut. Then right click on Pepsi and click Paste Above. The element will be inserted above Pepsi.
This is a way of moving elements in the dimension. There are many other ways of arranging dimension but we’ll discuss them in advanced tutorials.
Now click save and give name to your dimension: Products.
Click on OK and OK again. You’ll see your dimension appear under dimensions node in Architect.
Now create the months dimension the same way. Just write all elements in an excel file and copy paste from there. Then arrange them in Q1, Q2, Q3, Q4 and FY.
Now create a measure dimension that contains Quantity, Sales Price and Sales as items.