问题:一列数据,每7行为一组数据,每组数据横向排列,标题独立。
let
源 = Excel.CurrentWorkbook(){[Name="表1"]}[Content],
加索引 = Table.AddIndexColumn(源, "索引"),
区分组 = Table.RemoveColumns(Table.FillDown(Table.AddColumn(加索引, "组", each if Text.Start([列1], 1) = "=" then [索引] else null), {"组"}),{"索引"}),
删除行 = Table.SelectRows(区分组, each (Text.Start([列1], 1) <> "=")),
拆分列 = Table.SplitColumn(删除行, "列1", Splitter.SplitTextByDelimiter(":"), {"列1", "列2"}),
透视列 = Table.Pivot(拆分列, List.Distinct(拆分列[列1]), "列1", "列2"),
加序号 = Table.AddIndexColumn(Table.RemoveColumns(透视列,{"组"}), "序号", 1),
重排列 = Table.ReorderColumns(加序号,{"序号", "发送时间", "应答", "响应", "传输时间", "状态"})
in
重排列
标签:Power,分列,索引,二维,一列,Table,序号,Query,Start From: https://www.cnblogs.com/officeplayer/p/17133472.html