Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi, I am getting "Sequence contains no matching element" error and the same query works in Kusto. Below is the stack trace. Appreciate help here!
Feedback Type:
Frown (Error)
Error Message:
Sequence contains no matching element
Stack Trace:
System.InvalidOperationException
at System.Linq.Enumerable.First[TSource](IEnumerable`1 source, Func`2 predicate)
at Microsoft.PowerBI.Modeling.Engine.Loader.PowerQueryToModelLoader.GetFailedQueriesFromException(IEnumerable`1 tableInputs, IExtendedModelChangeScope modelChangeScope, OperationException asOperationException)
at Microsoft.PowerBI.Modeling.Engine.Loader.PowerQueryToModelLoader.ApplyQueriesToModel(ILoadResultEvaluationProgressProvider evaluationProgressProvider, IExtendedModelChangeScope modelChangeScope, Action`1 beforeSchemaSyncCallback, Action`1 afterSchemaSyncCallback, Boolean& runRelationshipDetection, List`1& newTableColumnPairs, HashSet`1& existingTableInputs)
at Microsoft.PowerBI.Modeling.Engine.Loader.PowerQueryToModelLoader.ProcessLoadInputs(IRelationshipLoader relationshipLoader, IExtendedModelChangeScope modelChangeScope, Action`1 beforeSchemaSyncCallback, Action`1 afterSchemaSyncCallback)
at Microsoft.PowerBI.Modeling.Engine.Loader.PowerQueryToModelLoader.<>c__DisplayClass20_0.<PerformLoadInternal>b__0(IExtendedModelChangeScope modelChangeScope)
at Microsoft.PowerBI.Modeling.Engine.Authoring.AsyncModelAuthoringService.<>c__DisplayClass14_0.<RunExtendedModelChangeAsync>b__0()
at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.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 Microsoft.PowerBI.Modeling.Common.TaskExtensions.WaitAndUnpackException(Task task)
at Microsoft.PowerBI.Modeling.Engine.Loader.PowerQueryToModelLoader.PerformLoadInternal(IRelationshipLoader relationshipLoader, IModelAuthoringChangeScopeProvider authoringChangeScopeProvider, IModelingQueryServices queryServices, Action`1 beforeSchemaSyncCallback, Action`1 afterSchemaSyncCallback, IRefreshPolicyUpdater refreshPolicyUpdater, Boolean skipImpactAnalysisWarning)
at Microsoft.PowerBI.Modeling.Engine.Loader.PowerQueryToModelLoader.<>c__DisplayClass19_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__34.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__29.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__28.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__11.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.ModelingService.<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()
Hi @arunaj ,
Where did you get the error? Gateway, Power BI or other places? What did you do when you got the error?
Best Regards
I get this error in the PowerBI desktop but the same query works fine in kusto.
Hi @arunaj ,
Thanks for your reply. What did you do in Power BI Desktop when got the error? What looks like about the query you mentioned? Could you please provide the related code of query(mask sensitive data) if it is convenient? By the way, what data source you are connecting to? Kusto?
Please try to upgrade the version of your Power BI Desktop to latest one and check whether the problem still persist.
Best Regards
Yes, I am using the latest version of PBI desktop. Unfortunately, cannot share the query.. but happy to schedule a quick call if you are internal to MS. Let me know.
Hi @arunaj ,
Sorry for delay. As checked the threads in community, other person also face the same problem with you. And according to these information in threads, the problem may be caused by the version update of Power BI Desktop... Please try the method in the following thread and check whether it also work in your side. Thank you.
Sequence contains no matching element
Best Regards
Hey @arunaj ,
I recommend to get in touch with the vendor and open a support ticket.
Regards,
Tom
Can you connect me to a vendor please?