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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
benice25
Frequent Visitor

Error Processing Dataset - Not enough elements for Enumeration

So I have a couple questions about this, because I can make changes in power query, the refresh works, I deploy to the online service, and turn on scheduled refreshes, and everything is fine and dandy, until one day it just starts throwing errors like this...

 

  1. Why does this all of a sudden start happening?
  2. After looking at the error, it says the problem is in the table: story, so I went to that table and went through every step to see where it was erroring out, but there are no errors in that table. None of the other tables in Power Query Editor have errors either, so how am I supposed to fix this?
Data source error{"error":{"code":"DM_GWPipeline_Gateway_MashupDataAccessError","pbi.error":{"code":"DM_GWPipeline_Gateway_MashupDataAccessError","parameters":{},"details":[{"code":"DM_ErrorDetailNameCode_UnderlyingErrorCode","detail":{"type":1,"value":"-2147467259"}},{"code":"DM_ErrorDetailNameCode_UnderlyingErrorMessage","detail":{"type":1,"value":"There weren't enough elements in the enumeration to complete the operation."}},{"code":"DM_ErrorDetailNameCode_UnderlyingHResult","detail":{"type":1,"value":"-2147467259"}},{"code":"Microsoft.Data.Mashup.ValueError.Detail","detail":{"type":1,"value":"{error \"Microsoft.Mashup.Engine1.Runtime.ValueException: [Expression.Error] Value was not specified.#(cr)#(lf) at Microsoft.Mashup.Engine1.Language.ValueCreator.CreateValueForNotImplemented(INotImplementedExpression expression)#(cr)#(lf) at Microsoft.Mashup.Engine1.Runtime.ListValue.DemandArrayListValue.get_Item(Int32 index)#(cr)#(lf) at Microsoft.Data.Mashup.ProviderCommon.MashupResource.TryGetValue(Func`1 getValue, IValue& value, String& errorMessage)#(cr)#(lf)Record\"}"}},{"code":"Microsoft.Data.Mashup.ValueError.Reason","detail":{"type":1,"value":"Expression.Error"}}],"exceptionCulprit":1}}} Table: Story.
1 ACCEPTED SOLUTION

So I figured out what was causing it at least, not sure on 100% root cause, but no PIVOT is included. It was an error in a date column that was treating the date value as a list.

 

PowerBI gave no insight to this, the only way I found it was when I was looking at the columns and the dropdown where you can select a column filter value, it has the, "Load more options" button so it can go and get all possible values so you can filter something, it would throw the error there. So I went column by column, step by step, until I found the one step that was causing this to happen. Deleted it, and then selected all dates and removed errors.

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi  @benice25 ,

 

"Too many elements in the enumeration to complete..."

The above error could occur when you pivot columns with same name, please check column names in your data source. 

Here's a video teaches you:

How to fix the "Too many elements in the enumeration to complete..." pivot error in Power ...

 

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

So I figured out what was causing it at least, not sure on 100% root cause, but no PIVOT is included. It was an error in a date column that was treating the date value as a list.

 

PowerBI gave no insight to this, the only way I found it was when I was looking at the columns and the dropdown where you can select a column filter value, it has the, "Load more options" button so it can go and get all possible values so you can filter something, it would throw the error there. So I went column by column, step by step, until I found the one step that was causing this to happen. Deleted it, and then selected all dates and removed errors.

benice25
Frequent Visitor

Now I tried to run it again and got the opposite error, too many elements to enumerate. This is incredibly frustrating that it throws errors but then tells you nothing about how to solve them.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.