Forum Discussion
Expression.Error at pivot column step
Hi tgjones43 ,
By my research, the above error may also occur when you pivot columns with same name, please check column names in your data source. And there is a similar thread for your reference.
Best Regards,
Cherry
- tgjones437 years agoHelper IV
Hi v-piga-msft
Thanks for your advice, but I don't think this applies to my case. A few more details - the column that is being pivoted has 3 unique values, none of which match the names of columns that already exist in the table, so I think that rules out your explanation?
If I filter out 2 of those values, so there is just 1 unique name in the pivoted column, the error disappears and the pivot works. If I filter out just 1 of the names, leaving 2 in the column, the error is still present.
Does that provide any clues?
- tgjones437 years agoHelper IV
Should anyone else have this problem, it turns out I had some duplicated rows in my dataset. Removing these before the pivot step solved the issue.