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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
jblackcitrin
Frequent Visitor

One group of rows showing too many elements in the enumeration error

I did a left outer join on two queries based on a number. The expanded table has a column with four repeating values. I pivoted that column without aggregating.

 

The pivot works fine except for one group of entries. I get the error "Expression.Error: There were too many elements in the enumeration to complete the operation."

 

I am able to run the query but the rows for that group show blanks on the pivoted columns.

 

I reviewed other people's posts with this issue but none cover when this error is selective. I don't have any duplicate column names in my data sources.

 

Any idea what could be causing this?

2 REPLIES 2
ronrsnfld
Super User
Super User

This, by Cam Wallace, seems to address your problem, in a more efficient way than other solutions.

 

HotChilli
Super User
Super User

Suggest you post a small sample of data in text form showing what the data looks like before the pivot and then what you want it to look like after.

A pivot tries to create rows based on the data in the table.  When 'Don't aggregate' is chosen and there are duplicate values that it can't separate with other data (e.g. with an index) it throws this error.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors