Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
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?
This, by Cam Wallace, seems to address your problem, in a more efficient way than other solutions.
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.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.