cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
miketony Visitor
Visitor

How to deliminate multiple (>2) columns to coincide when separated?

I have some poorly structured reports that have multiple pieces of information stored in the same cell, I.E. 

 

Column 1 Column 2 Column 3 Column 4

x;y;z          a;b;c          1;2;3         #ID

x;y             a;b            1;3            #ID2

x;z             a;c             1;2            #ID3

 

I need to separate each cell, but keep the same ID and have it hopefully coincide with the other columns as well. 

IE

Column 1 Column 2 Column 3 Column 4

x               a                1              #ID

y               b                2             #ID

z               c                3              #ID

x               a                1               #ID2

y               b                3              #ID2

 

Is this even possible? This data is also consistent as in if there are 3 separate values in Column 1, Column 2 & 3 will also have 3 separate values. 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: How to deliminate multiple (>2) columns to coincide when separated?

@miketony 

 

You can add following custom column and then expand it to new rows

For null values you can use fill down

Please see attached file's Query Editor for the steps

 

=Table.FromColumns(
    {
    Text.Split([Column1],";"),
    Text.Split([Column2],";"),
    Text.Split([Column3],";"),
    Text.Split([Column4],";")
    }
                  )

 

View solution in original post

2 REPLIES 2
Nathaniel_C Super Contributor
Super Contributor

Re: How to deliminate multiple (>2) columns to coincide when separated?

Hi @miketony ,

 

In Power Query go to the home page, and choose split column by delimiter, and under advanced options split into rows. I highlighted the first column and did this. It seemed to work as you needed.  However you can only do 1 column at a time.  Doing one after another does not work.  Therefore  you might try make 3 copies of the table. In each copy keep only 1 col and the id col. Next do as I described above on the three tablea. Then merge the tables back together.  Seems like it will work!

 

Let us know how it goes, I have never used that option!

 


Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
Nathaniel

 

 

 

 

 

Split.PNG

 

Highlighted
Super User
Super User

Re: How to deliminate multiple (>2) columns to coincide when separated?

@miketony 

 

You can add following custom column and then expand it to new rows

For null values you can use fill down

Please see attached file's Query Editor for the steps

 

=Table.FromColumns(
    {
    Text.Split([Column1],";"),
    Text.Split([Column2],";"),
    Text.Split([Column3],";"),
    Text.Split([Column4],";")
    }
                  )

 

View solution in original post

Helpful resources

Announcements
Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Top Kudoed Authors
Users Online
Currently online: 451 members 3,988 guests
Please welcome our newest community members: