cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
miketony
Regular 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
Super User III
Super User III

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],";")
    }
                  )

 

Try my new Power BI game Cross the River

View solution in original post

2 REPLIES 2
Super User IV
Super User IV

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

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Super User III
Super User III

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],";")
    }
                  )

 

Try my new Power BI game Cross the River

View solution in original post

Helpful resources

Announcements
New Ranks Launched March 24th!

New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

‘Better Together’ Contest Finalists Announced!

‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Arun 'Triple A' Event Video, Q&A, and Slides

Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

Join THE global Microsoft Power Platform event series.

Join THE global Power Platform event series.

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors