An item with the same key has already been added.
Question
Wednesday, July 15, 2015 5:08 PM
I have an Excel file that was working perfectly and now all of a sudden I get the following error when trying to open Power Pivot window:
============================ Error Message:
An item with the same key has already been added.
============================ Call Stack:
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at Microsoft.AnalysisServices.Common.LinguisticModeling.SynonymModel.AddSynonymCollection(Tuple`2 measure, SynonymCollection synonyms)
at Microsoft.AnalysisServices.Common.LinguisticModeling.LinguisticSchemaLoader.DeserializeSynonymModelFromSchema()
at Microsoft.AnalysisServices.Common.SandboxEditor.LoadLinguisticDesignerState()
at Microsoft.AnalysisServices.Common.SandboxEditor.set_Sandbox(DataModelingSandbox value)
at Microsoft.AnalysisServices.XLHost.Modeler.ClientWindow.RefreshClientWindow(String tableName)
============================
Any solutions out there?
All replies (5)
Monday, July 20, 2015 2:20 AM âś…Answered | 1 vote
Go to Diagram View and that loads but Synonyms is greyed out.
Hi Seth,
According to your description, you are experiencing the issue "An item with the same key has already been added.", right? For this error in PowerPivor data model, it might be related to the Synoyms in the data model. Someone had already submit a feedback to Microsoft, which you can see on the link below.
https://connect.microsoft.com/SQLServer/feedback/details/1111841/excel-2013-power-pivot-an-item-with-the-same-key-has-already-been-added
Besides, in order to see the Synonyms button, you must be running the Click-to-Run version of Excel 2013 and you must have activated Excel with a subscription license (for example, an Office 365 offer that includes the Office client or the Office 365 ProPlus subscription). Please refer to the link below to see the details.
https://support.office.com/en-ca/article/Add-synonyms-to-a-Power-Pivot-Excel-data-model-345f4f5b-5ec2-4998-bc46-a26bdc0810b6
Regards,
Charlie Liao
TechNet Community Support
Wednesday, July 15, 2015 5:14 PM | 1 vote
So, more information on this, I read through the error pretty close and it mentions synonyms so I figure perhaps I added the same synonym to multiple fields accidentally so I'll figure I should check those. Go to Diagram View and that loads but Synonyms is greyed out. Perfect. So, if that was the problem, I've been blocked from my only way of fixing it. Joyful code quality.
Monday, July 20, 2015 5:20 AM
Besides, I could always get to the Synonyms button before I started getting this error, but thanks for treating me like a child.
Monday, July 20, 2015 5:38 AM
Besides, I couldn't have added the synonyms, like I said I did, unless I actually had access to the Synonyms button, which I did, until I didn't, which I pretty much spelled out in the post...
Monday, July 20, 2015 5:47 AM
Hi Seth,
I am trying to involve someone more familiar with this topic for a further look at this issue. Sometime delay might be expected from the job transferring. Your patience is greatly appreciated.
Thank you for your understanding and support.
Regards,
Charlie Liao
TechNet Community Support