If you have defined some hierarchy, I know how to help. SSAS enforces that children in hierarchy are unique; otherwise, you get an error. What fixed the problem for me was going to the properties of the attribute and changing "keycolumn" property to the primary key, "namecolumn" to the attribute itself.