=COUNTA(IFERROR(QUERY(IMPORTRANGE("Sheet1","QC sheet!A792:B10000"), "Select Col2, Col4 where Col2 contains '"&B$1&"' and Col4 contains '"&C1&"' and date "&TEXT(G1,"'YYY-MM-DD'")&" <=Col1 and date "&TEXT(H1,"'YYY-MM-DD'")&" >=Col1" ,0)))
Using above formula to count data with 2 containing conditions along with start and end date does not work.
EDIT 1:
https://drive.google.com/file/d/1DTMFViXxBn-ezPJ2Njjbor-4udoRyc8M/view?usp=sharing
Please update the formula sheet have been attached.
Edit 2:
=COUNTIFS(D3:D50,A1,E3:E50,B1,C3:C50,">0",C3:C50,F1,C3:C50,G1)
This formula is working but how we can calculate same with query formula actually i have to get data by importrange.