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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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