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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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