Table.Group 高级分组你会吗

源数据:
file
结果:
file
一个非常高级的分组

= Table.Group(更改的类型, {"车队", "自编号", "停机日期"}, {{"计数", each List.Last([停机日期]) }},0,(x,y)=>
                Number.From(not(x[车队]=y[车队] and x[自编号]=y[自编号] and 
                 Date.AddDays(y[停机日期],-List.PositionOf(更改的类型[停机日期],y[停机日期])) =  Date.AddDays(x[停机日期],-List.PositionOf(更改的类型[停机日期],x[停机日期])) )))

源:
file
第二步:
file
第三步
file

算法:
file
用新建列替代原日期进行分组:
file

其他样子:
分组前的样子:
file
分组后的样子:
file

= Table.Group(已添加索引, {"车队", "自编号", "停机日期", "索引"}, {{"计数", each List.Last([停机日期]) }},0,
                    (x,y)=>Number.From( not( x[车队]=y[车队] and x[自编号]=y[自编号] 
                                         and x[停机日期]-#duration(x[索引],0,0,0)=y[停机日期]-#duration(y[索引],0,0,0)))
                )

探索:
file
file
file
感觉?了