Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Sequence contains more than one matching element

Feedback Type:
Frown (Error)

Timestamp:
2022-03-07T16:47:24.4734778Z

Local Time:
2022-03-07T10:47:24.4734778-06:00

Session ID:
a2afc08a-79da-4467-b7ac-9805dcf3488d

Release:
February 2022

Product Version:
2.102.845.0 (22.02) (x64)

Stack Trace:
System.InvalidOperationException
at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
at Microsoft.PowerBI.Modeling.Engine.Loader.LoadInputToDataModelMap..ctor(IModelInput modelInput, IModelingSession modelingSession, ModelingMashupDocument mashupDocument, IReadOnlyDictionary`2 lastLoadedFormulas)
at Microsoft.PowerBI.Modeling.Engine.Loader.PowerQueryToModelSchemaSynchronizer.ApplyQuerySchemaToModel(IModelInput modelInput, IExtendedModelChangeScope modelChangeScope, Boolean requireFullDataRefresh)
at Microsoft.PowerBI.Modeling.Engine.Loader.PowerQueryToModelLoader.ApplyQueriesToModel(IExtendedModelChangeScope modelChangeScope, ModelSchemaSyncContext modelSchemaSyncContext, DataModelSnapshot preTransactionModelSnapshot, Boolean& runRelationshipDetection, List`1& newTableColumnPairs, HashSet`1& existingTableInputs, Boolean& upgradedModel, V3UpgradeStatus& v3UpgradeStatus, List`1& tableInputsExcludedFromSync)
at Microsoft.PowerBI.Modeling.Engine.Loader.PowerQueryToModelLoader.<>c__DisplayClass20_0.<ApplyQueryChangesAndCreateRelationships>b__0()
at Microsoft.PowerBI.Modeling.Engine.Loader.PowerQueryToModelLoader.ExecuteInTransaction(IExtendedModelChangeScope modelChangeScope, Func`1 action)
at Microsoft.PowerBI.Modeling.Engine.Loader.PowerQueryToModelLoader.ApplyQueryChangesAndCreateRelationships(IRelationshipLoader relationshipLoader, IExtendedModelChangeScope modelChangeScope, ModelSchemaSyncContext modelSchemaSyncContext)
at Microsoft.PowerBI.Modeling.Engine.Loader.PowerQueryToModelLoader.ProcessLoadInputs(IRelationshipLoader relationshipLoader, IExtendedModelChangeScope modelChangeScope, ModelSchemaSyncContext modelSchemaSyncContext)
at Microsoft.PowerBI.Modeling.Engine.Loader.PowerQueryToModelLoader.<>c__DisplayClass16_0.<PerformLoadAsync>b__3()
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.PowerBI.Client.Windows.Modeling.Hosting.ModelingTelemetryService.<>c__DisplayClass8_0`1.<<RunInAsyncActivity>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.PowerBI.Client.Windows.Modeling.Hosting.ModelingTelemetryService.<RunInAsyncActivity>d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.PowerBI.Client.Windows.Modeling.Hosting.ModelingTelemetryService.<RunInAsyncActivity>d__8`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.PowerBI.Modeling.Engine.Loader.LoadToReportFlow.<PerformLoadToAnalysisServices>d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.PowerBI.Modeling.Engine.Loader.LoadToReportFlow.<ExecuteInternal>d__13.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.PowerBI.Modeling.Engine.Loader.LoadToReportFlow.<Execute>d__12.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.PowerBI.Modeling.Engine.ModelingEngine.<LoadModelAsyncInternal>d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.PowerBI.Client.Windows.Modeling.Hosting.ModelingTelemetryService.<>c__DisplayClass8_0`1.<<RunInAsyncActivity>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.PowerBI.Client.Windows.Modeling.Hosting.ModelingTelemetryService.<RunInAsyncActivity>d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.PowerBI.Client.Windows.Modeling.Hosting.ModelingTelemetryService.<RunInAsyncActivity>d__8`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.PowerBI.Client.Windows.Modeling.Hosting.DesktopModelingHost.<>c__DisplayClass16_0.<<LoadToModel>b__1>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.PowerBI.Modeling.Engine.Authoring.AsyncModelAuthoringService.<>c__DisplayClass13_0.<<RunExtendedModelChangeAsync>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.PowerBI.Modeling.Engine.Authoring.AsyncModelAuthoringService.<ContinueWithAsyncOperation>d__16.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.PowerBI.Client.Windows.Modeling.Hosting.DesktopModelingHost.<LoadToModel>d__16.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.PowerBI.Client.Windows.FloatingDialog.KoLoadToReportDialog.<>c__DisplayClass34_0.<<StartLoadToReportFlow>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.PowerBI.Client.Windows.IExceptionHandlerExtensions.<HandleAwaitableAsyncExceptions>d__1.MoveNext()

PowerBINonFatalError:
{"AppName":"PBIDesktop","AppVersion":"2.102.845.0","ModuleName":"Microsoft.PowerBI.Modeling.Engine.dll","Component":"Microsoft.PowerBI.Modeling.Engine.Loader.LoadInputToDataModelMap","Error":"System.InvalidOperationException","MethodDef":".ctor","ErrorOffset":"988"}

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

CLR Version:
4.7 or later [Release Number = 528372]

Peak Virtual Memory:
57.9 GB

Private Memory:
2.72 GB

Peak Working Set:
3.75 GB

IE Version:
11.789.19041.0

User ID:
10d11623-805f-4c0e-9404-a858c9e8db32

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

Telemetry Enabled:
True

Model Default Mode:
Composite

Model Version:
PowerBI_V3

Enabled Preview Features:
PBI_compositeModelsOverAS
PBI_enableWebView2
PBI_mobileAuthoringFormattingUI
PBI_useModernFormatPane
PBI_sparklines

Disabled Preview Features:
PBI_shapeMapVisualEnabled
PBI_SpanishLinguisticsEnabled
PBI_qnaLiveConnect
PBI_azureMapVisual
PBI_dataPointLassoSelect
PBI_dynamicParameters
PBI_enhancedTooltips
PQ_WebView2Connector
PBI_scorecardVisual

Disabled DirectQuery Options:
TreatHanaAsRelationalSource

Cloud:
GlobalCloud

DPI Scale:
100%

Supported Services:
Power BI

Status: Investigating

Hi @ArielKrueger ,

 

May I know whether you get this error when you do refresh operation in Power BI Desktop? What’s the data sources of your report and their connection mode? Import or Direct Query connection mode? Is your model a composite model?

If you check in Power Query, will you see any warning or error in Applied Steps pane? Have you ever checked the relationships among the tables in your model to see whether this issue is caused by improper relationships?

 

There is an issue with same error. Could you please confirm whether the cause of your issue is similar to the description from the user ‘texmexdragon’? Thanks in advance!

Sequence contains more than one matching element - Microsoft Power BI Community

 

Best Regards,

Community Support Team _ Caiyun

Comments
v-cazheng-msft
Community Support
Status changed to: Investigating

Hi @ArielKrueger ,

 

May I know whether you get this error when you do refresh operation in Power BI Desktop? What’s the data sources of your report and their connection mode? Import or Direct Query connection mode? Is your model a composite model?

If you check in Power Query, will you see any warning or error in Applied Steps pane? Have you ever checked the relationships among the tables in your model to see whether this issue is caused by improper relationships?

 

There is an issue with same error. Could you please confirm whether the cause of your issue is similar to the description from the user ‘texmexdragon’? Thanks in advance!

Sequence contains more than one matching element - Microsoft Power BI Community

 

Best Regards,

Community Support Team _ Caiyun

technolog
Super User

In my case, I just found one of the freshly added measures via Tabular Editor that was breaking the update. Removed it from the report. Added it again with a different name and everything worked.

Finding that measure was a matter of successively deleting measures until the update worked.

technolog
Super User

In my case, I just found one of the freshly added measures via Tabular Editor that was breaking the update. Removed it from the report. Added it again with a different name and everything worked.

Finding that measure was a matter of successively deleting measures until the update worked.

 

Also from the recommendations I've seen:

Check for Duplicate Elements: Ensure that the data or elements you are querying do not contain duplicates when they are not supposed to. This is often the case when you expect a unique identifier but find multiple entries with the same identifier.