locked
Cannot change keys in my Fact Table in BIDS for Analysis Server RRS feed

  • Question

  • I have an Analysis Server project in BIDS 2012 (although is not much different from 2008 version). I have a Data View Source where the I have all Tables taken from my database and the FactTable (Measure Group) is a simple database View.

    In this FactTable I have ProductID, CountryID, DateShipping as dimension attributes and TotalPrice as measure. When I load the FactTable in my Data View Source it automatically sets ProductID and CountryID as Primary Keys (since they are keys in respectively Product and Country tables) leaving DateShipping out.

    I have a Cube correctly processing and deployed by using as dicmensions Product and Country and TotalPrice as measure.
    Now I created the Time dimension and in the Data Source View I linked the DateShipping foreign key on the FactTable on the PKDate Primary Key in the Time table. Then I added the Time dimension to the Cube.

    When I process the cube however I get an error  Errors in the OLAP storage engine: The record was skipped because the attribute key was not found. Attribute: Date of Dimension: Time".

    Since if I remove this dimension the others work correctly, I guess it has something to to with the DateShippng not set as key. How can I change that? Why when loading the Fact Table BIDS arbitrarily assign the Primary Key? What are its criteria? Thanks in advance

    Tuesday, November 12, 2013 2:44 PM

Answers

  • Hi Trinakriae,

    This issue occurs because a fact table for a cube has one or more records that contain an attribute key, and this attribute key does not exist in the corresponding dimension table. This behavior may occur when you have not processed the corresponding dimension before you process the cube or when the underlying tables actually have mismatched data.

    To avoid this issue, please correct the underlying records that contain the problematic attribute key. To do this, use one of the following methods.

    • Use an existing attribute key
    • Match the key values in the fact table

    Reference:http://support.microsoft.com/kb/922673

    Regards,


    Charlie Liao
    TechNet Community Support

    • Marked as answer by Trinakriae Wednesday, November 13, 2013 10:22 AM
    Wednesday, November 13, 2013 8:47 AM

All replies

  • Hi Trinakriae,

    This issue occurs because a fact table for a cube has one or more records that contain an attribute key, and this attribute key does not exist in the corresponding dimension table. This behavior may occur when you have not processed the corresponding dimension before you process the cube or when the underlying tables actually have mismatched data.

    To avoid this issue, please correct the underlying records that contain the problematic attribute key. To do this, use one of the following methods.

    • Use an existing attribute key
    • Match the key values in the fact table

    Reference:http://support.microsoft.com/kb/922673

    Regards,


    Charlie Liao
    TechNet Community Support

    • Marked as answer by Trinakriae Wednesday, November 13, 2013 10:22 AM
    Wednesday, November 13, 2013 8:47 AM
  • Thanks a lot! Your answer put me in the right path. Basically my Time dimension table was starting in 2006 and in my fact tabe there were records with DateShipping fields since 2001. Therefore it couldn't find the reference to the Time dimension table for dates prceding 2006, hence the error!
    Wednesday, November 13, 2013 10:25 AM