簡體   English   中英

我想在 arrayformula 中使用這個查詢

[英]I want to use this query in an arrayformula

=iferror(QUERY(importorders!A:H,“Select count(A) where C = ‘Thailand Tour’ and month(H) = “&MONTH(A3)-1&“and year(H) = “&year(A3)&” label count(A) ‘’“,1),0)

基本上只是計算我每個月有多少訂單。

https://docs.google.com/spreadsheets/d/1Of6cdFYaOzCFwPdZ4ABItD6dghMjHhafRWmDJWaznbg/edit#gid=711075203

在此處輸入圖片說明

B3單元格中使用它:

=ARRAYFORMULA(IFNA(VLOOKUP(A3:A, QUERY({importorders!A2:C, 
 EOMONTH(importorders!H2:H, -1)+1},
 "select Col4,count(Col1) 
  where Col3 = 'Thailand Tour' 
    and Col4 is not null 
  group by Col4
  label count(Col1)''", 0), 2, 0), 0))

0

嘗試

=query(A2:H,"select Year(H), Month(H)+1, C, Count(H) where C is not null and C like 'Thailand%' group by Year(H), Month(H)+1,C label C'Tour',Year(H)'Year',Month(H)+1'Month'")

應用於數據透視表的此數據可能會提供更易於理解的分析。


報告摘錄

報告摘錄

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM