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

The FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now

Reply
Hyuna_8000
Helper I
Helper I

How to split a single column into double columns, without a delimiter

Hi,

 

I have a table that has team name and team member in the same column:
Input:

Team1
Lily Zane
Danielle Garner
Martin Timberlake
 
Team2
Rachel Marie
Suzie Qu
 
Team3
Jason Chan
Sarah Alba

 

I was wondering if the column can be split into 2 columns, one is the team name, the other one is team member:

Output:

TeamMember Name
Team1 Lily Zane
Team1 Danielle Garner
Team1 Martin Timberlake
Team2Rachel Marie
Team2Suzie Qu
Team3Jason Chan
Team3Sarah Alba

 

This is a tricky one because it cannot be seperated by delimiter etcs, any ideas would be much appreciated.

 

Thanks

1 ACCEPTED SOLUTION
Vijay_A_Verma
Most Valuable Professional
Most Valuable Professional

See the working here - Open a blank query - Home - Advanced Editor - Remove everything from there and paste the below code to test

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("VYy9CgJBDIRfJWxtoz6BKAiihXqVyxZzEthgLkLOK/TpPbOVzTA/H5Nz6hjDMpVFTkfRN91gHGkHE1Zl2sONPboT/CVGnQw9u+LRyJDfzSrcBffKSjMrbb9OH2E6T//wOtwB49NoW2ENhaPSRnukUr4=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Input = _t]),
    #"Filtered Rows" = Table.SelectRows(Source, each ([Input] <> "" and [Input] <> null)),
    #"Added Custom" = Table.AddColumn(#"Filtered Rows", "Team", each if Text.StartsWith([Input], "Team") then [Input] else null),
    #"Filled Down" = Table.FillDown(#"Added Custom",{"Team"}),
    #"Filtered Rows1" = Table.SelectRows(#"Filled Down", each not Text.StartsWith([Input], "Team")),
    #"Renamed Columns" = Table.RenameColumns(#"Filtered Rows1",{{"Input", "Member Name"}}),
    #"Reordered Columns" = Table.ReorderColumns(#"Renamed Columns",{"Team", "Member Name"})
in
    #"Reordered Columns"

 

View solution in original post

2 REPLIES 2
Vijay_A_Verma
Most Valuable Professional
Most Valuable Professional

See the working here - Open a blank query - Home - Advanced Editor - Remove everything from there and paste the below code to test

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("VYy9CgJBDIRfJWxtoz6BKAiihXqVyxZzEthgLkLOK/TpPbOVzTA/H5Nz6hjDMpVFTkfRN91gHGkHE1Zl2sONPboT/CVGnQw9u+LRyJDfzSrcBffKSjMrbb9OH2E6T//wOtwB49NoW2ENhaPSRnukUr4=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Input = _t]),
    #"Filtered Rows" = Table.SelectRows(Source, each ([Input] <> "" and [Input] <> null)),
    #"Added Custom" = Table.AddColumn(#"Filtered Rows", "Team", each if Text.StartsWith([Input], "Team") then [Input] else null),
    #"Filled Down" = Table.FillDown(#"Added Custom",{"Team"}),
    #"Filtered Rows1" = Table.SelectRows(#"Filled Down", each not Text.StartsWith([Input], "Team")),
    #"Renamed Columns" = Table.RenameColumns(#"Filtered Rows1",{{"Input", "Member Name"}}),
    #"Reordered Columns" = Table.ReorderColumns(#"Renamed Columns",{"Team", "Member Name"})
in
    #"Reordered Columns"

 

Thanks @Vijay_A_Verma , it works!

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.