|
let
Source = Excel.CurrentWorkbook(){[Name="表1"]}[Content],
SetDateToInt = Table.TransformColumnTypes(Source,{{"任务开始", Int64.Type}, {"任务结束", Int64.Type}}),
GetDateArray = Table.AddColumn(SetDateToInt, "DateArray", each List.Transform({[任务开始]..[任务结束]}, (x)=>x)),
Result = Table.Group(GetDateArray,"姓名", {"RestDays", each List.Max(List.Distinct(List.Combine([DateArray]))) - List.Min(List.Distinct(List.Combine([DateArray]))) - List.Count(List.Distinct(List.Combine([DateArray]))) + 1 })
in
Result |
评分
-
1
查看全部评分
-
|