Forum Discussion

dannytan111289's avatar
dannytan111289
Frequent Visitor
5 years ago
Solved

Move every other column into new row

Hi everyone,    i really need your help.  i have set of data with repeated column every 8 columns. I would like to move 21 rows of every 8 column under the row of the first set of data.   Any ide...
  • v-kelly-msft's avatar
    5 years ago

    Hi  dannytan111289 ,

     

    As in power bi ,we cant index columns directly,from my point of view,I would recommend you that first duplicate table then remove columns respectively.

    Take below table for example:

    Split the table into 2 tables as below:

    Then rename the column names in the second table to keep the same with the first one:

    = Table.RenameColumns(Table.RenameColumns(#"Removed Other Columns",{"Phone","CustomerID"}),{"Sex","Name"})

    In the last step,using append to get your expected output:

    For the related .pbix file,pls see attached.

     

    Best Regards,
    Kelly

    Did I answer your question? Mark my reply as a solution!