title: SSRS IIF condition error
body: <p>I'm trying to return a green YES if equal to 1, else return a red NO. Which means it equals 0. I found this which I think is helpful but can't figure out how to piece it together.<a href="https://stackoverflow.com/questions/17068048/ssrs-conditional-text-formatting-expressions-using-switch">SSRS - Conditional Text Formatting (Expressions using Switch)</a></p>
  
  <p>The below gives me an error</p>
  
  <pre><code>IIF(Fields!SurveyCompleted.Value = 1, "Green", "Red")
  </code></pre>
  
  <p>Error   4   [rsFieldReferenceAmbiguous] The Value expression for the text box ‘Textbox12’ refers directly to the field ‘SurveyCompleted’ without specifying a dataset aggregate.  When the report contains multiple datasets, field references outside of a data region must be contained within aggregate functions which specify a dataset scope.</p>
  
  <p>I got the following to accidentally work to change the text when trying to change the color.</p>
  
  <pre><code>=First(IIF(Fields!UniqueReportRequests.Value = 1, "Yes", "No"),"RawCompletionScore")
  </code></pre>
  
  <p>How can I combine both to change the color and text? The color expression needs the dataset "RawCompletionScore" declared?</p>