Attribute key not found in SQL Data Cube

The attribute key cannot be found when processing: Table: 'dbo_FACT_PROD_QTY', Column: 'CONTRACT_RATE_KEY', Value: '0'. The attribute is 'CONTRACT_RATE_KEY'.
The attribute key was converted to an unknown member because the attribute key was not found. Attribute CONTRACT_RATE_KEY of Dimension: ContractRateLevel f

- I can process the dimension (ContractRateLevel), that the Fact table is pointing to with no problem.
- The dbo_Fact_Prod_Qty table does have Nulls in column Contract_Rate_Key.
- There are no Null values in the Dimension table: ContractRateLevel.

Can someone help, as I don't have this issue with my test cube, and the Fact table as NULL values for the same column.
LVL 1
isamesAsked:
Who is Participating?
 
lcohanDatabase AnalystCommented:
I believe this happens because the measure is processed before the dimension and if you can process manually the dimension try the same on the measure.  It is because SSAS finds first a foreign key that's used to relate to a cube dimension but the key is not known to the dimension  itself.

If this doesn't  work still you can then try adding default (0) row in your dimension table and in Fact table try putting ISNULL(MyDimensionKey,0).
If this doesn't work either then you can try to 'Ignore error count' , 'Key not found' , 'Null key not allowed' as described here  https://www.mssqltips.com/sqlservertip/3476/sql-server-analysis-services-ssas-processing-error-configurations/ but obviously that's not ideal solution however is little choice as long as you have those NULLs in the Contract_Rate_Key.
0
 
Dung DinhDBA and Business Intelligence DeveloperCommented:
The issue is to ContractRateLevel  dimension missed value 0 for CONTRACT_RATE_KEY attribute
1- Add 0 as a new value key in ContractRateLevel
2- If you don't want SSAS to stop processing, you can configure the relationship between cube and ContractRateLevel dimension to convert UnknowMember
0
 
isamesAuthor Commented:
I had to remove the dimension, and then add it back. I then processed the dimension before processing the cube.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.