我試圖創建一個基于日期范圍的查詢,該查詢將根據另一列的值來顯示輸出。
uj5u.com熱心網友回復:
嘗試:
={query(
{query({A:J}, "select Col1,Col3,Col9,Col6,Col7 where Col7 =0",1);
query({A:J}, "select Col1,Col3,Col6,Col9,Col7 where Col10 > date '"&text(A2, "yyyy-mm-dd")&"' and Col10 < date '"&text(B2, "yyyy-mm-dd")& "' and Col7>0 ",1)}, "where Col2 is not null.
, "where Col2 is not null order by Col3,Col4 label Col1 'Customer',Col2 'Type', Col3 'Purchased', Col4 'Free Trial', Col5 'Cost'",1)}。
uj5u.com熱心網友回復:
我想明白了! 最終使用了Filter而不是Query,所以我可以根據所選的標準進行過濾。
我更新了問題中鏈接的作業表的解決方案。
對于列 "購買":
=iferror(FILTER(F4:F14,A4:A14=G19,J4:J14>=A$2,J4:J14<=B$2,G4:G14<>0),"")
對于列 "免費試用":
=iferror(FILTER(F4:F14,A4:A14=G19,J4:J14>=A$2,J4:J14<=B$2,G4:G14=0),"")
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/320536.html
標籤:

