Share via

Power Query Split Column by Delimiter

Anonymous
2022-11-23T11:52:06+00:00

I have a column that I'm splitting by delimiter (i.e., /) in Power Query. After execution, it splits into 10 columns, 7 containing nothing but null values. Based on the delimiter, there should only be 3 columns. Why is this happening?

Microsoft 365 and Office | Excel | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

riny 20,870 Reputation points Volunteer Moderator
2022-11-23T13:03:18+00:00

Most likely, the very first time you created the query there were 10 columns. PQ created M code like this:

#"Split Column by Delimiter" = Table.SplitColumn(Source, "Column1", Splitter.SplitTextByDelimiter("/", QuoteStyle.Csv)**, {"Column1.1", "Column1.2", "Column1.3", "Column1.4", "Column1.5", "Column1.6", "Column1.7", "Column1.8", "Column1.9", "Column1.10"}**)

Remove everting that is red/bolded and next time PQ will split the column based on whatever number of delimiters it finds.

Was this answer helpful?

2 people found this answer helpful.
0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Anonymous
    2022-11-23T14:10:32+00:00

    Not sure, but I'll take your word on it. Thanks.

    Was this answer helpful?

    0 comments No comments