title: case statement inside of fetchxml script
body: <p>Please note that although this question is an entirely different question, it relates directly to <a href="https://stackoverflow.com/q/26662699/117700">this question.</a>         </p>
  
  <p>The following is the script that returns the dataset for my SSRS chart:</p>
  
  <pre><code>&lt;fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false" aggregate="true"&gt;
        &lt;entity name="account"&gt;
          &lt;attribute name="bio_employeesworldwide" alias="TotalWorldWideEmployees" aggregate="sum" /&gt;
          &lt;filter&gt;
            &lt;condition attribute="customertypecode" operator="eq" value="2" /&gt;
          &lt;/filter&gt;
       &lt;link-entity name="contact" from="parentcustomerid" to="accountid" alias="contact"&gt;
  
          &lt;attribute name="bio_webuseraccountstatus" alias="count_bio_webuseraccountstatus" aggregate="countcolumn" /&gt;
  
          &lt;attribute name="bio_webuseraccountstatus" alias="bio_webuseraccountstatusgroupby" groupby="true" /&gt;
  
        &lt;/link-entity&gt;
        &lt;/entity&gt;
      &lt;/fetch&gt;
  </code></pre>
  
  <p>The values for bio_webuseraccountstatus can be <code>Active, Inactive, Disabled, Pending, etc..</code></p>
  
  <p><strong>In FetchXML is there a way to do a case statement where you "InActive" for every value that is not equal to "Active" ?</strong></p>
  
  <p>As you can see I've been trying to solve this issue <a href="https://stackoverflow.com/questions/26662699/grouping-data-for-a-pie-chart-in-ssrs/26662776#comment41929010_26662776">within the reporting layer</a>, but am experiencing lots of "string format" issues. </p>
  
  <p><strong>Can this be done with the dataset layer (fetchxml) instead?</strong></p>