问题:根据姓名和日期,横向排列考勤时间。
let
源 = Excel.CurrentWorkbook(){[Name="表1"]}[Content],
分组的行 = Table.Group(源, {"姓名", "日期"}, {"时间", each List.Sort([时间])}),
提取值 = Table.TransformColumns(分组的行, {"时间", each Text.Combine(List.Transform(_, Text.From), ",")}),
按分隔符拆分列 = Table.SplitColumn(提取值, "时间", Splitter.SplitTextByDelimiter(","), {"时间.1", "时间.2", "时间.3", "时间.4"}),
更改的类型 = Table.TransformColumnTypes(按分隔符拆分列,{{"时间.1", type number}, {"时间.2", type number}, {"时间.3", type number}, {"时间.4", type number}, {"日期", type date}}),
更改时间类型 = Table.TransformColumnTypes(更改的类型,{{"时间.1", type time}, {"时间.2", type time}, {"时间.3", type time}, {"时间.4", type time}})
in
更改时间类型
标签:排列,number,横向,考勤,时间,time,Table,type From: https://www.cnblogs.com/officeplayer/p/16770523.html