Organization dimension hierarchy

  • Hello Experts,

    I have a dimOrganization database table. And I want to create a parent child relationship on SSAS.

    Here is my table structure:

    CREATE TABLE [dbo].[DimOrganization](

    [OrganizationKey] [int] IDENTITY(1,1) NOT NULL,

    [ParentOrganizationKey] [int] NULL,

    [OrganizationName] [nvarchar](50) NULL

    ) ON [PRIMARY]

    GO

    And the dataset is like this:

    INSERT INTO DimOrganization VALUES ('','RP')

    go

    INSERT INTO DimOrganization VALUES (1,'DC')

    go

    INSERT INTO DimOrganization VALUES (2,'KAR')

    go

    INSERT INTO DimOrganization VALUES (3,'KARD')

    go

    INSERT INTO DimOrganization VALUES (3,'KARB')

    go

    INSERT INTO DimOrganization VALUES (1,'EKO')

    go

    INSERT INTO DimOrganization VALUES (6,'EKOD')

    go

    INSERT INTO DimOrganization VALUES (6,'EKOD')

    go

    My only purpose is get a result in SSAS such as:

    -->RP

    --------> DC

    -------------------->KAR

    ---------------------------->KARD

    ---------------------------->KARB

    -------------------->EKO

    ---------------------------->EKOD

    ---------------------------->EKOB

    Thanks and Regards

  • Analysis Services will automatically create the parent child dimension for you when you put the table through the wizard. You just point it to your key column and your parent key column and it does the rest for you. You can also checkout the adventureworks completed cube sample to see how they did the employee dimension.

Viewing 2 posts - 1 through 1 (of 1 total)

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