title: Referential Integrity error with dimension processing for cube
body: <p>One of our production cube failed with the following error message:</p>
  
  <blockquote>
    <p>Source: Analysis Services Execute DDL Task Analysis Services Execute
    DDL Task     Description: Errors in the OLAP storage engine: The
    attribute key cannot be found when processing: Table:
    'dbo_vw_FACT_OperationalTimeSheetData', Column: 'CurrentHomeLaborOrg',
    Value: '117-MARKETPLACE-38'. The attribute is 'KeyOrganisation'.  End
    Warning  Warning: 2013-07-22 06:26:07.51     Code: 0x811F0002<br>
    Source: Analysis Services Execute DDL Task Analysis Services Execute
    DDL Task     Description: Errors in the OLAP storage engine: The
    attribute key was converted to an unknown member because the attribute
    key was not found. Attribute KeyOrganisation of Dimension: Current
    Home Organisation from Database: LadbrokesReporting2005, Cube: MIS
    Clone, Measure Group: Kronos Time Sheet, Partition: 201307, Record:
    179774.  End Warning</p>
  </blockquote>
  
  <p>On extensive google searches for the above error message I learnt this is due to referential integrity i.e some rows in the fact table could not be linked to the dimension table. In my previous analysis I figured that the for some of the values like the one given above in the error message '117-MARKETPLACE-38' in the fact table , the format in the dimension table was '117_Marketplace_38'. However, I have unearthed some striking facts :-</p>
  
  <ol>
  <li><p>The query for the view which populates the fact converts data inthe the format '117-MARKETPLACE-38'. The format of the data in the source tables is '117_Marketplace_38'.</p></li>
  <li><p>There are many other entries of the format '117-Marketplace-38'. However, the error seems to be present only for  that entry. So how come others are getting accepted but this isnt?</p></li>
  </ol>
  
  <p>I've run out of ideas. Hence, it would be great if someone could help me out on this.</p>