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
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
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.