Forum Discussion
ANU2
8 years agoNew Member
Convert columns into rows in an existing table
I am new in power bi. i have a question. my input like this: and i want the output like this: could you please help to find the equation? thanks in advance.
- 8 years ago
Hi ANU2,
Please locateto Query Editor mode, there, you could convert columns to rows via "Pivot".
First, duplicate [YEAR] and [AGE] columns.
Add an index column.
Select [Year-Copy] field, click the "Pivot Columns" button. Then, remove the [Index] column, you could get the desired output.
Best regards,
Yuliana Gu
v-yulgu-msft
Microsoft Employee
8 years agoHi ANU2,
Please locateto Query Editor mode, there, you could convert columns to rows via "Pivot".
First, duplicate [YEAR] and [AGE] columns.
Add an index column.
Select [Year-Copy] field, click the "Pivot Columns" button. Then, remove the [Index] column, you could get the desired output.
Best regards,
Yuliana Gu