根据多个条件合并行,然后对一列求和

Combine rows based on multiple criteria and then sum one column

当 A、B、C、D、F 列匹配时将行分组(D 可以为空但仍被视为匹配),然后对 "Qty" 列求和。

我可以 FILTER 也可以 SUM,但我似乎不能两者兼顾。

这个公式会在'estimate-Tally'!A2

=QUERY(QUERY(A2:X6, 
 "select A,B,C,' ','  ',F,sum(G),H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X 
  where A is not null 
  group by A,B,C,' ','  ',F,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X", 0),
 "offset 1", 0)