|
let
源 = Excel.CurrentWorkbook(){[Name="'1'!Database"]}[Content],
更改的类型 = Table.TransformColumnTypes(源,{{"Column1", type text}, {"Column2", type text}, {"Column3", type text}, {"Column4", type any}, {"Column5", type any}, {"Column6", type any}, {"Column7", type any}, {"Column8", type any}, {"Column9", type any}, {"Column10", type any}}),
提升的标题 = Table.PromoteHeaders(更改的类型, [PromoteAllScalars=true]),
更改的类型1 = Table.TransformColumnTypes(提升的标题,{{"IO ", Int64.Type}, {"PARTNO ", type text}, {"PART_REV", type text}, {"FROZEN_COS", type number}, {"PASTDUE ", Int64.Type}, {"13/12/2021 ", Int64.Type}, {"20/12/2021 ", Int64.Type}, {"27/12/2021 ", Int64.Type}, {"03/01/2022 ", Int64.Type}, {"10/01/2022 ", Int64.Type}}),
逆透视的其他列 = Table.UnpivotOtherColumns(更改的类型1, {"PASTDUE ", "FROZEN_COS", "PART_REV", "PARTNO ", "IO "}, "属性", "值"),
排序的行 = Table.Sort(逆透视的其他列,{{"属性", Order.Ascending}})
in
排序的行
1.数据-自表格导入PQ
2.如果第一行没有作为标题则,主页-将第一行作为标题
3.选中A-E列,右键-逆透视其他列
完成 |
|