Parent Child Relationships

  • I'm setting up some new cubes and one of the dimensions is Product. This is a parent child relationhip so that I can report grouped numbers e.g. divisional numbers.

    This works well in one of the cubes and I get numbers back for each level in the hierarchy. However, for another cube I have a problem where there is matrix reporting of the products so that Product A has Group 1 as a parent but also has Group 2 as a parent. Whenever I try and process the dimension I get the error: "The dimension member key is not unique".

    Has anyone got any ideas?

  • This was removed by the editor as SPAM

  • My first guess would be that the product is located twice in the product dimension source table. Once with Group 1 and once with Group 2. Maybe you could check this (I you didn't already) before trying to process the dimension.

    If you can't find anything there check the SQL statement that the processing of the dimension fires to the source system. And view the result of the select statement, and check for doubles.

    Regards,

    Nico

  • Nico,

    Thanks for the suggestions but I actually want the product to be located twice in the product dimension as I need it to be reported into two separate groups.

    Also, how do I look at the SQL statements for processing the dimension? I'm new to this and I have a lot to learn.

    Thanks.

  • Jeremy,

    When you process a cube you normaly get a windows where he says what he's doing. (Processing dimension x, ...) One of the things you can see there is the select statement he uses to get his data. With a right mouse click on the statement you can see it in a different window.

    For your problem. I don't see a simple solution. Maybe if you gave more info on why you need the same product under different groups I could help you?

    Nico

  • Hi

    If you want to have the same product under multiple hierarchies, you could do this by having the same product description but different product ID in the dimension. To achieve this do the following:

    1). Within the star schema in SQL, you would have a dimension table holding the product records with fields similar to [product_ID], [Product_Name], and [Product_Group]. Ensure [product_ID] is setup as an identity column with a seed increment of 1.

    2). Populate the dimension table with every distinct combination of [Product_Name] and [Product_Group]. A unique id will be assigned for the combination of [product_name] and [Product_Group]. Following is a sample:

    INSERT INTO dim_Products (Product_Name, Product_Group)

    SELECT DISTINCT Product_Name, Product_Group

    FROM tbl_source_products

    3). Within Analysis Manager and the dimension Editor for the Product Dimension, Click once on the 'Product' level. Then select the Advanced Properties tab.

    4). Change the property 'Member Names Unique' to False. Save and Exit the dimension editor.

    5). Process the Product dimension.

    This should work but you will also have to ensure that the [Product_ID] values in the dimension match those in your fact table/s. You may need to setup a few scripts/DTS packages to control this.

    Andrew Keenan
    Consultant, Business Intelligence
    Technology Services
    KAZ
    E andrew.keenan@kaz-group.com

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply