Google Sheet查询以获取最后结果
我想获得过去 90 天内的最低价格,然后获得与
我尝试的拳头
=(QUERY(A:D; "SELECT A WHERE C = '"&H4&"' ";0))
相对应的日期没有结果,因为根据我对参考的理解,它实际上是在寻找文本,而不是数字,所以我将 TO_TEXT 添加到数据中
=ArrayFormula(QUERY(TO_TEXT(A:D); "SELECT Col1 WHERE Col4 = '"&H4&"' ";0))
,因为它获得了多个结果,
=ArrayFormula(QUERY(TO_TEXT(A:D); "SELECT Col1 WHERE Col4 = '"&H4&"' ORDER BY Col1 DESC LIMIT 1";0))
但由于其文本我得到了错误的答案 31/07/2020 而不是 08/03/2022
所以基本上为了解决我的第一个问题,我打破了排序,因为它不是值不再是文本,
有没有办法处理这个问题,使部分数据作为值,其他部分作为文本?或者任何其他方法,比如首先不使用 TO_TEXT ?
i wanted to get the lowest price in the last 90 days then get the date corresponding to that
fist i tried
=(QUERY(A:D; "SELECT A WHERE C = '"&H4&"' ";0))
with no results, cos from my understanding with referenc its actually looking for a text, not number, so i added TO_TEXT to the data
=ArrayFormula(QUERY(TO_TEXT(A:D); "SELECT Col1 WHERE Col4 = '"&H4&"' ";0))
as it get multiple results
=ArrayFormula(QUERY(TO_TEXT(A:D); "SELECT Col1 WHERE Col4 = '"&H4&"' ORDER BY Col1 DESC LIMIT 1";0))
but as its texts im getting wrong answer 31/07/2020 instead of 08/03/2022
so basicly to solve my first problem i broke sorting as its not values anymore but text
is there a way to handle this making part of data as value and other part as text? or anyother way around it, like not using TO_TEXT in first place?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试:
或仅输入:
try:
or just: