My query is yielding an error
#N/A
Query Completed with an Empty Output.
=sum((query(importrange("mysheet","CR"),"select Col7 where Col1 ='"&A4&"' and Col2 ='"&B4&"' and Col13!='Cancelled' and Col13!='Rejected' ",0)))
The function is working properly when data exists in the referenced sheet. The issue is as I drag it down some of the column references don't exist in the CR data set. How do I get a zero to populate instead of the error?