~openerp-community/openobject-doc/6.1

« back to all changes in this revision

Viewing changes to source/bi/CubeDesigner/DefiningHier.rst

  • Committer: TruongSinh Tran
  • Date: 2009-07-19 19:02:35 UTC
  • Revision ID: truongsinh@vipescoserver-20090719190235-fu3bxcrbpvwuk5h7
[FIX] build_i18n.py .. raw:: html

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Defining Hierarchy
 
2
==================
 
3
 
 
4
:ref:`Hierarchy <hierarchy-link>` is the arrangements of objects, peoples etc .. in a ranked or some series. The hierarchy are the way of arranging the dimensions. 
 
5
 
 
6
It need the fact table. 
 
7
 
 
8
Lets take the Example of Products. 
 
9
 
 
10
We want our sales cube to work on the products. Means we want to see the products sold. We have divided the products in to the category. So we will make the Product Hierarchy to display products by categories.
 
11
 
 
12
Lets see the new hierarchy. According to the dimension some values are set by default like hierarchy name and dimension.
 
13
 
 
14
.. image::  images/hier1.png
 
15
   :scale: 65
 
16
 
 
17
We now move to define the fact table for the hierarchy. Relational column will show the all fields of the sale_order_line and sale_order. As these are the fact tables for the cube. We select product_id from sale_order_line which is related to product_prodcut
 
18
 
 
19
.. image::  images/hier2.png
 
20
   :scale: 65
 
21
 
 
22
We want to get the product name and the category both. We know the product_category will give category and product_template will give the name. 
 
23
Now the list is filtered accordingly for adding the join tables
 
24
 
 
25
.. image::  images/hier3.png
 
26
   :scale: 65
 
27
 
 
28
After selecting the product_tmpl_id we move to select the category table.
 
29
 
 
30
.. image::  images/hier4.png
 
31
   :scale: 65
 
32
 
 
33
So final fact table for the Product Category will be
 
34
 
 
35
.. image::  images/hier5.png
 
36
   :scale: 65