This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
hi,
i have data like this and want to create one column for all zip codes. I think I can split the codes into seperate columns but after that I'm stuck.
thank you
Solved! Go to Solution.
Hi @basel144
Download example PBIX with data shown below
First, right click on the column header and select Split Column -> By delimiter
Choose comma as the delimiter and Split At each occurrence
Which gives you this
Right click on the column header of the first column, and click on Unpivot Other Columns
Then tidy up by deleting the Attribute column and renaming the other columns
Regards
Phil
Proud to be a Super User!
Hi @basel144
Splitting the Address column by comma into several columns is a safe method if you don't expect more zip codes in the future than what you currently have for each location. For future-proofing, I would use Text.Split after extracting the zip codes from the address.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("Jcy9DsIgGIXhWzHM3wC0/I0a4+Rk3AgDIqlNDRhAr1/4ujzDe5JjLTmm8MrFLxGMEXRGOXFgycWv5eHTVntT1KBsyPb9/g01J9BCMYrhurb2jodbDhsozvvZUKBqyNh+XGJNGczUE4ZzTL9YQFPOzHAymE9lfS7xk0sDKiWV6IwKVBPn/g==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Address = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Address", type text}}),
#"Inserted Text After Delimiter" = Table.AddColumn(#"Changed Type", "Zip", each Text.AfterDelimiter([Address], ","), type text),
#"Added Custom" = Table.AddColumn(#"Inserted Text After Delimiter", "Split Zip", each Text.Split([Zip], ",")),
#"Split Zip" = Table.ExpandListColumn(#"Added Custom", "Split Zip"),
#"Removed Columns" = Table.RemoveColumns(#"Split Zip",{"Zip"}),
#"Extracted Text Before Delimiter" = Table.TransformColumns(#"Removed Columns", {{"Address", each Text.BeforeDelimiter(_, ","), type text}}),
#"Changed Type1" = Table.TransformColumnTypes(#"Extracted Text Before Delimiter",{{"Split Zip", type text}})
in
#"Changed Type1"
Hi @basel144
Splitting the Address column by comma into several columns is a safe method if you don't expect more zip codes in the future than what you currently have for each location. For future-proofing, I would use Text.Split after extracting the zip codes from the address.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("Jcy9DsIgGIXhWzHM3wC0/I0a4+Rk3AgDIqlNDRhAr1/4ujzDe5JjLTmm8MrFLxGMEXRGOXFgycWv5eHTVntT1KBsyPb9/g01J9BCMYrhurb2jodbDhsozvvZUKBqyNh+XGJNGczUE4ZzTL9YQFPOzHAymE9lfS7xk0sDKiWV6IwKVBPn/g==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Address = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Address", type text}}),
#"Inserted Text After Delimiter" = Table.AddColumn(#"Changed Type", "Zip", each Text.AfterDelimiter([Address], ","), type text),
#"Added Custom" = Table.AddColumn(#"Inserted Text After Delimiter", "Split Zip", each Text.Split([Zip], ",")),
#"Split Zip" = Table.ExpandListColumn(#"Added Custom", "Split Zip"),
#"Removed Columns" = Table.RemoveColumns(#"Split Zip",{"Zip"}),
#"Extracted Text Before Delimiter" = Table.TransformColumns(#"Removed Columns", {{"Address", each Text.BeforeDelimiter(_, ","), type text}}),
#"Changed Type1" = Table.TransformColumnTypes(#"Extracted Text Before Delimiter",{{"Split Zip", type text}})
in
#"Changed Type1"
Hi @basel144
Download example PBIX with data shown below
First, right click on the column header and select Split Column -> By delimiter
Choose comma as the delimiter and Split At each occurrence
Which gives you this
Right click on the column header of the first column, and click on Unpivot Other Columns
Then tidy up by deleting the Attribute column and renaming the other columns
Regards
Phil
Proud to be a Super User!
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 30 | |
| 24 | |
| 23 | |
| 17 | |
| 16 |
| User | Count |
|---|---|
| 61 | |
| 35 | |
| 29 | |
| 23 | |
| 22 |