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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
Igorpole
Helper I
Helper I

Column values to list (by delimiter)

Hi!

 

Let's say I have such a table:

 

RowID Value

Row1 a,b,c,d,a

Row2 a,c,c,c,c,a

Row3 a,c,f,h,j,r

 

It's very easy using UI split a "Value" column by delimiter (comma in this case) and get a bunch of new columns. But is it possible to get a list of the values splitted by delimiter? So the output should be:

 

RowID Value

Row1 List = {a, b, c, d, a}
Row2 List = {a, c, c, c, c, a}

Row3 List = {a, c, f, h, j, r}

 

Thank you!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

try this

 

let
    Origine = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WCsovN1TSUUrUSdJJ1knRSVSK1QELGoEFk6EQLmwMFU7TydDJ0ilSio0FAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [RowID = _t, Value = _t]),
    #"Modificato tipo" = Table.TransformColumnTypes(Origine,{{"RowID", type text}, {"Value", type text}}),
    #"Aggiunta colonna personalizzata" = Table.AddColumn(#"Modificato tipo", "list_Values", each Text.Split([Value],","))
in
    #"Aggiunta colonna personalizzata"

View solution in original post

1 REPLY 1
Anonymous
Not applicable

try this

 

let
    Origine = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WCsovN1TSUUrUSdJJ1knRSVSK1QELGoEFk6EQLmwMFU7TydDJ0ilSio0FAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [RowID = _t, Value = _t]),
    #"Modificato tipo" = Table.TransformColumnTypes(Origine,{{"RowID", type text}, {"Value", type text}}),
    #"Aggiunta colonna personalizzata" = Table.AddColumn(#"Modificato tipo", "list_Values", each Text.Split([Value],","))
in
    #"Aggiunta colonna personalizzata"

Helpful resources

Announcements
September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

Find out what's new and trending in the Fabric Community.