Forum Discussion
Splitting Column data into columns under Specific Text/Headers
Hello,
I need help splitting column text data separated by semi-colons into columns. The challenge is that the cells' data are randomly stored in the cells i.e 1st data in cell A1 may be the 2nd in cell B1, and since the options vary. Splitting them using the basic delimiter option didn't produce consistent data in each column. I want to automatically be able to add the options under the appropriate column header once the data is refreshed in PBI i.e Traffic coordination, Good/Stable soil, Schedule performance etc. all go under the respective columns.
Any help will be appreciated.
The data column to be split is shown below.
| Project No | Issues Encountered |
| 1 | Bad Weather |
| 2 | Bad Weather; Field Support |
| 3 | Traffic coordination; Field support |
| 4 | Unstable/Bad soil; Field support; Safety & Security |
| 5 | Low Traffic; Schedule Performance; Safety & Security |
Result:
| Project No | Bad Weather | Field Support | Unstable/Bad soil | Traffic coordination | Low Traffic | Safety & Security | Schedule Performance |
| 1 | Yes | ||||||
| 2 | Yes | Yes | |||||
| 3 | Yes | Yes | |||||
| 4 | Yes | Yes | Yes | ||||
| 5 | Yes | Yes | Yes |
- Anonymous5 years ago
Hi fuulhouse ,
Based on your description, you could do some steps in Power Query editor.
Result:
Hope that's what you were looking for.
Best Regards,
Yuna
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
5 Replies
- Greg_DecklerCommunity Champion
fuulhouse Even M can't always fix garbage data...
- fuulhouseFrequent Visitor
Greg_Deckler, there is always a fix.
- Greg_DecklerCommunity Champion
fuulhouse Post some sample data as text in a table and somebody might try. I am thinking, add an Index column. Split out your column by semi-colon. Unpivot. Sort by Index and then secondary sort by the Value column. Something, something something...
- AnonymousNot applicable
Hi fuulhouse ,
Based on your description, you could do some steps in Power Query editor.
Result:
Hope that's what you were looking for.
Best Regards,
Yuna
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- fuulhouseFrequent Visitor
Anonymous
Thank you. This works.