cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
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
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

January 2020 Community Highlights

January 2020 Community Highlights

Make sure you didn't miss any of the things that happened in the community in January!

Difinity Conference

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors