Forum Discussion

FelipMark's avatar
FelipMark
Helper II
2 years ago
Solved

Transform lines in columns

I havae the following table

IDDATEQUESTIONANSWER
12301/01/2023namejorge
12301/01/2023age17
12301/01/2023gendermale
45601/02/2023namelara
45601/02/2023age24
45601/02/2023genderfemale


I want to transform the rows into columns, like this:

IDDATENAMEAGEGENDER
12301/01/2023jorge17male
45601/02/2023lara24female


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_Daniel's avatar
    wdx223_Daniel
    Community Champion

    =Table.Pivot(YourTable,List.Distinct(YourTable[QUESTION]),"QUESTION","ANSWER",each _{0}?)