cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Eric Regular Visitor
Regular Visitor

An item with the same key has already been added

 

I've been using the IBM iSeries Client Access ODBC driver to pull data from our enterprise system without any problems for weeks.  Suddenly without warning I started getting an "Unexpected Error: An item with the same key has already been added."  

 

 

The query is very very simple: Select * from TMPROD and I am running it from a fresh PBI report with nothing else open.  It worked fine for weeks and now sudden has stopped working.

 

Oddly, I can open the data model within PowerPivot and import the file fine without any problem.  But if I try to query the file in PBI or Excel I get the error message.

 

Any ideas?

7 REPLIES 7
Highlighted
ankitpatira Super Contributor
Super Contributor

Re: An item with the same key has already been added

@Eric Instead of running query via ODBC can you use ODBC to navigate all objets in your database and then select TMPROD table? I have seen this error many times and it is something to do with PowerQuery I think. 

arify Established Member
Established Member

Re: An item with the same key has already been added

Hi @Eric, when that error happens, can you please click the "Send a Frown" button to send us helpful information? So that we can fix it Smiley Happy

 

Thanks for reporting it to us

Oguz

Eric Regular Visitor
Regular Visitor

Re: An item with the same key has already been added

Ankitpatira, thanks for the suggestion, I will give that a try.

 

By the way, is there a way to link to an external data source (DB2 table) rather than import it?  

doncobb Frequent Visitor
Frequent Visitor

Re: An item with the same key has already been added

Error Message:

An item with the same key has already been added.

Stack Trace:

