Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
dannytan111289
Frequent Visitor

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 ideas how i can solved this problem?

 

Thanks

 

 

 

image_2021_09_02T08_16_37_884Z.png

1 ACCEPTED SOLUTION
v-kelly-msft
Community Support
Community Support

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:

vkellymsft_0-1630917246876.png

Split the table into 2 tables as below:

vkellymsft_1-1630917273378.pngvkellymsft_2-1630917281017.png

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:

vkellymsft_3-1630917364721.png

For the related .pbix file,pls see attached.

 

Best Regards,
Kelly

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

View solution in original post

2 REPLIES 2
v-kelly-msft
Community Support
Community Support

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:

vkellymsft_0-1630917246876.png

Split the table into 2 tables as below:

vkellymsft_1-1630917273378.pngvkellymsft_2-1630917281017.png

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:

vkellymsft_3-1630917364721.png

For the related .pbix file,pls see attached.

 

Best Regards,
Kelly

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

lbendlin
Super User
Super User

Please provide sample data in usable format (not as a picture - maybe insert into a table?) .

Helpful resources

Announcements
September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

Find out what's new and trending in the Fabric Community.