Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Split column by delimiter

Hi I would like to confirm how to split multiple columns by delimiter.

The requirement I want to realise is as below.

 

Tiffany_Jo_0-1677461315672.png

Requirement:

Tiffany_Jo_1-1677461439800.png

 

1 ACCEPTED SOLUTION
danextian
Super User
Super User

Hi @Anonymous ,

 

Please try the following:

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45Wci/KLy1QMFTSUXLMy0uMyXNJLMtMickLLi1OzAMKOpUWZ+alFhcDJVITczLz0oFSGfkFSrGxAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t, Column2 = _t, Column3 = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}, {"Column2", type text}, {"Column3", type text}}),
    #"Added Custom" = Table.AddColumn(#"Changed Type", "Name", each Text.Split([Column2], "#(lf)") ),
    #"Added Custom1" = Table.AddColumn(#"Added Custom", "Department", each Text.Split([Column3],"#(lf)")),
    #"Added Custom2" = Table.AddColumn(#"Added Custom1", "Custom", each List.Zip({[Name],[Department]})),
    #"Expanded Custom" = Table.ExpandListColumn(#"Added Custom2", "Custom"),
    #"Added Custom3" = Table.AddColumn(#"Expanded Custom", "Custom.1", each Text.Combine([Custom], "_")),
    #"Removed Columns" = Table.RemoveColumns(#"Added Custom3",{"Column2", "Column3", "Name", "Department", "Custom"}),
    #"Split Column by Delimiter" = Table.SplitColumn(#"Removed Columns", "Custom.1", Splitter.SplitTextByDelimiter("_", QuoteStyle.Csv), {"Name", "Department"}),
    #"Changed Type1" = Table.TransformColumnTypes(#"Split Column by Delimiter",{{"Name", type text}, {"Department", type text}}),
    #"Renamed Columns" = Table.RenameColumns(#"Changed Type1",{{"Column1", "Group"}})
in
    #"Renamed Columns"

danextian_0-1677464192739.png

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

2 REPLIES 2
danextian
Super User
Super User

Hi @Anonymous ,

 

Please try the following:

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45Wci/KLy1QMFTSUXLMy0uMyXNJLMtMickLLi1OzAMKOpUWZ+alFhcDJVITczLz0oFSGfkFSrGxAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t, Column2 = _t, Column3 = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}, {"Column2", type text}, {"Column3", type text}}),
    #"Added Custom" = Table.AddColumn(#"Changed Type", "Name", each Text.Split([Column2], "#(lf)") ),
    #"Added Custom1" = Table.AddColumn(#"Added Custom", "Department", each Text.Split([Column3],"#(lf)")),
    #"Added Custom2" = Table.AddColumn(#"Added Custom1", "Custom", each List.Zip({[Name],[Department]})),
    #"Expanded Custom" = Table.ExpandListColumn(#"Added Custom2", "Custom"),
    #"Added Custom3" = Table.AddColumn(#"Expanded Custom", "Custom.1", each Text.Combine([Custom], "_")),
    #"Removed Columns" = Table.RemoveColumns(#"Added Custom3",{"Column2", "Column3", "Name", "Department", "Custom"}),
    #"Split Column by Delimiter" = Table.SplitColumn(#"Removed Columns", "Custom.1", Splitter.SplitTextByDelimiter("_", QuoteStyle.Csv), {"Name", "Department"}),
    #"Changed Type1" = Table.TransformColumnTypes(#"Split Column by Delimiter",{{"Name", type text}, {"Department", type text}}),
    #"Renamed Columns" = Table.RenameColumns(#"Changed Type1",{{"Column1", "Group"}})
in
    #"Renamed Columns"

danextian_0-1677464192739.png

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
amitchandak
Super User
Super User

@Anonymous , Thhse are steps after data has been added, My column names are subject and marks and separator is comma (,)

 

added a new column and then expanded and deleted other columns

 

 

#"Added Custom" = Table.AddColumn(#"Promoted Headers", "Zip", each let

_break = List.Zip( {Text.Split([Subject],","), Text.Split([Marks],",")} ),
_Trans = List.Transform(_break, each Record.FromList(_, {"Subject", "Marks"}))
in
_Trans),
#"Expanded Zip" = Table.ExpandListColumn(#"Added Custom", "Zip"),
#"Expanded Zip1" = Table.ExpandRecordColumn(#"Expanded Zip", "Zip", {"Subject", "Marks"}, {"Zip.Subject", "Zip.Marks"}),
#"Removed Columns" = Table.RemoveColumns(#"Expanded Zip1",{"Subject", "Marks"})

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors