gpt4 book ai didi

google-sheets - 查询功能中的自动更新日期

转载 作者:行者123 更新时间:2023-12-04 08:21:52 29 4
gpt4 key购买 nike

我有以下有效的 Google Sheets 公式:

=IFERROR(QUERY(Transactions!A25:P990030,"select Sum(H) where B = date '2020-01-01' and F contains 'Product Sales' and K contains 'United States' and L contains 'Brand' label Sum(H) ''",0),"-")
我想要日期部分, where B = date '2020-01-01' , 在新单元格中自动更新,因此它用正确的日期填充 365 个单元格。但是,我无法让它工作。
B列也有对应的日期,所以B21等于2020年1月1日,B22等于1月2日,等等。但是,QUERY函数和日期似乎很棘手,从'2020-01-01更改日期' 到“2020-01-01”已经变成了错误。
示例/测试表:
https://docs.google.com/spreadsheets/d/1uYWzfgmeiP4JEKM5sMzbxfL2DCKLtfMiK5u_pnIbQY8/edit?usp=sharing

最佳答案

用:

=ARRAYFORMULA(IFNA(VLOOKUP(B21:B, QUERY(Transactions!A:P,
"select B,sum(H)
where F contains 'Product Sales'
and K contains 'United States'
and L contains 'Brand'
group by B
label sum(H)''", 0), 2, 0), "-"))
enter image description here

关于google-sheets - 查询功能中的自动更新日期,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65457593/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com