let
源 = Excel.CurrentWorkbook(){[Name="表1"]}[Content],
转置表 = Table.Transpose(源),
向下填充 = Table.FillDown(转置表,{"Column1", "Column2"}),
删除的列 = Table.RemoveColumns(向下填充,{"Column4"}),
A = Table.AddColumn(删除的列, "A", each Text.Combine(List.Select(({[Column1],[Column2],[Column3]}), each _<>null),"/")),
重排序的列 = Table.ReorderColumns(A,{"A", "Column1", "Column2", "Column3", "Column5", "Column6", "Column7", "Column8", "Column9"}),
删除的列1 = Table.RemoveColumns(重排序的列,{"Column1", "Column2", "Column3", "Column9"}),
提升的标题 = Table.PromoteHeaders(删除的列1, [PromoteAllScalars=true]),
转置表1 = Table.Transpose(提升的标题),
提升的标题1 = Table.PromoteHeaders(转置表1, [PromoteAllScalars=true]),
逆透视的其他列 = Table.UnpivotOtherColumns(提升的标题1, {"姓名"}, "属性", "值")
in
逆透视的其他列 |