May 23, 2017 at 6:38 am
I am trying to deal with a dimension involving products from multiple subsidiaries, but keep getting an issue with duplicate values.
The table has the following fields:
productkey - PK (Integer)
productID - The product ID from the source system -- used with locationkey to join to FactProductSales
productname - The Description of the product
productstdcost - Standard cost of the product
productfamily - The product Family
locationkey - the location the product is from ---- used with ProductID to join to FactProductSales
I also have a table called FactProductSales
with the following fields
transactionid Integer PK
salesinvoicenumber
salesdatekey
customerid
productid -- used with locationkey to join to DimProduct
quantity
salestotalcost
productfamily
locationkey -- used with ProductID to join to DimProduct
I keep on getting the following error
Errors in the OLAP storage engine: A duplicate attribute key has been found when processing: Table: 'dbo_FACTPRODUCTSALES', Column: 'productid', Value: '00-02800-005'; Table: 'dbo_FACTPRODUCTSALES', Column: 'locationkey', Value: '16'. The attribute is 'Productid'.
Within the dimproduct table there is only one record with these values, but there are numerous records in the factproductsales table that have them.
I am rather lost on how to fix this issue.
May 23, 2017 at 6:54 am
Figured it out. I had to reverse the direction of the relationship between the tables.
May 23, 2017 at 7:14 am
now I am getting a similar error on another table- dimcustomer - also related to FactProductSales
Errors in the OLAP storage engine: A duplicate attribute key has been found when processing: Table: 'dbo_DimCustomer', Column: 'CustomerID', Value: 'C060254'; Table: 'dbo_DimCustomer', Column: 'locationkey', Value: '16'. The attribute is 'Customer ID'.
The DimCustomer Table has the following fields
CustomerID
CustomerName
locationkey
The table uses a Composite PK of CustomerID and Locationkey
In the DSV I have a named calculation called CustIDlocation that combines the locationkey and the customerID.
The relationship to FactProductSales is set as CustomerID & Location with DimCustomer as the foreign key table and FactProductSales as the primary key table.
When I reverse the relationship I get the following error
Errors in the high-level relational engine. The 'dbo_FACTPRODUCTSALES' table that is required for a join cannot be reached based on the relationships in the data source view.
May 23, 2017 at 7:16 am
Appears that the last issue was fixed by removing the dimension and re adding it after reversing the DSV relationship.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply