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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
andrearuggeri
Helper I
Helper I

Pivot column error

Hi all,

 

I have this dataset imported from Sharepoint and I need to pivot for "Question Caption" column

 

andrearuggeri_0-1707302520027.png

 

but when I do it, with "RealAnswer" as Value and Don't aggregate option, I get this error on the "Attività svolta" new column

andrearuggeri_1-1707302650526.png

 

andrearuggeri_2-1707302737362.png

 translation is "There were too many elements in the enumeration to complete the operation"

 

What's the problem?

 

Thanks in advance!!!

1 ACCEPTED SOLUTION

yes there are multiple ways to do that.

 

Option 1 is to add 1 from the "Attività svolta" if there is a duplicate before pivoting.

Option 2 is to put together the answers in one row for "Attività svolta" if there is any duplicate before pivoting.

 

View solution in original post

5 REPLIES 5
mussaenda
Super User
Super User

Hi @andrearuggeri ,

 

one of the possible reasons is, there is a duplicate value for that person. have you checked if there are any duplicates?

Hi @mussaenda and thank you for your reply.

For sure there are duplicates, the field "Attività svolta" has few options as answers, so for different visits (CallID column) there may be the same value.

 

However if you look at the screenshot, the first x lines contain the same "Visual Merchandising" value for that column, the problem occur when the value changes, in the error field there should be a different value.

Hi @andrearuggeri ,

 

Pivot only works for single value and cannot be aggregated. 

If the row "Attività svolta" for that specific person then it will return as error.

 

check this link that tackles  the issue that you are facing. it is in the last part of this link

Pivot columns - Power Query | Microsoft Learn

 

OMG

Is there an alternative way?

What I need to achieve is to have values from "Question caption" as new columns and values from "RealAnswer" as actual values for each row (exactly what pivot does)

yes there are multiple ways to do that.

 

Option 1 is to add 1 from the "Attività svolta" if there is a duplicate before pivoting.

Option 2 is to put together the answers in one row for "Attività svolta" if there is any duplicate before pivoting.

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.