Sign up ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I'm trying to get my cube working without getting "attribute key not found" errors, but the only way I've found to make it work, is to set up a referenced dimension from Dim_PropertyInfo to Dim_SalesInvoiceHeader (see scripts below) and leave the Materialize checkbox unchecked.

However, when I browse the cube, filter on INV001 and display the PropertyInfo attribute, it still returns all rows from Dim_PropertyInfo.

Can somebody tell me what I should be doing?

Script to create the test tables:

CREATE TABLE dbo.Dim_SalesInvoiceHeader
    SalesInvHeaderID    INTEGER         NOT NULL,
    SalesInvoiceNumber  NVARCHAR(50)    NOT NULL,
    OtherStuff          NVARCHAR(MAX)   NULL,

    CONSTRAINT PK_Dim_SalesInvoiceDetails
        PRIMARY KEY (SalesInvHeaderID),

CREATE TABLE dbo.Fact_SalesInvoices
    FactID              INTEGER NOT NULL,
    SalesInvHeaderID    INTEGER NOT NULL,
    LineItem            INTEGER NOT NULL,

    CONSTRAINT PK_Fact_SalesInvoices
        PRIMARY KEY (FactID),
    CONSTRAINT FK_Fact_SalesInvoices_Dim_SalesInvoiceHeader
        FOREIGN KEY (SalesInvHeaderID)
        REFERENCES dbo.Dim_SalesInvoiceHeader (SalesInvHeaderID),

CREATE TABLE dbo.Dim_PropertyInfo
    PropertyInfoID      INTEGER         NOT NULL,
    SalesInvHeaderID    INTEGER         NOT NULL,
    SalesInvoiceNumber  NVARCHAR(50)    NOT NULL,
    PropertyInfo        NVARCHAR(MAX)   NULL,

    CONSTRAINT PK_Dim_PropertyInfo
        PRIMARY KEY (PropertyInfoID)
    CONSTRAINT FK_Dim_PropertyInfo_Dim_SalesInvoiceHeader
        FOREIGN KEY (SalesInvHeaderID)
        REFERENCES dbo.Dim_SalesInvoiceHeader (SalesInvHeaderID)

... and the script to populate the tables:

INSERT INTO dbo.Dim_SalesInvoiceHeader
    ( SalesInvHeaderID
    , SalesInvoiceNumber
    , OtherStuff
    VALUES (1, N'INV001', N'blah')
         , (2, N'INV002', N'blahblah')
         , (3, N'INV003', N'blahblahblah')
         , (4, N'INV004', N'stuff');

INSERT INTO dbo.Fact_SalesInvoices
    ( FactID
    , SalesInvHeaderID
    , LineItem
    VALUES (1, 1, 1)
         , (2, 1, 2)
         , (3, 1, 3)
         , (4, 2, 1)
         , (5, 2, 2)
         , (6, 3, 1)
         , (7, 3, 2)
         , (8, 4, 1)
         , (9, 4, 2);

INSERT INTO dbo.Dim_PropertyInfo
    ( PropertyInfoID
    , SalesInvHeaderID
    , SalesInvoiceNumber
    , PropertyInfo
    VALUES (1, 1, N'INV001', N'stuff')
         , (2, 2, N'INV002', N'pool');
share|improve this question
What attribute do you get those errors on? – JNK May 18 '12 at 20:12
My actual cube is a bit more complex, and I just noticed that even when I have Materialize checked using the sample schema above, I can't get SSAS to throw the errors, and I can't explain what's different between the sample schema and the real one. But anyway I'm still seeing every PropertyInfo value for each invoice when I browse. – influent May 18 '12 at 21:11
I take it back, with the sample schema I can get it to throw the errors, I had data in Dim_PropertyInfo for 3 and 4 accidentally. – influent May 19 '12 at 0:08

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.