Forum Discussion
Dan_TWE
May 14, 2026Copper Contributor
A little help on text grouping delimited by nulls in a data set in power query
A have a column in power query: null line of text line of text line of text null The number of rows with lines of text can vary, but each "text block" is delimited by column entries at the t...
Riny_van_Eekelen
May 16, 2026Platinum Contributor
Nice, but not sure why you add the complexity of grouping into a column of records with nested tables. Perhaps I misunderstood the OP's problem, though I believe the code below achieves the same result. Just added a filter step at the end, removing the blank rows.
let
Source = Excel.CurrentWorkbook(){[Name="Tabelle2"]}[Content],
#"Added Custom" = Table.AddColumn(Source, "Custom", each if [Column] = null then null else "x"),
#"Grouped Rows" = Table.Group(#"Added Custom", {"Custom"}, {{"Grouped", each Text.Combine([Column], " "), type nullable text}}, GroupKind.Local),
#"Removed Other Columns" = Table.SelectColumns(#"Grouped Rows",{"Grouped"}),
#"Filtered Rows" = Table.SelectRows(#"Removed Other Columns", each [Grouped] <> "")
in
#"Filtered Rows"