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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
CEllis
Resolver I
Resolver I

Pivot Table

I have come across this error and seen it discussed here and would like to see if this makes sence ?

  •       Expression.Error: There weren't enough elements in the enumeration to complete the operation.

What I have noticed is that if a column that you are pivoting on has the same values as another column, it creates the error.

 

 If I pivot on this column it throws the error because the Lesson column has English as a value.I use this column as the non aggrigated values.
LessonAssessmentPoints
EnglishEnglish

4

EnglishEnglish Lit3
EnglishEnglish6

 

Many thanks

1 ACCEPTED SOLUTION
HotChilli
Super User
Super User

If you choose "Don't Aggregate" there are two values for the 'English' assessment.  2 into 1 does not go.

So you either use an aggregate or introduce another column e.g. an Index, to prevent aggregation

View solution in original post

2 REPLIES 2
HotChilli
Super User
Super User

If you choose "Don't Aggregate" there are two values for the 'English' assessment.  2 into 1 does not go.

So you either use an aggregate or introduce another column e.g. an Index, to prevent aggregation

Thanks for the response.

 

Ah think I have got it, the pivot acts like a group query were it needs to group on the other columns and aggrigates the value to stop it appearing on seprate rows.

 

I've added a key into the list and used Max, when I refresh the error has stopped.

 

CEllis_1-1669289800880.png

Many thanks @HotChilli 

 

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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 Solution Authors