我在 Google 表格中为我的订单创建了一个摘要,并且能够做到这一点。
=QUERY('2021'!A1:AA5000, "select D,G,
count(V) where V is not null and V ='Shipped' and G ='NAJ' and D ='January'
group by D,G
label count(V) 'Total Orders'")
我想让 V、G 和 D 值不被硬编码,而是可以从下拉列表中选择。在互联网上搜索了半天,没有任何帮助。
尝试这个:
=QUERY('2021'!A1:AA5000, "select D,G, count(V) where V is not null and V ='"&X1&"' and G ='"&X2&"' and D ='"&X3&"' group by D,G label count(V) 'Total Orders'")
哪里X1
,X2
和X3
是您的单元格引用。
要获得所有月份,请尝试:
=QUERY('2021'!A:AK, "select D,G, count(V) where V is not null and V ='Shipped' and G ='"&$D$4&"' and D "&if(E3=true,"is not null","='"&$D$3&"'")&" group by D,G label count(V) 'Total Orders'")
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句