title: Google Sheets' query + IFS function
body: <p>I want to use <code>IFS</code> and Query in google sheet at the same time. </p>
  
  <p><a href="https://i.stack.imgur.com/zsgaW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zsgaW.png" alt=""></a></p>
  
  <h2>Works Well</h2>
  
  <pre><code>=QUERY('PN Orders'!A1:AF,"SELECT C, D where C LIKE '%" &amp; $B$1&amp; "%' and D LIKE '%" &amp; $B$2&amp; "%' LIMIT " &amp;$B$3,1)
  </code></pre>
  
  <p>above query works well, get results. 
  But every time I combine it with IFS function, it returns nothing. </p>
  
  <h2>Doesn't work</h2>
  
  <pre><code>=ifs( and($B$1&lt;&gt;"",$B$2&lt;&gt;"")=true, QUERY('PN Orders'!A1:AF,"SELECT C, D where C LIKE '%" &amp; $B$1&amp; "%' and D LIKE '%" &amp; $B$2&amp; "%' LIMIT " &amp;$B$3,1))
  </code></pre>
  
  <p>Is there something I'm missing here? <br/>
  Why the query returns nothing when combined with <code>IFS</code> function? </p>