Forum Discussion
FelipMark
2 years agoHelper II
Transform lines in columns
I havae the following table
| ID | DATE | QUESTION | ANSWER |
| 123 | 01/01/2023 | name | jorge |
| 123 | 01/01/2023 | age | 17 |
| 123 | 01/01/2023 | gender | male |
| 456 | 01/02/2023 | name | lara |
| 456 | 01/02/2023 | age | 24 |
| 456 | 01/02/2023 | gender | female |
I want to transform the rows into columns, like this:
| ID | DATE | NAME | AGE | GENDER |
| 123 | 01/01/2023 | jorge | 17 | male |
| 456 | 01/02/2023 | lara | 24 | female |
is an example, the table I have has 19 questions and when I use the dynamic columns option and select the option to not summarize the data, the following error appears:
Expression.Error: There were too many elements in the enumeration to complete the operation.
Details:
[List]
=Table.Pivot(YourTable,List.Distinct(YourTable[QUESTION]),"QUESTION","ANSWER",each _{0}?)
2 Replies
- wdx223_DanielCommunity Champion
=Table.Pivot(YourTable,List.Distinct(YourTable[QUESTION]),"QUESTION","ANSWER",each _{0}?)
- FelipMarkHelper II
Thank you!!!