Forum Discussion
tgjones43
Helper IV
7 years agoExpression.Error at pivot column step
Hi all I am getting this error message after a pivot column query: Expression.Error: There were too many elements in the enumeration to complete the operation Details: List which a...
Anonymous
4 years agoNot applicable
I had the same problem and figured out, that it is really important to read the instructions carefully. You can find in the bottom the explanation for "Error with the Don't Aggregate option".
You need at least one column, which consists the same value for all the rows, that should be combined to a new row in the new table. Power BI needs this to even know, what belongs to each other. To understand further, you can imagine, that the ordering of the table is not fixed. So any Project Name could belong to any Responsible if you mix up the table.
Pivoting the follwing table will fail:
| Column 1 | Column 2 |
| Project Name | Project 1 |
| Responsible | Person 1 |
| Project Name | Project 2 |
| Responsible | Person 2 |
To fix it add a column, that you can pivot the table as follows:
| Identifier | Column 1 | Column 2 |
| ID 1 | Project Name | Project 1 |
| ID 1 | Responsible | Person 1 |
| ID 2 | Project Name | Project 2 |
| ID 2 | Responsible | Person 2 |
It will result in:
| Identifier | Proejct Name | Responsible |
| ID 1 | Project 1 | Person 1 |
| ID 2 | Project 2 | Person 2 |