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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
AER
Frequent Visitor

Every other row to new column

Hi, 

 

I try to split one comlumn into two coulums, with less rows

 

I have this:

Row      Column1   Column2

1             1234           0

2             ABCD          0

3             4321           1

4             DCBA          1

5             2341           2

6             BCDA          2

 

Want this:

Row      Column1   Column3

1             1234           ABCD

2             4321           DCBA

3             2341           BCDA

 

Is there any way of doing this?

Thanks

1 ACCEPTED SOLUTION
cs_skit
Resolver IV
Resolver IV

Go to PowerQuery (via "edit queries")

Copy Table

Delete Alternate Rows in both

Join Tables by Column 2 into new table

View solution in original post

3 REPLIES 3
cs_skit
Resolver IV
Resolver IV

Go to PowerQuery (via "edit queries")

Copy Table

Delete Alternate Rows in both

Join Tables by Column 2 into new table

Anonymous
Not applicable

I followed the solution. However I have 3 "types of rows" "Value", "SD", "Source" and I want to turn them into 3 columns. this means I had to create to copies of my original table and delete alternate rows in all three tables.

 

Then I joined them all in a new query by the matching column. However when I applied changes, the resulting model had all 4 tables present. Surely all this redundancy can be avoided, I would like my model to only have the final joined table in it.

 

However if I delete the 3 original tables, the joined table breaks because it is using them as reference.

 

This makes me think that I need to perform all the trasnformations within the original table if I want to avoid redundancy?

AER
Frequent Visitor

Of course, that worked very well, thanks!

Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

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