Forum Discussion

LukeReds's avatar
LukeReds
Helper II
1 year ago
Solved

Transform a table with n rows in a single cell for every guy

Hi to everyone, i have this table, an empty cell divide one guy from the other (of course there are several guys in the table, not only 2)     I need to have this data using only power query...
  • Omid_Motamedise's avatar
    1 year ago

    Use this code

     

    let
        Source = Excel.CurrentWorkbook(){[Name="Table3"]}[Content],
        #"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}}),
        #"Grouped Rows" = Table.Group(#"Changed Type", {"Column1"}, {{"Count", each Text.Combine([Column1],"#(lf)"), type nullable text}},0,(a,b)=>Number.From(b[Column1]=null))
    in
        #"Grouped Rows"

     

     

    result in