sandy666
07-11-2023, 04:12 PM
how can I get the data on the left to now have an empty row in between each room number?
OriginalResult
Room #RoomRoom #Room
a1kitchena1kitchen
a2bedroom
a3living rooma2bedroom
dining room
a4stairsa3living room
a5restroomdining room
powder
a6lobbya4stairs
a5restroom
powder
a6lobby
// Table1
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
FD = Table.FillDown(Table.DuplicateColumn(Source, "Room #", "Room # - Copy"),{"Room # - Copy"}),
Grp = Table.Group(FD, {"Room # - Copy"}, {{"All", each Table.InsertRows(_, Table.RowCount(_), {[#"Room #"=null, Room=null, #"Room # - Copy"=null]})}}),
RC = Table.RemoveColumns(Table.ExpandTableColumn(Grp, "All", {"Room #", "Room"}, {"Room #", "Room"}),{"Room # - Copy"})
in
RC
OriginalResult
Room #RoomRoom #Room
a1kitchena1kitchen
a2bedroom
a3living rooma2bedroom
dining room
a4stairsa3living room
a5restroomdining room
powder
a6lobbya4stairs
a5restroom
powder
a6lobby
// Table1
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
FD = Table.FillDown(Table.DuplicateColumn(Source, "Room #", "Room # - Copy"),{"Room # - Copy"}),
Grp = Table.Group(FD, {"Room # - Copy"}, {{"All", each Table.InsertRows(_, Table.RowCount(_), {[#"Room #"=null, Room=null, #"Room # - Copy"=null]})}}),
RC = Table.RemoveColumns(Table.ExpandTableColumn(Grp, "All", {"Room #", "Room"}, {"Room #", "Room"}),{"Room # - Copy"})
in
RC