title: How to handle IIF or Switch divide by zero giving #ERROR?
body: <p>I tried using <code>IIF</code> and <code>Switch</code> case, but I am unable to handle N/A case when there would be a divide by zero error. For example:</p>
  
  <pre><code>=switch(
      ReportItems!Textbox54.Value = 0, "N/A",
      ReportItems!Textbox54.Value &lt;&gt; 0, ((ReportItems!Textbox56.Value) / (ReportItems!Textbox54.Value)))
  </code></pre>
  
  <p>I am getting N/A with out this:</p>
  
  <pre><code>ReportItems!Textbox54.Value &lt;&gt; 0, ((ReportItems!Textbox56.Value) / (ReportItems!Textbox54.Value)
  </code></pre>
  
  <p>But if add this condition I am getting an error?</p>
  
  <p>I am using SSRS 2008 R2.</p>
  
  <p>Output:</p>
  
  <blockquote>
    <p>19.47%<br>
      13.85%<br>
      #Error</p>
  </blockquote>