title: How to check for NULL values when using the SUM function in SSRS
body: <p>By default, the SUM function in SSRS excludes NULLs.  I want to be able to check for ANY NULL values in the details group and throw an error in the summary group.  In the details view I use this to check for NULLS:</p>
  
  <pre><code>=IIF(IsNothing(Fields!EquityPrice.Value)) ,"#Error", Fields!EquityPrice.Value*Fields!EquityShares.Value)
  </code></pre>
  
  <p>This works as desired.</p>
  
  <p>When I use this in my summary section, it ignores the NULLS and returns the SUM of the non-null values.  I want to return "#Error" instead:</p>
  
  <pre><code>=IIF(IsNothing(SUM(Fields!EquityPrice.Value))) ,"#Error", SUM(Fields!EquityPrice.Value*Fields!EquityShares.Value))
  </code></pre>
  
  <p>I have tried eliminating the SUM in the "IsNothing" expression but to no avail.  Any help would be appreciated.  Thanks in advance!</p>