let
源 = Excel.CurrentWorkbook(){[Name="表1"]}[Content],
自定义1 = Table.Group(源,"销售经理",{">10的日期",each
try Table.SelectRows(
Table.Buffer(
Table.Sort(
let a=Table.AddIndexColumn(_,"索引",0) in
Table.AddColumn(a,"L",each
List.Sum(
Table.SelectRows(a,(t)=> t[索引]<=[索引])[金额])
),
{{"销售日期",0}})),
each [L]>=10){0}[销售日期] otherwise "无"
}),
筛选的行 = Table.SelectRows(自定义1, each [#">10的日期"] <> "无"),
更改的类型 = Table.TransformColumnTypes(筛选的行,{{">10的日期", type date}})
in
更改的类型