【问题标题】:Google sheet - how to filter the data with custom date rangeGoogle 工作表 - 如何使用自定义日期范围过滤数据
【发布时间】:2020-03-12 00:40:44
【问题描述】:

我知道这可以通过谷歌表格中的数据透视来实现,但它不会让我们选择日期范围来获取数据透视中的结果。我需要的是,当我在表 2 中选择日期范围和代理时,它会返回总上传数量的结果。

表格 1 中的我的数据集

表 2 中要求的结果

我们将不胜感激。

【问题讨论】:

标签: arrays google-sheets google-sheets-formula google-sheets-query google-query-language


【解决方案1】:

尝试:

={QUERY(Data!A:D, 
 "where A = '"&C2&"' 
    and B >= date '"&TEXT(A2, "yyyy-mm-dd")&"' 
    and B <= date '"&TEXT(B2, "yyyy-mm-dd")&"'", 1); "","", "Total", 
 IFNA(SUM(QUERY(Data!A:D, 
 "select D 
  where A = '"&C2&"' 
    and B >= date '"&TEXT(A2, "yyyy-mm-dd")&"' 
    and B <= date '"&TEXT(B2, "yyyy-mm-dd")&"'", 0)), "")}

【讨论】:

    猜你喜欢
    • 2023-04-11
    • 1970-01-01
    • 1970-01-01
    • 2016-06-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-02-24
    • 1970-01-01
    相关资源
    最近更新 更多