title: How to use If Else in SSRS expression
body: <p>I am trying to evaluate a text box value using SSSRS expression.</p>
  
  <p>Currently I am doing something like following:</p>
  
  <pre><code>=IIF(Fields!VariableValue.Value =1,"Pass",IIF(Fields!VariableValue.Value = 2,"Fail",IIF(Fields!VariableValue.Value = 3,"Abort",IIF(Fields!VariableValue.Value = 4,"ByPass",IIF(Fields!VariableValue.Value ="#Error","NA",Fields!VariableValue.Value)))))
  </code></pre>
  
  <p>Is there a better way of doing this?</p>