Microsoft.Mashup.Evaluator.Interface.ErrorException: An item with the same key has already been added. ---> Microsoft.Mashup.Evaluator.Interface.ErrorException: An item with the same key has already been added. ---> Microsoft.Mashup.Evaluator.Interface.ErrorException: An item with the same key has already been added. ---> Microsoft.Mashup.Evaluator.Interface.ErrorException: An item with the same key has already been added. ---> Microsoft.Mashup.Evaluator.Interface.ErrorException: An item with the same key has already been added. ---> System.ArgumentException: An item with the same key has already been added. ---> System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at Microsoft.Mashup.Engine1.Library.OData.V3.EdmModelProcessor.ProcessEntityContainers()
at Microsoft.Mashup.Engine1.Library.OData.EdmModelProcessorBase`1.Build(HttpResource resource)
at Microsoft.Mashup.Engine1.Library.OData.V3.ODataEnvironment.Create(ODataServiceDocument serviceDoc, Value headers, HttpResource resource, ResourceCredentialCollection credentials, IEngineHost host, ODataSettings settings, ODataUserSettings userSettings, Boolean useCachedCredentials)
at Microsoft.Mashup.Engine1.Library.OData.ODataModule.GetFeed(HttpResource resource, TextValue serviceUriValue, TextValue uriValue, Value headers, IEngineHost host, ResourceCredentialCollection credentials, ODataSettingsBase settings, ODataUserSettings userSettings, Boolean useCachedCredentials)
at Microsoft.Mashup.Engine1.Library.OData.ODataModule.FeedFunctionValue.TypedInvoke(TextValue serviceUri, Value headers, Value options)
at Microsoft.Mashup.Engine1.Runtime.NativeFunctionValue3`4.Invoke(Value arg0, Value arg1, Value arg2)
at Microsoft.Mashup.Engine1.Language.DebugExpression.Execute(Value frame)
at Microsoft.Mashup.Engine1.Language.FunctionInvocationExpression2.Execute(Value frame)
at Microsoft.Mashup.Engine1.Language.DebugExpression.Execute(Value frame)
at Microsoft.Mashup.Engine1.Language.FunctionInvocationExpression2.Execute(Value frame)
at Microsoft.Mashup.Engine1.Language.DebugExpression.Execute(Value frame)
at Microsoft.Mashup.Engine1.Language.RecordExpression.RuntimeRecordValue.Force(Int32 index)
at Microsoft.Mashup.Engine1.Language.RecordExpression.RuntimeRecordValue.get_Item(Int32 index)
at Microsoft.Mashup.Engine1.Language.RecordExpression.RuntimeRecordValue.Force(Int32 index)
at Microsoft.Mashup.Engine1.Language.RecordExpression.RuntimeRecordValue.get_Item(Int32 index)
at Microsoft.Mashup.Engine1.Runtime.Library.Linker.BindFunctionValue.TypedInvoke(RecordValue environment, Value section, TextValue name)
at Microsoft.Mashup.Engine1.Runtime.NativeFunctionValue3`4.Invoke(Value arg0, Value arg1, Value arg2)
at Microsoft.Mashup.Engine1.Language.MembersFunctionValue0.Invoke()
at Microsoft.Mashup.Engine1.Language.ListExpression.RuntimeListValue.Force(Int32 index)
at Microsoft.Mashup.Engine1.Language.ListExpression.RuntimeListValue.get_Item(Int32 index)
at Microsoft.Mashup.Engine1.Language.MembersFunctionValue1.Invoke(Value arg0)
at Microsoft.Mashup.Engine1.Language.RecordExpression.RuntimeRecordValue.Force(Int32 index)
at Microsoft.Mashup.Engine1.Language.RecordExpression.RuntimeRecordValue.get_Item(Int32 index)
at Microsoft.Mashup.Engine1.Language.FunctionInvocationExpression2.Execute(Value frame)
at Microsoft.Mashup.Engine1.Language.Expression.ExecuteCondition(Value frame)
at Microsoft.Mashup.Engine1.Language.DebugExpression.ExecuteCondition(Value frame)
at Microsoft.Mashup.Engine1.Language.IfExpression.Execute(Value frame)
at Microsoft.Mashup.Engine1.Language.DebugExpression.Execute(Value frame)
at Microsoft.Mashup.Engine1.Language.RecordExpression.RuntimeRecordValue.Force(Int32 index)
at Microsoft.Mashup.Engine1.Language.RecordExpression.RuntimeRecordValue.get_Item(Int32 index)
at Microsoft.Mashup.Engine1.Language.MembersFunctionValue0.Invoke()
at Microsoft.Mashup.Evaluator.SimpleDocumentEvaluator.BeginGetResult(DocumentEvaluationParameters parameters, Action`1 callback)
--- End of inner exception stack trace ---
at Microsoft.Mashup.Evaluator.SimpleDocumentEvaluator.BeginGetResult(DocumentEvaluationParameters parameters, Action`1 callback)
at Microsoft.Mashup.Evaluator.FirewallPartition.BeginGetResult[T](Action`1 callback)
at Microsoft.Mashup.Evaluator.FirewallDocumentEvaluator.Evaluation`1.OnBufferComplete(Exception exception)
at Microsoft.Mashup.Evaluator.Firewall.BeginBufferPartitions(Action`1 callback)
at Microsoft.Mashup.Evaluator.FirewallDocumentEvaluator.BeginGetResultInternal[T](DocumentEvaluationParameters parameters, Action`1 callback)
at Microsoft.Mashup.Evaluator.Interface.IDocumentEvaluatorExtensions.GetResult[T](IDocumentEvaluator`1 evaluator, DocumentEvaluationParameters parameters)
at Microsoft.Mashup.Evaluator.RemoteDocumentEvaluator.Service.OnBeginGetResult[T](IMessageChannel channel, BeginGetResultMessage message, Action`1 action)
at Microsoft.Mashup.Evaluator.RemoteDocumentEvaluator.Service.OnBeginGetPreviewValueSource(IMessageChannel channel, BeginGetPreviewValueSourceMessage message)
at Microsoft.Mashup.Evaluator.MessageHandlers.TryDispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.ChannelMessenger.ChannelMessageHandlers.TryDispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.MessageHandlers.Dispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.ChannelMessenger.OnMessageWithUnknownChannel(IMessageChannel baseChannel, MessageWithUnknownChannel messageWithUnknownChannel)
at Microsoft.Mashup.Evaluator.MessageHandlers.TryDispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.ChannelMessenger.ChannelMessageHandlers.TryDispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.MessageHandlers.Dispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.EvaluationHost.Run()
at Microsoft.Mashup.Container.EvaluationContainerMain.Run(Object args)
at Microsoft.Mashup.Evaluator.SafeThread2.<>c__DisplayClass15.<CreateAction>b__14(Object o)
at Microsoft.Mashup.Container.EvaluationContainerMain.SafeRun(String[] args)
at Microsoft.Mashup.Container.EvaluationContainerMain.Main(String[] args)
--- End of inner exception stack trace ---
at Microsoft.Mashup.Evaluator.Interface.EvaluationResult2`1.get_Result()
at Microsoft.Mashup.Evaluator.SimpleDocumentEvaluator.<>c__DisplayClass1.<BeginGetResult>b__0(EvaluationResult2`1 result)
--- End of inner exception stack trace ---
at Microsoft.Mashup.Evaluator.SimpleDocumentEvaluator.<>c__DisplayClass1.<BeginGetResult>b__0(EvaluationResult2`1 result)
at Microsoft.Mashup.Evaluator.SimpleDocumentEvaluator.BeginGetResult(DocumentEvaluationParameters parameters, Action`1 callback)
at Microsoft.Mashup.Evaluator.FirewallPartition.BeginGetResult[T](Action`1 callback)
at Microsoft.Mashup.Evaluator.FirewallDocumentEvaluator.Evaluation`1.OnBufferComplete(Exception exception)
at Microsoft.Mashup.Evaluator.Firewall.BeginBufferPartitions(Action`1 callback)
at Microsoft.Mashup.Evaluator.FirewallDocumentEvaluator.BeginGetResultInternal[T](DocumentEvaluationParameters parameters, Action`1 callback)
at Microsoft.Mashup.Evaluator.Interface.IDocumentEvaluatorExtensions.GetResult[T](IDocumentEvaluator`1 evaluator, DocumentEvaluationParameters parameters)
at Microsoft.Mashup.Evaluator.RemoteDocumentEvaluator.Service.OnBeginGetResult[T](IMessageChannel channel, BeginGetResultMessage message, Action`1 action)
at Microsoft.Mashup.Evaluator.RemoteDocumentEvaluator.Service.OnBeginGetPreviewValueSource(IMessageChannel channel, BeginGetPreviewValueSourceMessage message)
at Microsoft.Mashup.Evaluator.MessageHandlers.TryDispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.ChannelMessenger.ChannelMessageHandlers.TryDispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.MessageHandlers.Dispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.ChannelMessenger.OnMessageWithUnknownChannel(IMessageChannel baseChannel, MessageWithUnknownChannel messageWithUnknownChannel)
at Microsoft.Mashup.Evaluator.MessageHandlers.TryDispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.ChannelMessenger.ChannelMessageHandlers.TryDispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.MessageHandlers.Dispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.EvaluationHost.Run()
at Microsoft.Mashup.Container.EvaluationContainerMain.Run(Object args)
at Microsoft.Mashup.Evaluator.SafeThread2.<>c__DisplayClass15.<CreateAction>b__14(Object o)
at Microsoft.Mashup.Container.EvaluationContainerMain.SafeRun(String[] args)
at Microsoft.Mashup.Container.EvaluationContainerMain.Main(String[] args)
--- End of inner exception stack trace ---
at Microsoft.Mashup.Evaluator.Interface.EvaluationResult2`1.get_Result()
at Microsoft.Mashup.Evaluator.RemotePreviewValueSource.<>c__DisplayClass5.<RunStub>b__3()
at Microsoft.Mashup.Evaluator.EvaluationHost.ReportExceptions(IHostTrace trace, IEngineHost engineHost, IMessageChannel channel, Action action)
--- End of inner exception stack trace ---
at Microsoft.Mashup.Evaluator.EvaluationHost.<>c__DisplayClass7.<TryReportException>b__6()
at Microsoft.Mashup.Common.SafeExceptions.IgnoreSafeExceptions(IHostTrace trace, Action action)
at Microsoft.Mashup.Evaluator.EvaluationHost.TryReportException(IHostTrace trace, IEngineHost engineHost, IMessageChannel channel, Exception exception)
at Microsoft.Mashup.Evaluator.EvaluationHost.ReportExceptions(IHostTrace trace, IEngineHost engineHost, IMessageChannel channel, Action action)
at Microsoft.Mashup.Evaluator.RemotePreviewValueSource.RunStub(IEngineHost engineHost, IMessageChannel channel, Func`1 getPreviewValueSource)
at Microsoft.Mashup.Evaluator.RemoteDocumentEvaluator.Service.<>c__DisplayClass28`1.<OnBeginGetResult>b__25()
at Microsoft.Mashup.Evaluator.EvaluationHost.ReportExceptions(IHostTrace trace, IEngineHost engineHost, IMessageChannel channel, Action action)
at Microsoft.Mashup.Evaluator.RemoteDocumentEvaluator.Service.OnBeginGetResult[T](IMessageChannel channel, BeginGetResultMessage message, Action`1 action)
at Microsoft.Mashup.Evaluator.RemoteDocumentEvaluator.Service.OnBeginGetPreviewValueSource(IMessageChannel channel, BeginGetPreviewValueSourceMessage message)
at Microsoft.Mashup.Evaluator.MessageHandlers.TryDispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.ChannelMessenger.ChannelMessageHandlers.TryDispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.MessageHandlers.Dispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.ChannelMessenger.OnMessageWithUnknownChannel(IMessageChannel baseChannel, MessageWithUnknownChannel messageWithUnknownChannel)
at Microsoft.Mashup.Evaluator.MessageHandlers.TryDispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.ChannelMessenger.ChannelMessageHandlers.TryDispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.MessageHandlers.Dispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.EvaluationHost.Run()
at Microsoft.Mashup.Container.EvaluationContainerMain.Run(Object args)
at Microsoft.Mashup.Evaluator.SafeThread2.<>c__DisplayClass15.<CreateAction>b__14(Object o)
at Microsoft.Mashup.Container.EvaluationContainerMain.SafeRun(String[] args)
at Microsoft.Mashup.Container.EvaluationContainerMain.Main(String[] args)
--- End of inner exception stack trace ---
at Microsoft.Mashup.Evaluator.EvaluationHost.OnException(IEngineHost engineHost, IMessageChannel channel, ExceptionMessage message)
at Microsoft.Mashup.Evaluator.MessageHandlers.TryDispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.MessageHandlers.Dispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.ChannelMessenger.ChannelMessageHandlers.TryDispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.MessageHandlers.Dispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.Interface.IMessageChannelExtensions.WaitFor[T](IMessageChannel channel)
at Microsoft.Mashup.Evaluator.RemotePreviewValueSource.PreviewValueSource.WaitFor(Func`1 condition, Boolean disposing)
at Microsoft.Mashup.Evaluator.RemotePreviewValueSource.PreviewValueSource.get_TableSource()
at Microsoft.Mashup.Host.Document.Analysis.PackageDocumentAnalysisInfo.PackagePartitionAnalysisInfo.SetPreviewValue(EvaluationResult2`1 result, Func`1 getStaleSince, Func`1 getSampled)

Invocation Stack Trace:

at Microsoft.Mashup.Host.Document.ExceptionExtensions.GetCurrentInvocationStackTrace()
at Microsoft.Mashup.Client.ClientShared.StackTraceInfo..ctor(String exceptionStackTrace, String invocationStackTrace)
at Microsoft.Mashup.Client.ClientShared.DataImporter.HandleImportEvaluationException(ExceptionResult exceptionView, Query query, String sourceID, String formulaTitle, Boolean isNewQuery, Boolean isFromEditor)
at Microsoft.Mashup.Client.ClientShared.DataImporter.OnGetPreviewResult(PreviewResult preview, Query query, String sourceID, String formulaTitle, Nullable`1 explicitImportDestination, Boolean isNewQuery, Boolean isFromEditor)
at Microsoft.Mashup.Client.ClientShared.DataImporter.<>c__DisplayClass1d.<OnQuerySettingsResolved>b__1a()
at Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Delegate.DynamicInvokeImpl(Object[] args)
at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
at Microsoft.Mashup.Client.ClientShared.WindowManager.ShowDialog[T](T form, IWin32Window owner)
at Microsoft.PowerBI.Client.Program.<>c__DisplayClassc.<Main>b__0()
at Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)
at Microsoft.PowerBI.Client.Program.Main(String[] args)

 

arify Established Member
Established Member

Re: An item with the same key has already been added

Hi @doncobb,

 

We've fixed that recently (it's a different failure than Eric's), the fix will be released in about ~2 months.

 

Thanks for reporting it to us!

afernando Regular Visitor
Regular Visitor

Re: An item with the same key has already been added

Feedback Type:
Frown (Error)

Timestamp:
2017-06-21T06:06:27.5236951Z

Local Time:
2017-06-21T16:06:27.5236951+10:00

Product Version:
2.47.4766.542 (PBIDesktop) (x64)

Release:
June 2017

IE Version:
11.1358.14393.0

OS Version:
Microsoft Windows NT 10.0.14393.0 (x64 en-US)

CLR Version:
4.6.2. or later [Release Number = 460805]

Workbook Package Info:
1* - en-AU, Query Groups: 0, fastCombine: Disabled, runBackgroundAnalysis: True.

Peak Working Set:
430 MB

Private Memory:
316 MB

Peak Virtual Memory:
33.7 GB

Error Message:
An item with the same key has already been added.

Stack Trace:
System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at Microsoft.PowerBI.Client.Windows.Modeling.PowerQueryToModelSchemaSynchronizer.FinalNameCalculator.GetRestrictedNames(IEnumerable`1 columns, IEnumerable`1 measures, IEnumerable`1 hierarchies)
at Microsoft.PowerBI.Client.Windows.Modeling.PowerQueryToModelSchemaSynchronizer.NameCalculatorMeasureInfo.CreateInfos(IEnumerable`1 desiredMeasures, IDataModel dataModel, ITable existingTable)
at Microsoft.PowerBI.Client.Windows.Modeling.PowerQueryToModelSchemaSynchronizer.GetFinalNamesForTableItems(EditTableInfo editTableInfo, Boolean allowNonIdealNames, IEnumerable`1 columnsToLoad, IEnumerable`1 measuresToLoad, IEnumerable`1 hierarchiesToLoad, IDataModel dataModel)
at Microsoft.PowerBI.Client.Windows.Modeling.PowerQueryToModelSchemaSynchronizer.CreateModelChangeToSyncSchemas(EditTableInfo editTableInfo, Boolean allowNonIdealNames, IEnumerable`1 columnsToLoad, IEnumerable`1 measuresToLoad, IEnumerable`1 hierarchiesToLoad, IDataModel dataModel)
at Microsoft.PowerBI.Client.Windows.Modeling.PowerQueryToModelSchemaSynchronizer.GetQueryLoadReason(IAnalysisServicesLoadInput loadInput, IDataModel dataModel, Func`2 getTableInputs)
at Microsoft.PowerBI.Client.Windows.Modeling.PowerQueryToModelLoader.CreateQueryLoadReasonsDictionary()
at Microsoft.PowerBI.Client.Windows.Modeling.PowerQueryToModelLoader..ctor(WindowsHost windowsHost, IExceptionHandler exceptionHandler, IWin32Window ownerWindow, IModelProxy modelProxy, IModelAuthoringService modelAuthoringService, IEnumerable`1 loadInputs, Report report, IQueryServices queryServices, IAnalysisServicesLoadContextFactory loadContextFactory, AnalysisServicesLoadToken loadToken, ICacheSession cacheSession)
at Microsoft.PowerBI.Client.Windows.Modeling.PowerQueryToModelLoader.<>c__DisplayClass1.<LoadTablesAsync>b__0(Object state)
at Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)

Invocation Stack Trace:
at Microsoft.Mashup.Host.Document.ExceptionExtensions.GetCurrentInvocationStackTrace()
at Microsoft.Mashup.Client.ClientShared.FeedbackErrorInfo..ctor(String message, Nullable`1 errorCode, String requestId, Exception exception)
at Microsoft.Mashup.Client.ClientShared.UnexpectedExceptionHandler.<>c__DisplayClass1.<HandleException>b__0()
at Microsoft.Mashup.Host.Document.SynchronizationContextExtensions.<>c__DisplayClass3.<SendAndMarshalExceptions>b__0(Object null)
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Delegate.DynamicInvokeImpl(Object[] args)
at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
at Microsoft.Mashup.Client.ClientShared.WindowManager.ShowDialog[T](T form, IWin32Window owner)
at Microsoft.Mashup.Client.ClientShared.Ux.FloatingDialog.FloatingDialog.ShowDialogWithTimeout(IWin32Window owner, Nullable`1 showTimeout)
at Microsoft.PowerBI.Client.Windows.FloatingDialog.KoLoadToReportDialog.StartEvaluationAndShowDialog(IEnumerable`1 queriesToLoad, Nullable`1 showTimeout, Boolean requireFullDataRefresh)
at Microsoft.PowerBI.Client.Windows.FloatingDialog.KoLoadToReportDialog.TryShowDialogForQueries(Report report, IWin32Window ownerWindow, WindowsHost windowsHost, IQueryServices queryServices, IEnumerable`1 queriesToLoad, LocalizedString title, Boolean requireFullDataRefresh)
at Microsoft.PowerBI.Client.Windows.MainWindow.RefreshAllQueries()
at Microsoft.PowerBI.Client.Windows.Ribbon.ApplicationRibbonCommandActionHandler.HandleCommand(UInt32 commandId)
at Microsoft.Mashup.Client.Windows.UICommands.CommandActionHandlerBase.CommandAction(UInt32 commandId)
at Microsoft.Mashup.Client.Windows.Ribbon.RibbonCommandHandler.Execute(UInt32 commandId, CommandExecutionVerb verb, PropertyKeyRef keyRef, PropVariantRef currentValue, IUISimplePropertySet commandExecutionProperties)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
at Microsoft.Mashup.Client.ClientShared.WindowManager.ShowDialog[T](T form, IWin32Window owner)
at Microsoft.PowerBI.Client.Program.<>c__DisplayClassd.<Main>b__0()
at Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)
at Microsoft.PowerBI.Client.Program.Main(String[] args)


User ID:
8679ab30-62bc-452e-a6e0-5434e5358e4f

Session ID:
5db0286c-2d4a-4999-b1a2-1ac57af40173

Telemetry Enabled:
True

Model Default Mode:
Import

Snapshot Trace Logs:
C:\Users\afernando\AppData\Local\Microsoft\Power BI Desktop\FrownSnapShot1445375548.zip

Performance Trace Logs:
C:\Users\afernando\AppData\Local\Microsoft\Power BI Desktop\PerformanceTraces.zip

Enabled Preview Features:
PBI_Snowflake
PBI_shapeMapVisualEnabled
PBI_EnableReportTheme
PBI_allowBiDiCrossFilterInDirectQuery
PBI_pivotTableVisualEnabled
PBI_numericSlicerEnabled
PBI_PbiServiceLiveConnect
PBI_daxTemplatesEnabled
PBI_relativeDateSlicer
CustomConnectors

Disabled Preview Features:
PBI_SpanishLinguisticsEnabled

Enabled DirectQuery Options:
PBI_DirectQuery_Unrestricted

Cloud:
GlobalCloud

DPI Scale:
100%

Supported Services:
Power BI

Formulas:


section Section1;

shared Pallets = let
Source = Sql.Databases("susanday.database.windows.net"),
production = Source{[Name="production"]}[Data],
dbo_Pallets = production{[Schema="dbo",Item="Pallets"]}[Data]
in
dbo_Pallets;

shared Schedule = let
Source = Sql.Databases("susanday.database.windows.net"),
production = Source{[Name="production"]}[Data],
dbo_Schedule = production{[Schema="dbo",Item="Schedule"]}[Data],
#"Renamed Columns" = Table.RenameColumns(dbo_Schedule,{{"Labour", "Planned Labour"}, {"RunRate", "Expected Rate"}, {"Minutes", "Planned Duration"}})
in
#"Renamed Columns";

shared Orders = let
Source = Sql.Databases("susanday.database.windows.net"),
production = Source{[Name="production"]}[Data],
dbo_Orders = production{[Schema="dbo",Item="Orders"]}[Data]
in
dbo_Orders;

shared #"Orders Summary" = let
Source = Pallets,
#"Grouped Rows" = Table.Group(Source, {"OrderNo"}, {{"Start", each List.Min([LocalTime]), type datetimezone}, {"Finish", each List.Max([LocalTime]), type datetimezone}, {"Pallets", each List.Max([ProductCount]), type number}, {"Cartons", each List.Sum([Cartons]), type number}, {"UnitsInCarton", each List.Max([UnitsInCarton]), type number}, {"OrderDate", each List.Max([OrderDate]), type date}})
in
#"Grouped Rows";

shared #"Previous Pallet" = let
Source = Sql.Databases("susanday.database.windows.net"),
production = Source{[Name="production"]}[Data],
dbo_Pallets = production{[Schema="dbo",Item="Pallets"]}[Data],
#"Removed Other Columns" = Table.SelectColumns(dbo_Pallets,{"OrderNo", "ProductCount", "LocalTime"}),
#"Filtered Rows" = Table.SelectRows(#"Removed Other Columns", each [ProductCount] <> 0),
#"Trimmed Text" = Table.TransformColumns(#"Filtered Rows",{{"OrderNo", Text.Trim}}),
#"Subtracted from Column" = Table.TransformColumns(#"Trimmed Text", {{"ProductCount", each _ - 1, type number}}),
#"Merged Columns" = Table.CombineColumns(Table.TransformColumnTypes(#"Subtracted from Column", {{"ProductCount", type text}}, "en-AU"),{"OrderNo", "ProductCount"},Combiner.CombineTextByDelimiter("-", QuoteStyle.None),"PalledID")
in
#"Merged Columns";

haassiej Regular Visitor
Regular Visitor

Re: An item with the same key has already been added

When connect with any datasource from MAC -> Parallels:

 

Feedback Type: Frown (Error) Timestamp: 2017-08-18T14:07:36.3666756Z Local Time: 2017-08-18T16:07:36.3666756+02:00 Product Version: 2.48.4792.721 (PBIDesktop) (x64) Release: July 2017 IE Version: 11.1593.14393.0 OS Version: Microsoft Windows NT 10.0.14393.0 (x64 en-US) CLR Version: 4.6.2. or later [Release Number = 394802] Workbook Package Info: 1* - nl-NL, Query Groups: 0, fastCombine: Disabled, runBackgroundAnalysis: True. Peak Working Set: 378 MB Private Memory: 257 MB Peak Virtual Memory: 33.5 GB Error Message: An item with the same key has already been added. Stack Trace: Microsoft.Mashup.Evaluator.Interface.ErrorException: An item with the same key has already been added. ---> System.ArgumentException: An item with the same key has already been added. ---> System.ArgumentException: An item with the same key has already been added. at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) at Microsoft.Mashup.EngineHost.Services.DiskPersistentCache.PersistentDictionary.<>c__DisplayClass24.<ReadBucket>b__23() at Microsoft.Mashup.EngineHost.Services.FileSystemAccessHelper.<>c__DisplayClass4.<IgnoringAccessExceptions>b__3() at Microsoft.Mashup.EngineHost.Services.FileSystemAccessHelper.TryIgnoringAccessExceptions[T](Func`1 func, IEvaluationConstants evaluationConstants, T& result, Exception& accessException) at Microsoft.Mashup.EngineHost.Services.FileSystemAccessHelper.IgnoringAccessExceptions(Action action, IEvaluationConstants evaluationConstants) at Microsoft.Mashup.EngineHost.Services.DiskPersistentCache.PersistentDictionary.TryGetKeyValues(Dictionary`2& dictionary) at Microsoft.Mashup.EngineHost.Services.DiskPersistentCache._DeleteFiles() at Microsoft.Mashup.EngineHost.Services.DiskPersistentCache.DeleteFiles() at Microsoft.Mashup.EngineHost.Services.DiskPersistentCache.Purge() at Microsoft.Mashup.EngineHost.Services.DiskPersistentCache.CommitStream(String key, CommitFileStream commitStream) at Microsoft.Mashup.EngineHost.Services.WriteBehindPersistentCache.AsyncCommitStorage(String key, TemporaryStorage storage) at Microsoft.Mashup.EngineHost.Services.WriteBehindPersistentCache.AsyncCommitStorage(Object obj) at Microsoft.Mashup.Evaluator.EvaluatorThreadPool.EvaluatorThread(Object state) at Microsoft.Mashup.Evaluator.SafeThread2.<>c__DisplayClass15.<CreateAction>b__14(Object o) --- End of inner exception stack trace --- at Microsoft.Mashup.Evaluator.EvaluationHost.<>c__DisplayClass7.<TryReportException>b__6() at Microsoft.Mashup.Common.SafeExceptions.IgnoreSafeExceptions(IEngineHost host, IHostTrace trace, Action action) at Microsoft.Mashup.Evaluator.EvaluationHost.TryReportException(IHostTrace trace, IEngineHost engineHost, IMessageChannel channel, Exception exception) at Microsoft.Mashup.Evaluator.EvaluationHost.TryHandleException(Exception exception) at Microsoft.Mashup.Evaluator.SafeThread2.HandleException(Exception e) at Microsoft.Mashup.Evaluator.SafeThread2.<>c__DisplayClass15.<CreateAction>b__14(Object o) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart(Object obj) --- End of inner exception stack trace --- at Microsoft.Mashup.Evaluator.EvaluationHost.OnException(IEngineHost engineHost, IMessageChannel channel, ExceptionMessage message) at Microsoft.Mashup.Evaluator.MessageHandlers.TryDispatch(IMessageChannel channel, Message message) at Microsoft.Mashup.Evaluator.MessageHandlers.Dispatch(IMessageChannel channel, Message message) at Microsoft.Mashup.Evaluator.ChannelMessenger.ChannelMessageHandlers.TryDispatch(IMessageChannel channel, Message message) at Microsoft.Mashup.Evaluator.MessageHandlers.Dispatch(IMessageChannel channel, Message message) at Microsoft.Mashup.Evaluator.ChannelMessenger.OnMessageWithUnknownChannel(IMessageChannel baseChannel, MessageWithUnknownChannel messageWithUnknownChannel) at Microsoft.Mashup.Evaluator.MessageHandlers.TryDispatch(IMessageChannel channel, Message message) at Microsoft.Mashup.Evaluator.ChannelMessenger.ChannelMessageHandlers.TryDispatch(IMessageChannel channel, Message message) at Microsoft.Mashup.Evaluator.MessageHandlers.Dispatch(IMessageChannel channel, Message message) at Microsoft.Mashup.Evaluator.Interface.IMessageChannelExtensions.WaitFor[T](IMessageChannel channel) at Microsoft.Mashup.Evaluator.RemotePreviewValueSource.PreviewValueSource.WaitFor(Func`1 condition, Boolean disposing) at Microsoft.Mashup.Evaluator.RemotePreviewValueSource.PreviewValueSource.get_TableSource() at Microsoft.Mashup.Evaluator.Interface.TracingPreviewValueSource.get_TableSource() at Microsoft.Mashup.Host.Document.Analysis.PackageDocumentAnalysisInfo.PackagePartitionAnalysisInfo.SetPreviewValue(EvaluationResult2`1 result, Func`1 getStaleSince, Func`1 getSampled) Invocation Stack Trace: at Microsoft.Mashup.Host.Document.ExceptionExtensions.GetCurrentInvocationStackTrace() at Microsoft.Mashup.Client.ClientShared.DataImporter.HandleImportEvaluationException(ExceptionResult exceptionView, Query query, String sourceID, String formulaTitle, Boolean isNewQuery, Boolean isFromEditor) at Microsoft.Mashup.Client.ClientShared.DataImporter.OnGetPreviewResult(PreviewResult preview, Query query, String sourceID, String formulaTitle, Nullable`1 explicitImportDestination, Boolean isNewQuery, Boolean isFromEditor) at Microsoft.Mashup.Client.ClientShared.DataImporter.<>c__DisplayClass1b.<OnQuerySettingsResolved>b__18() at Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action) at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.Delegate.DynamicInvokeImpl(Object[] args) at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme) at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme) at System.Windows.Forms.Control.InvokeMarshaledCallbacks() at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg) at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg) at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData) at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context) at System.Windows.Forms.Form.ShowDialog(IWin32Window owner) at Microsoft.Mashup.Client.ClientShared.WindowManager.ShowDialog[T](T form, IWin32Window owner) at Microsoft.PowerBI.Client.Program.<>c__DisplayClassd.<Main>b__0() at Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action) at Microsoft.PowerBI.Client.Program.Main(String[] args) User ID: 40a3b781-227d-41de-b396-61b73c39b83a Session ID: 42cb8789-b45a-4bbb-abbd-98fcbf0638d7 Telemetry Enabled: True Model Default Mode: Import Snapshot Trace Logs: C:\Users\XX\AppData\Local\Microsoft\Power BI Desktop\FrownSnapShot344336305.zip Performance Trace Logs: C:\Users\XX\AppData\Local\Microsoft\Power BI Desktop\PerformanceTraces.zip Enabled Preview Features: PBI_PbiServiceLiveConnect Disabled Preview Features: PBI_shapeMapVisualEnabled PBI_EnableReportTheme PBI_numericSlicerEnabled PBI_SpanishLinguisticsEnabled PBI_daxTemplatesEnabled CustomConnectors Disabled DirectQuery Options: PBI_DirectQuery_Unrestricted Cloud: GlobalCloud DPI Scale: 200% Supported Services: Power BI Formulas: section Section1; shared Query1 = let Source = SharePoint.Files("https://XX.sharepoint.com/teams/xx/xx/", [ApiVersion = "Auto"]) in Source;

Helpful resources

Announcements
Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Power BI Helps Homeless and Trouble Youth

Power BI Helps Homeless and Trouble Youth

We spoke with Power BI Super User, Greg Deckler, about his charity work

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Users Online
Currently online: 349 members 3,641 guests
Please welcome our newest community members: