Want to flatten my parent-child hierarchy into an level-based hierarchy.

Hi Expert,
Can anyone let me know how I can convert my parent-child hierarchy into an LEVEL-based hierarchy.
Thanks in Advance
S

If you have an Oracle DB have a look on the CONNECT BY PRIOR functionality.
regards
John
http://obiee101.blogspot.com

Similar Messages

  • Flattened to Parent Child Hierarchy

    Hi,
    My client has a little different requirement from normal.
    We want to convert the flattened version of hierarchy to parent child format. Does anyone have any sql script or idea how we can achieve this quickly?
    Thanks in advance.

    http://www.rittmanmead.com/2007/06/21/obiee-data-modeling-tips-3-ragged-hierarchies/
    might be helpful.

  • Dynamic hierarchy in parent child hierarchy table??

    Do you have any experience to handle the requirement of dynamic hierarchy in universe/webi?
    We have some data in parent child hierarchy as below u201CCustomeru201D table.
    Customer
    Parent          Child
    Z                  A
    Z                  B
    A                  AA
    B                  BB
    AA               AAA
    For example, Company Z is the parent company of Company A.
    Another table, Amount is the amount value of different Customers.
    Amount
    ID               Amt
    AA               10
    AAA            1
    BB                2
    Is there any functionality in Universe designer to build related Classes and objects, So that the web intelligence documents represent the following report with the drilling results?
    When we want to see the ID and Amt, the expected result should be:
    Z                13
    when we drill down Z
    the result should be:
    A                11
    B                2
    when we drill down A:
    the result should be:
    AA              11
    notes **
    the level of hierarchy is dynamic
    Any suggestion is appreciated.  Thanks.

    Hi,
    The only way to do it is to create recursive derived table that flatten you parent child hierarchy with a given maximum depth.
    Here is a sample I built a long time ago to flatten a parent-child hierarchy on Employees table in Foodmart database (SQL Server).
    Didier
    SELECT DISTINCT
         Z.employee_id,
         A.supervisor_id_1,
         A.employee_id_1,
         A.full_name_1,
         A.supervisor_id_2,
         A.employee_id_2,
         A.full_name_2,
         A.supervisor_id_3,
         A.employee_id_3,
         A.full_name_3,
         A.supervisor_id_4,
         A.employee_id_4,
         A.full_name_4,
         A.supervisor_id_5,
         A.employee_id_5,
         A.full_name_5,
         A.supervisor_id_6,
         A.employee_id_6,
         A.full_name_6,
         Z.supervisor_id AS supervisor_id_7,
         Z.employee_id AS employee_id_7,
         Z.full_name AS full_name_7
    FROM employee Z,
         SELECT DISTINCT
              A.supervisor_id_1,
              A.employee_id_1,
              A.full_name_1,
              A.supervisor_id_2,
              A.employee_id_2,
              A.full_name_2,
              A.supervisor_id_3,
              A.employee_id_3,
              A.full_name_3,
              A.supervisor_id_4,
              A.employee_id_4,
              A.full_name_4,
              A.supervisor_id_5,
              A.employee_id_5,
              A.full_name_5,
              Z.supervisor_id AS supervisor_id_6,
              Z.employee_id AS employee_id_6,
              Z.full_name AS full_name_6
         FROM employee Z,
              SELECT DISTINCT
                   A.supervisor_id_1,
                   A.employee_id_1,
                   A.full_name_1,
                   A.supervisor_id_2,
                   A.employee_id_2,
                   A.full_name_2,
                   A.supervisor_id_3,
                   A.employee_id_3,
                   A.full_name_3,
                   A.supervisor_id_4,
                   A.employee_id_4,
                   A.full_name_4,
                   Z.supervisor_id AS supervisor_id_5,
                   Z.employee_id AS employee_id_5,
                   Z.full_name AS full_name_5
              FROM employee Z,
                   SELECT DISTINCT
                        A.supervisor_id_1,
                        A.employee_id_1,
                        A.full_name_1,
                        A.supervisor_id_2,
                        A.employee_id_2,
                        A.full_name_2,
                        A.supervisor_id_3,
                        A.employee_id_3,
                        A.full_name_3,
                        Z.supervisor_id AS supervisor_id_4,
                        Z.employee_id AS employee_id_4,
                        Z.full_name AS full_name_4
                   FROM employee Z,
                        SELECT DISTINCT
                             A.supervisor_id_1,
                             A.employee_id_1,
                             A.full_name_1,
                             A.supervisor_id_2,
                             A.employee_id_2,
                             A.full_name_2,
                             Z.supervisor_id AS supervisor_id_3,
                             Z.employee_id AS employee_id_3,
                             Z.full_name AS full_name_3
                        FROM employee Z,
                             SELECT DISTINCT
                                  A.supervisor_id_1,
                                  A.employee_id_1,
                                  A.full_name_1,
                                  Z.supervisor_id AS supervisor_id_2,
                                  Z.employee_id AS employee_id_2,
                                  Z.full_name AS full_name_2
                             FROM employee Z,
                                  SELECT DISTINCT
                                       supervisor_id AS supervisor_id_1,
                                       employee_id AS employee_id_1,
                                       full_name AS full_name_1
                                   FROM employee
                                   WHERE supervisor_id = 0 OR supervisor_id IS NULL
                             ) A
                             WHERE A.employee_id_1 = Z.supervisor_id
                        ) A
                        WHERE A.employee_id_2 = Z.supervisor_id
                   ) A
                   WHERE A.employee_id_3 = Z.supervisor_id
              ) A
              WHERE A.employee_id_4 = Z.supervisor_id
         ) A
         WHERE A.employee_id_5 = Z.supervisor_id
    ) A
    WHERE A.employee_id_6 = Z.supervisor_id
    UNION
    SELECT DISTINCT
         A.employee_id_6 AS employee_id,
         A.supervisor_id_1,
         A.employee_id_1,
         A.full_name_1,
         A.supervisor_id_2,
         A.employee_id_2,
         A.full_name_2,
         A.supervisor_id_3,
         A.employee_id_3,
         A.full_name_3,
         A.supervisor_id_4,
         A.employee_id_4,
         A.full_name_4,
         A.supervisor_id_5,
         A.employee_id_5,
         A.full_name_5,
         A.supervisor_id_6,
         A.employee_id_6,
         A.full_name_6,
         NULL AS supervisor_id_7,
         NULL AS employee_id_7,
         NULL AS full_name_7
    FROM employee Z,
         SELECT DISTINCT
              A.supervisor_id_1,
              A.employee_id_1,
              A.full_name_1,
              A.supervisor_id_2,
              A.employee_id_2,
              A.full_name_2,
              A.supervisor_id_3,
              A.employee_id_3,
              A.full_name_3,
              A.supervisor_id_4,
              A.employee_id_4,
              A.full_name_4,
              A.supervisor_id_5,
              A.employee_id_5,
              A.full_name_5,
              Z.supervisor_id AS supervisor_id_6,
              Z.employee_id AS employee_id_6,
              Z.full_name AS full_name_6
         FROM employee Z,
              SELECT DISTINCT
                   A.supervisor_id_1,
                   A.employee_id_1,
                   A.full_name_1,
                   A.supervisor_id_2,
                   A.employee_id_2,
                   A.full_name_2,
                   A.supervisor_id_3,
                   A.employee_id_3,
                   A.full_name_3,
                   A.supervisor_id_4,
                   A.employee_id_4,
                   A.full_name_4,
                   Z.supervisor_id AS supervisor_id_5,
                   Z.employee_id AS employee_id_5,
                   Z.full_name AS full_name_5
              FROM employee Z,
                   SELECT DISTINCT
                        A.supervisor_id_1,
                        A.employee_id_1,
                        A.full_name_1,
                        A.supervisor_id_2,
                        A.employee_id_2,
                        A.full_name_2,
                        A.supervisor_id_3,
                        A.employee_id_3,
                        A.full_name_3,
                        Z.supervisor_id AS supervisor_id_4,
                        Z.employee_id AS employee_id_4,
                        Z.full_name AS full_name_4
                   FROM employee Z,
                        SELECT DISTINCT
                             A.supervisor_id_1,
                             A.employee_id_1,
                             A.full_name_1,
                             A.supervisor_id_2,
                             A.employee_id_2,
                             A.full_name_2,
                             Z.supervisor_id AS supervisor_id_3,
                             Z.employee_id AS employee_id_3,
                             Z.full_name AS full_name_3
                        FROM employee Z,
                             SELECT DISTINCT
                                  A.supervisor_id_1,
                                  A.employee_id_1,
                                  A.full_name_1,
                                  Z.supervisor_id AS supervisor_id_2,
                                  Z.employee_id AS employee_id_2,
                                  Z.full_name AS full_name_2
                             FROM employee Z,
                                  SELECT DISTINCT
                                       supervisor_id AS supervisor_id_1,
                                       employee_id AS employee_id_1,
                                       full_name AS full_name_1
                                   FROM employee
                                   WHERE supervisor_id = 0 OR supervisor_id IS NULL
                             ) A
                             WHERE A.employee_id_1 = Z.supervisor_id
                        ) A
                        WHERE A.employee_id_2 = Z.supervisor_id
                   ) A
                   WHERE A.employee_id_3 = Z.supervisor_id
              ) A
              WHERE A.employee_id_4 = Z.supervisor_id
         ) A
         WHERE A.employee_id_5 = Z.supervisor_id
    ) A
    UNION
    SELECT DISTINCT
         A.employee_id_5 AS employee_id,
         A.supervisor_id_1,
         A.employee_id_1,
         A.full_name_1,
         A.supervisor_id_2,
         A.employee_id_2,
         A.full_name_2,
         A.supervisor_id_3,
         A.employee_id_3,
         A.full_name_3,
         A.supervisor_id_4,
         A.employee_id_4,
         A.full_name_4,
         A.supervisor_id_5,
         A.employee_id_5,
         A.full_name_5,
         NULL AS supervisor_id_6,
         NULL AS employee_id_6,
         NULL AS full_name_6,
         NULL AS supervisor_id_7,
         NULL AS employee_id_7,
         NULL AS full_name_7
    FROM employee Z,
         SELECT DISTINCT
              A.supervisor_id_1,
              A.employee_id_1,
              A.full_name_1,
              A.supervisor_id_2,
              A.employee_id_2,
              A.full_name_2,
              A.supervisor_id_3,
              A.employee_id_3,
              A.full_name_3,
              A.supervisor_id_4,
              A.employee_id_4,
              A.full_name_4,
              Z.supervisor_id AS supervisor_id_5,
              Z.employee_id AS employee_id_5,
              Z.full_name AS full_name_5
         FROM employee Z,
              SELECT DISTINCT
                   A.supervisor_id_1,
                   A.employee_id_1,
                   A.full_name_1,
                   A.supervisor_id_2,
                   A.employee_id_2,
                   A.full_name_2,
                   A.supervisor_id_3,
                   A.employee_id_3,
                   A.full_name_3,
                   Z.supervisor_id AS supervisor_id_4,
                   Z.employee_id AS employee_id_4,
                   Z.full_name AS full_name_4
              FROM employee Z,
                   SELECT DISTINCT
                        A.supervisor_id_1,
                        A.employee_id_1,
                        A.full_name_1,
                        A.supervisor_id_2,
                        A.employee_id_2,
                        A.full_name_2,
                        Z.supervisor_id AS supervisor_id_3,
                        Z.employee_id AS employee_id_3,
                        Z.full_name AS full_name_3
                   FROM employee Z,
                        SELECT DISTINCT
                             A.supervisor_id_1,
                             A.employee_id_1,
                             A.full_name_1,
                             Z.supervisor_id AS supervisor_id_2,
                             Z.employee_id AS employee_id_2,
                             Z.full_name AS full_name_2
                        FROM employee Z,
                             SELECT DISTINCT
                                  supervisor_id AS supervisor_id_1,
                                  employee_id AS employee_id_1,
                                  full_name AS full_name_1
                              FROM employee
                              WHERE supervisor_id = 0 OR supervisor_id IS NULL
                        ) A
                        WHERE A.employee_id_1 = Z.supervisor_id
                   ) A
                   WHERE A.employee_id_2 = Z.supervisor_id
              ) A
              WHERE A.employee_id_3 = Z.supervisor_id
         ) A
         WHERE A.employee_id_4 = Z.supervisor_id
    ) A
    UNION
    SELECT DISTINCT
         A.employee_id_4 AS employee_id,
         A.supervisor_id_1,
         A.employee_id_1,
         A.full_name_1,
         A.supervisor_id_2,
         A.employee_id_2,
         A.full_name_2,
         A.supervisor_id_3,
         A.employee_id_3,
         A.full_name_3,
         A.supervisor_id_4,
         A.employee_id_4,
         A.full_name_4,
         NULL AS supervisor_id_5,
         NULL AS employee_id_5,
         NULL AS full_name_5,
         NULL AS supervisor_id_6,
         NULL AS employee_id_6,
         NULL AS full_name_6,
         NULL AS supervisor_id_7,
         NULL AS employee_id_7,
         NULL AS full_name_7
    FROM employee Z,
         SELECT DISTINCT
              A.supervisor_id_1,
              A.employee_id_1,
              A.full_name_1,
              A.supervisor_id_2,
              A.employee_id_2,
              A.full_name_2,
              A.supervisor_id_3,
              A.employee_id_3,
              A.full_name_3,
              Z.supervisor_id AS supervisor_id_4,
              Z.employee_id AS employee_id_4,
              Z.full_name AS full_name_4
         FROM employee Z,
              SELECT DISTINCT
                   A.supervisor_id_1,
                   A.employee_id_1,
                   A.full_name_1,
                   A.supervisor_id_2,
                   A.employee_id_2,
                   A.full_name_2,
                   Z.supervisor_id AS supervisor_id_3,
                   Z.employee_id AS employee_id_3,
                   Z.full_name AS full_name_3
              FROM employee Z,
                   SELECT DISTINCT
                        A.supervisor_id_1,
                        A.employee_id_1,
                        A.full_name_1,
                        Z.supervisor_id AS supervisor_id_2,
                        Z.employee_id AS employee_id_2,
                        Z.full_name AS full_name_2
                   FROM employee Z,
                        SELECT DISTINCT
                             supervisor_id AS supervisor_id_1,
                             employee_id AS employee_id_1,
                             full_name AS full_name_1
                         FROM employee
                         WHERE supervisor_id = 0 OR supervisor_id IS NULL
                   ) A
                   WHERE A.employee_id_1 = Z.supervisor_id
              ) A
              WHERE A.employee_id_2 = Z.supervisor_id
         ) A
         WHERE A.employee_id_3 = Z.supervisor_id
    ) A
    UNION
    SELECT DISTINCT
         A.employee_id_3 AS employee_id,
         A.supervisor_id_1,
         A.employee_id_1,
         A.full_name_1,
         A.supervisor_id_2,
         A.employee_id_2,
         A.full_name_2,
         A.supervisor_id_3,
         A.employee_id_3,
         A.full_name_3,
         NULL AS supervisor_id_4,
         NULL AS employee_id_4,
         NULL AS full_name_4,
         NULL AS supervisor_id_5,
         NULL AS employee_id_5,
         NULL AS full_name_5,
         NULL AS supervisor_id_6,
         NULL AS employee_id_6,
         NULL AS full_name_6,
         NULL AS supervisor_id_7,
         NULL AS employee_id_7,
         NULL AS full_name_7
    FROM employee Z,
         SELECT DISTINCT
              A.supervisor_id_1,
              A.employee_id_1,
              A.full_name_1,
              A.supervisor_id_2,
              A.employee_id_2,
              A.full_name_2,
              Z.supervisor_id AS supervisor_id_3,
              Z.employee_id AS employee_id_3,
              Z.full_name AS full_name_3
         FROM employee Z,
              SELECT DISTINCT
                   A.supervisor_id_1,
                   A.employee_id_1,
                   A.full_name_1,
                   Z.supervisor_id AS supervisor_id_2,
                   Z.employee_id AS employee_id_2,
                   Z.full_name AS full_name_2
              FROM employee Z,
                   SELECT DISTINCT
                        supervisor_id AS supervisor_id_1,
                        employee_id AS employee_id_1,
                        full_name AS full_name_1
                    FROM employee
                    WHERE supervisor_id = 0 OR supervisor_id IS NULL
              ) A
              WHERE A.employee_id_1 = Z.supervisor_id
         ) A
         WHERE A.employee_id_2 = Z.supervisor_id
    ) A
    UNION
    SELECT DISTINCT
         A.employee_id_2 AS employee_id,
         A.supervisor_id_1,
         A.employee_id_1,
         A.full_name_1,
         A.supervisor_id_2,
         A.employee_id_2,
         A.full_name_2,
         NULL AS supervisor_id_3,
         NULL AS employee_id_3,
         NULL AS full_name_3,
         NULL AS supervisor_id_4,
         NULL AS employee_id_4,
         NULL AS full_name_4,
         NULL AS supervisor_id_5,
         NULL AS employee_id_5,
         NULL AS full_name_5,
         NULL AS supervisor_id_6,
         NULL AS employee_id_6,
         NULL AS full_name_6,
         NULL AS supervisor_id_7,
         NULL AS employee_id_7,
         NULL AS full_name_7
    FROM employee Z,
         SELECT DISTINCT
              A.supervisor_id_1,
              A.employee_id_1,
              A.full_name_1,
              Z.supervisor_id AS supervisor_id_2,
              Z.employee_id AS employee_id_2,
              Z.full_name AS full_name_2
         FROM employee Z,
              SELECT DISTINCT
                   supervisor_id AS supervisor_id_1,
                   employee_id AS employee_id_1,
                   full_name AS full_name_1
               FROM employee
               WHERE supervisor_id = 0 OR supervisor_id IS NULL
         ) A
         WHERE A.employee_id_1 = Z.supervisor_id
    ) A
    UNION
    SELECT DISTINCT
         A.employee_id_1 AS employee_id,
         A.supervisor_id_1,
         A.employee_id_1,
         A.full_name_1,
         NULL AS supervisor_id_2,
         NULL AS employee_id_2,
         NULL AS full_name_2,
         NULL AS supervisor_id_3,
         NULL AS employee_id_3,
         NULL AS full_name_3,
         NULL AS supervisor_id_4,
         NULL AS employee_id_4,
         NULL AS full_name_4,
         NULL AS supervisor_id_5,
         NULL AS employee_id_5,
         NULL AS full_name_5,
         NULL AS supervisor_id_6,
         NULL AS employee_id_6,
         NULL AS full_name_6,
         NULL AS supervisor_id_7,
         NULL AS employee_id_7,
         NULL AS full_name_7
    FROM employee Z,
         SELECT DISTINCT
              supervisor_id AS supervisor_id_1,
              employee_id AS employee_id_1,
              full_name AS full_name_1
          FROM employee
          WHERE supervisor_id = 0 OR supervisor_id IS NULL
    ) A

  • Parent child Hierarchy in OBIEE 10G

    Hi,
    I want to implement the parent child hierarchy in OBIEE 10g where I need to show people working under manager directly and indirectly.
    Please let me know as users doesn't want to drill the report but by selecting the option from the drop down Direct/Indirect they should see the results.
    Thanks

    I guess it will update when the structure changes,Let see the response from other gurus.
    Thanks,

  • Parent Child Hierarchy Issue in OBIEE 11g

    Hi All,
    I am in OBIEE 11G v6. I have a sales fact table where the grain is one sale. So I have one row for every sale done.
    Now I have a ragged employee hierarchy like this with David at the root node.
    David >>Richard>>Sean
    David >>James
    Also, I have a role dimension which gives me what role each employee has performed on a sale. Only one employee can be associated with one sale. This is the way Roles have been asssigned
    David = Manager
    Richard = Off1
    Sean = Off2
    James = Off2
    Both Sean and James can have same Roles. Now I have created a parent child hierarchy for my employee dimension and the closure table. Defined the member key, ancestor key relationship in the parent child setting etc.
    Now in the report when I pull the parent child hierarchy and the sales_amount in the report, it comes out perfect with all the ragged hierarchy resolved. But the issue comes when I try to limit the report on Role = Off2. It gives me an error saying " The layout of this view combined with the data, selection , drills resulted in no data. Undo drill and view prompt values". Basically what i want is to be able to select any role type and then my hierarchy should be adjusted to show me that data. Like when I select Off2, I want to see David at the Top level and Sean and James under him because they are both Off 2 and David is their manager.
    Is that possbile? Also, am I getting this error because when I select Off2 though it gets Sean and James but since David is not Off2, I don't get the data?
    I hope I was able to explain the issue, any help on this would be greatly appreciated.
    Thanks
    Ronny

    So basically this means that if I build a parent child hierarchy on table A having the stucture like
    --David (Manager)
    -----James (Off1)
    --------Bill (Off2)
    and in my sales fact table for let's say today, I have only rows for Bill (Off2) because he is the only officer who did the sales today. Now when I will join my fact table to parent child hierarchy table A I will NOT get any data ? because there is no James who is the parent of Bill. So obiee need to have parent pulled off in the data (ANCESTOR) to be able to roll up the child.(IS_LEAF = 1)
    I testes this and if my data only contains only rows for Bill (or I limit on ROLE = Off2) then it won't show the hierarchy. The query which OBIEE fires is to look for either ANCESTOR_KEY = NULL OR (DISTANCE = 1 AND ANCESTOR KEY IN (Bill). Therefore it doesn't I am wondering then what is the use of builiding the parent child hierarchy when we need to pull in all the ancestors (like in this case James for bill and David for james) because in real scenarios there can be cases wherein we would want to filter the data based on other dimensions to which the parent child hierarchy joins ?

  • Parent-Child Hierarchy Show No Data

    Hi:
    OBIEE 11.1.1.6.5
    I created a parent-child hierarchy following multiple examples in books and on the web. I can pull the presentation hierarchy--by itself--into a view and drill up and down. But when I add a measurement from the fact table, I receive a no data found error. I copied the SQL into SQL*Developer and ran it, and it too returned no data. I've tried to read and debug the query in SQL*Developer, but I don't understand what it is doing.
    The dimension table I am using for the parent-child hierarchy has a cost_Center_id and parent_cost_center_id. I used the Parent-Child dimension wizard to create and populate the new hierarchy table.
    I can create a view by using the cost_center item and a fact table measurement without the presentation hierarchy, so it has something to do with the presentation hierarchy.
    I've been at this for a few days now, and I've run out of ideas. Can anyone suggest what I may have done wrong?
    Thanks.

    check if there is data in the fact table.. Next check also if the join condition between the dimension and fact is valid.

  • Parent Child Hierarchy

    I am new learner for using OBIEE 11g, when I try to create the Parent_Child_Hierarchy in the repository, BI answer in the web shows the errors:
    "State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 38107] *Not all four columns are defined for closure table 'Parent_Chile_Table_Closure'*. (HY000)".
    According to the help web "http://www.adivaconsulting.com/adiva-blog/item/22-obiee-11g-hierarchical-table.html", I have created the relational Parent-Child-Hierarchy table in the database that is imported into the physical layer, and finish every steps, but when I drag the hierarchy in the presentation layer into display scope, which shows the errors mentioned above.
    If you known the method for solving it,please help me and share your idea, thanks!

    Hey,
    I am also facing the same issue when i try to replicate this practice. (Create Logical Dimensions with Parent Child Hierarchies -- http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bi11115/biadmin11g_02/biadmin11g.htm#t9s3)
    Odbc driver returned an error (SQLExecDirectW).
    Error Details
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 43119] Query Failed: [nQSError: 22056] To use hierarchical functions, you need to associate a Closure Table with Logical Table Source 'LTS1 Sales Rep'. (HY000)
    SQL Issued: SET VARIABLE PREFERRED_CURRENCY='USD';SELECT 0 s_0, "Y - Sample Sales"."Sales Reps"."Sales Rep Name" s_1, CASE WHEN ISLEAF("Y - Sample Sales"."Sales Reps"."H5 Sales Rep DimHier") THEN 1 ELSE 0 END s_2, IDOF("Y - Sample Sales"."Sales Reps"."H5 Sales Rep DimHier") s_3, PARENT("Y - Sample Sales"."Sales Reps"."H5 Sales Rep DimHier") s_4 FROM "Y - Sample Sales" WHERE ISROOT("Y - Sample Sales"."Sales Reps"."H5 Sales Rep DimHier")

  • OBIEE 11g Parent Child hierarchy

    Hi,
    I'm trying to setup a parent-child hierarchy dimension. I have setup a new hierarchy dimension using numeric keys but want to display another field in the hierarchical column on a report e.g. employee fullname & not the member_key based on a numeric value. Can this be done & how do you do it? All the examples I have seen use varchar2 type columns as the keys to do this.
    Thanks in advance, Phil
    My Setup
    =============
    Dimension - logical level
    ===============
    member key = employee_id
    parent-child table source
    ===============
    member key = employee_id
    parent key = supervisor_id
    relationship distance = levels_removed
    leaf node identifier = isleaf
    Employee logical folder
    ==============
    employee_id ( number)- primary key
    full_name (varchar2) - unique key
    supervisor_id ( number)
    Closure table
    =========
    employee_id ( number)
    supervisor_id ( number)
    level ( number)
    isleaf ( number)

    Thanks for the link Suresh but the aggregations are working correctly.
    My problem is only at the display level. I need to create a dashboard that displays the complete hierarchy.
    So for example if I have this hierarchy:
    - Steven King
    - Adam Frip
    Alexis Bull
    Anthony Cabrio
    Alberto Erraruriz
    Den Raphaely
    I want the dashboard to display immediately that complete hierarchy. If someone adds a member to the hierarchy in the database, the dashboard should display this new member without having to manually modify the dashboard.
    - Steven King
    - Adam Frip
    Alexis Bull
    Anthony Cabrio
    - Alberto Erraruriz
    Mozhe Atkinson
    Den Raphaely
    Also, if I just manually open the hierarchy and save the dashboard, if "Steven King" is replaced by "Shanta Vollman", the dashboard doesn't like it and returns a result looking like:
    - Adam Frip
    Alexis Bull
    Anthony Cabrio
    - Alberto Erraruriz
    Mozhe Atkinson
    Den Raphaely
    + Shanta Vollman
    So I'm looking for some option that will tell OBIEE to open the hierarchy without having to specify "Drill down on member "Steven King"", "Drill down on member "Adam Frip"...
    I hope I'm explaining correctly...

  • Script populate parent-child hierarchy not running

    Hallo guys
    I have problem when running script populate Parent-Child Relationship Table.
    Here is the script.I don't even change the script.just run it in PL/SQL
    declare
    v_max_depth integer;
    v_stmt varchar2(32000);
    i integer;
    begin
    select max(level) into v_max_depth
    from V_D_BRANCH
    connect by prior BRANCH_KEY=PARENT_BRANCH_KEY
    start with PARENT_BRANCH_KEY is null;
    v_stmt := 'insert into DM_ANALYTICS.BRANCH_HIERARCHY (MEMBER_KEY, ANCESTOR_KEY, DISTANCE, IS_LEAF)
                select BRANCH_KEY as member_key, null, null, 0 from V_D_BRANCH where PARENT_BRANCH_KEY is null
                union all
                select  member_key,
                replace(replace(ancestor_key,''\p'', ''|''), ''\'', ''\'') as ancestor_key,
                case when depth is null then 0
                else max(depth) over (partition by member_key) - depth + 1
                end as distance, is_leaf
    from
    select member_key,depth,
    case     when depth is null then '' || member_key
    when instr(hier_path, ''|'', 1, depth + 1) = 0 then null
       else substr(hier_path, instr(hier_path, ''|'', 1, depth) + 1, instr(hier_path, ''|'', 1, depth + 1) - instr(hier_path, ''|'', 1, depth) - 1)
    end ancestor_key,
    is_leaf
    from
        (    select BRANCH_KEY as member_key, PARENT_BRANCH_KEY as ancestor_key, sys_connect_by_path(replace(replace(BRANCH_KEY, ''\'', ''\''), ''|'', ''\p''), ''|'') as hier_path,
          case when BRANCH_KEY in (select PARENT_BRANCH_KEY from V_D_BRANCH ) then 0 else 1 end as IS_LEAF
    from V_D_BRANCH 
    connect by prior BRANCH_KEY = PARENT_BRANCH_KEY
    start with PARENT_BRANCH_KEY is null
      ( select null as depth from dual;
    for i in 1..v_max_depth - 1 loop
    v_stmt := v_stmt || union all select '' || i || '' from dual;
    end loop;
    v_stmt := v_stmt || ) )
    where ancestor_key is not null;
    execute immediate v_stmt;
    end;
    but I got errors like following:
    Error report -
    ORA-06550: line 19, column 12:
    PLS-00103: Encountered the symbol "insert into DM_ANALYTICS.BRANCH_HIERARCHY (MEMBER_KEY, ANCESTOR_" when expecting one of the following:
       ( - + case mod new not null <an identifier>
       <a double-quoted delimited-identifier> <a bind variable>
       continue avg count current exists max min prior sql stddev
       sum variance execute forall merge time timestamp interval
       date <a string literal with character set specification>
       <a number> <a single-quoted SQL string> pipe
       <an alternatively-quoted string
    06550. 00000 -  "line %s, column %s:\n%s"
    *Cause:    Usually a PL/SQL compilation error.
    *Action:
    what should I do guys?any idea,any solution would be appreciated.thanks alot guys

    956850 wrote:
    hi,
    i tried making "Dimension with Parent-Child Hierarchy" as described in your tutorials.
    i finished with the admin tool and database changes and with no errors.
    when trying to create a new answer, by only puting the hierarchy column in the answer.
    the result show "no result" exist.
    i am not sure what i am doing wrong. maybe you can point me to the problem?
    thanks
    Mirit.Hi Mirit,
    What is the table that you created hierarchy on?
    Which column in the hierarchy you pulled into your reports to see the No Result message?
    Please query the table and see if has data.
    Thanks,
    G. SK

  • Parent Child Hierarchy in OBIEE 11G

    Hi All,
    I am working on the parent child hierarchy in OBIEE 11g Source ESSBASE ..followed some of the blogs.
    http://www.rittmanmead.com/2010/07/obiee-11gr1-enhancements-to-essbase-support/
    I followed the following steps.
    1.Imported the Cubes from ESSBASE.
    2.Selected Accounts Hirearchy and changed the Hierarchy type to Value.
    3.Dragged the subject area to BMM and to Presentation.
    4.Now when i checked the Account Hierarchy from in the dashboard its not drilling down.
    If i change the Hierarchy type to Unbalanced ...then the Account hiearchy is working fine.
    Is there is any settings or process i have to follow..inorder to implement the Value based Hierarchy in OBIEE 11G source ESSBASE.
    Thanks

    So basically this means that if I build a parent child hierarchy on table A having the stucture like
    --David (Manager)
    -----James (Off1)
    --------Bill (Off2)
    and in my sales fact table for let's say today, I have only rows for Bill (Off2) because he is the only officer who did the sales today. Now when I will join my fact table to parent child hierarchy table A I will NOT get any data ? because there is no James who is the parent of Bill. So obiee need to have parent pulled off in the data (ANCESTOR) to be able to roll up the child.(IS_LEAF = 1)
    I testes this and if my data only contains only rows for Bill (or I limit on ROLE = Off2) then it won't show the hierarchy. The query which OBIEE fires is to look for either ANCESTOR_KEY = NULL OR (DISTANCE = 1 AND ANCESTOR KEY IN (Bill). Therefore it doesn't I am wondering then what is the use of builiding the parent child hierarchy when we need to pull in all the ancestors (like in this case James for bill and David for james) because in real scenarios there can be cases wherein we would want to filter the data based on other dimensions to which the parent child hierarchy joins ?

  • Empty parent-child hierarchy if a date attribute is "1800-01-01 00:00:00.000"!

    I have an Employees dimension that contains a parent-child hierarchy as the supervisor->employees (Org. chart. starts from the CEO to the lowest level of employees). The hierarchy is built on a relation between the employee_id (as the primary and
    surrogate key) and supervisor_id (as a foreign key). There are many other attributes in this dimension one of them is the Termination_Date. The value for Termination_Date for the current employees in the source
    system is "1800-01-01 00:00:00.000" (which is also the default value). The weird thing is that keeping this value in the employee dimension will cause the previously mentioned parent-child hierarchy to show nothing! if I change it to any other
    value or NULL, the hierarchy works fine and shows the expected tree of employees!
    I can change "1800-01-01 00:00:00.000"  to Null in the ETL stage and solve the problem, but I want really to know what causes this ?  why ?!

    I have an Employees dimension that contains a parent-child hierarchy as the supervisor->employees (Org. chart. starts from the CEO to the lowest level of employees). The hierarchy is built on a relation between the employee_id (as the primary and
    surrogate key) and supervisor_id (as a foreign key). There are many other attributes in this dimension one of them is the Termination_Date. The value for Termination_Date for the current employees in the source
    system is "1800-01-01 00:00:00.000" (which is also the default value). The weird thing is that keeping this value in the employee dimension will cause the previously mentioned parent-child hierarchy to show nothing! if I change it to any other
    value or NULL, the hierarchy works fine and shows the expected tree of employees!
    I can change "1800-01-01 00:00:00.000"  to Null in the ETL stage and solve the problem, but I want really to know what causes this ?  why ?!

  • Parent Child Hierarchy - Display other dimension fields against parent

    Hi,
    I have a Dimension for Customer with a parent child hierarchy.  The problem I have is with additional fields within the dimension.  See data below:
    Row Labels
    Customer Group   Description
    Value
    500116 - OOO "Starline"
    30
       500116 - OOO "Starline"
    A - Dealer
    5
       818781 - OKNO
    Direct / End User
    10
       400464 - OKNO TV
    Other
    15
    500123 - VIDAU SYSTEMS
    300
      500123 - VIDAU SYSTEMS
    A - Dealer
    100
      400396 - VIDAU SYSTEMS
    Other
    200
    Grand   Total
    330
    I want the Customer Group to show "A - Dealer" for the parent of the first row (against "500116 - OOO "Starline"), but its shown blank.  Also, I would like other fields to do the same.  As the parent relates to a row in
    my dimension table, this should be possible?
    Thanks in advance,
    Dominic

    Hi,
    Sorry it took me a while to come back to this.
    My dimension has the following columns:
    ID
    Customer
    Customer Group
    Parent
    1
    500116
    A - Dealer
    NULL
    2
    818781
    Direct / End User
    1
    2
    400464
    Other
    1
    My measure has 3 rows:
    customerKey
    value
    1
    5
    2
    10
    3
    15
    So when this is presented in the cube, the 3 items with values are correctly presented but my problem is that the "Customer Group" doesnt show against record 1 (the parent).  In usual circumstances my users will not expand the hierarchy, i
    just want the associated row value shown.
    Does this make more sense?  I hope so, and i hope somebody can help me resolve it.
    Thanks,
    Dom

  • Hide parents in a parent-child hierarchy with dynamic rights

    Hi all,
    I'm facing the following issue with dynamic rights on a parent-child hierarchy:
    scenario:
    - a cube with a company parent-child hierarcy
    - dynamic security on through a role on dimension data based on a list with user (login names) and their
    departments, with Enable
    Visual Total is switched ON 
    - Multiple facts connected to this hierarchy.
    When a user connects to the cube (in this case with Excel or through a dashboard in Performance Point services) he/she is allowed to see the facts belonging to theirs departments and all child departments, so far so good. But the totals of the facts are
    repeated for all higher parents. Now i know thats nog 'wrong' but our users think thats very confusing in some cases, so is there a way
    - to hide the parents in the hierarhcy
    - or to set all the parent measures to null/empty?
    I prefer to make a solution in the cube so that all client programs can benefit from this solution.
    thanx in advance for all input!

     so that User A have scope: [Dimension_Name].[Attribute XYZ] and User B: [Dimension_Name].[Attribute ABC] ?
    Hi Wilfred,
    If I understanding correctly, you want different user can see different dimension attributes based on the different right on role, right? 
    Based on my research, it seems that there is no a directly way to achieve this requirement. What we can do is that "Deselect all members" for each attribute of the dimension in Dimension Data tab, which will hide all members of the dimension for the role.
    Even the dimension metadata is visible in the cube in clients, its members can't be seen. Here are some useful links for your reference.
    http://saysmymind.wordpress.com/2013/01/15/hide-a-specific-attribute-hierarchy-in-role-playing-dimension-ssas-multidimensional/
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/e2596eec-7c2d-48c0-8e81-538a8c632360/hide-dimension-based-on-roles
    Hope this helps.
    Regards,
    Charlie Liao
    TechNet Community Support

  • Parent-child hierarchy - Values not showing

    Hi all,
    I've created an Account Dimension based on the account dimension in Adventure Works Cube.
    What I need to know is how to show account's values when I drag the Account Number to the grid. When I drag the Accounts chart to the grid, all the accounts are shown and their values are shown as well, but when I drag only the Account Number to the grid
    only the leaves' accounts are shown. Any ideas?
    Rafael Fontana

    Hi Rafael,
    According to your description, you created a Parent-child hierarchy using account dimension in Adventure Works Cube, and now you want to query out the members on that dimension, right? If in this case, here is a blog which give out some sample query about
    how to query dimension members, please see:
    Querying dimension members in MDX
    If I have anything misunderstood, please point it out and elaborate your issue, so that we can make further analysis.
    Regards,
    Charlie Liao
    TechNet Community Support

  • Excluding Datamember from Update in Parent-Child hierarchy

    Hello,
    I have a Parent-Child hierarchy and writeback enabled measures.
    If I make an equal allocation update on a parent element, its datamember gets the same amount as the leaf elements.
    How can I override this feature (scope and cell calulation for datamembers would not do...)?
    I mean: if I have 4 leaf members and I write on the parent element I want to see 250 on leaves - and null on DataMember -, instead of 200 on each elements (including datamember).
    I would not convert the Parent-Child to normalized hierarchy if I have any chance to switch off the datamembers.
    Thank you for your answers in advance!
    Br,
    Peter

    Hi Peter,
    Thank you for your question. 
    I am trying to involve someone more familiar with this topic for a further look at this issue. Sometime delay might be expected from the job transferring. Your patience is greatly appreciated. 
    Thank you for your understanding and support.
    Regards,
    Charlie Liao
    TechNet Community Support

Maybe you are looking for

  • AuthorWare stops responding when loading a mpg file

    I have a new Dell T3500 with Windows XP (32-bit). Other people in the office are able to load .mpg files into their AuthorWare project but every time I try, Authorware stops responding. I am using AuthorWare 7.02. If I change the file extensions to .

  • Can iPod minis play movies- and can you put pictures on them?

    Hi everyone, I updated my ipod recently and I was wondering if i can download pictures and movies on my ipod mini. I tried cheking on the official site for info on the mini but there wasn't anything. Also in the movies section they didn't mention if

  • Photoshop elements 9 will load on my mac but won't open the Edit portion

    Adobe Photoshop Elements 9 Mac os 10.6.8 E9 loaded on my mac fine the first time (about 1 year ago) but recently it refused to open the edit feature. I was advised that file were missing from the application. I did an uninstall and reloaded the mac d

  • Template update moves ap div

    please can anyone help. i have made a site using a template that includes an editable region in which i put app div's on the individual pages, it looks geat! until i make any changes to the template all the ap div's move to the top of the page. not s

  • Satellite L505D-S598​3 - CD/DVD-ROM issue

    Hello. I have a Windows 7 Home Edition laptop that will not boot from the CD-DVD-ROM drive. Under normal circumstances, I know that if the boot order is right, the computer should automatically boot from the CD. However, it instead refuses to acknowl