Forum Discussion
priyashah
8 years agoNew Member
Splitting multiple columns using delimiter
I have table table which has 2 columns, both with a delimiters. I need to split the columns into rows using the delimiters, but maintain the matching sequence between the 2 columns. For example:...
- 8 years ago
Hi priyashah
Try applying the following steps:
1. Transpose the table
2. Split the column by delimiter
3.Promote first row to headers
4. Unpivot all the columns
The solution will give you the result you need for the given example.
You can also try another method.The steps are:1. Add custom column to split Column1 (Using Text.Split())
2. Add custom column to split Column2(Using Text.Split())
3. Combine the above two list to form a table (Using Table.FromColumns() )
4. Click the expand icon ( ) in the column header
5. Select the columns you want to keep and remove others
Syntax for Text.Split() Function: Text.Split([Column Name],"delimiter")
Syntax for Table.FromColumns() Function: Table.FromColumns({[Column Name1],[Column Name2],....})
Hope this solution is useful.Regards
Rohit
Anonymous
7 years agoNot applicable
I used this Power Query code to solve a similar problem (however with #lf) during a pdf extraction.
Greetings.