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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Mat42
Helper III
Helper III

Dataflow Updating Error "Too many elements in the enumeration"

I've found this error in various different posts ut I don't understand any of the explanations. If my issue is explained elsewhere, feel free to point me at it:

 

I've created a dataflow with multiple tables, one of which is not updating at is throwing up the following error:

Error: Expression.Error: There were too many elements in the enumeration to complete the operation. {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"}. RootActivityId = ea9b90e9-ab80-4b40-9e48-c9e6e43e40b3.Param1 = Expression.Error: There were too many elements in the enumeration to complete the operation. {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"} Request ID: 3d01500d-9fc2-7bfb-b8a2-d95719bb27fa.

 

The table in question is the result of a merge.

 

The tables aren't complicated, nor are the transformation steps. This error only occurs when updating the dataflow. The table updates fine when Power Query is open (the online dataflow creation version) it only crashes when updating it from the workspace. 

 

The transformation steps in the 2 tables are simply removing columns, pivotting columns, renaming columns etc.

1 ACCEPTED SOLUTION
Mat42
Helper III
Helper III

@lbendlin I actually figured this out yesterday afternoon.

 

The 'Enumeraton error' was caused by the pivot. We had a duplicate entry that was folding more than one entry into a cell causing an error. We didn't expect a duplicate entry and obviously the pivot worked but just errored out that row. We couldn't see the error as it was only one in 16k rows and the columns filters didn't see it, I presume because it occured too far through the dataset to be picked up.

 

The merge worked fine because, again, it was just a row with an error, but when we updated the dataflow outside of PowerQuery the JSON fell over and told us we had an error but, as with most Microsft error messages, it wasn't helpful in finding it.

 

The upshot of this is that I now understand the term 'Too many elements in the enumeration'.

View solution in original post

2 REPLIES 2
Mat42
Helper III
Helper III

@lbendlin I actually figured this out yesterday afternoon.

 

The 'Enumeraton error' was caused by the pivot. We had a duplicate entry that was folding more than one entry into a cell causing an error. We didn't expect a duplicate entry and obviously the pivot worked but just errored out that row. We couldn't see the error as it was only one in 16k rows and the columns filters didn't see it, I presume because it occured too far through the dataset to be picked up.

 

The merge worked fine because, again, it was just a row with an error, but when we updated the dataflow outside of PowerQuery the JSON fell over and told us we had an error but, as with most Microsft error messages, it wasn't helpful in finding it.

 

The upshot of this is that I now understand the term 'Too many elements in the enumeration'.

lbendlin
Super User
Super User

what is the cardinality of the tables that you are merging?

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors
Top Kudoed Authors