I have a data set that I use to build a pie chart in ssrs:
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false" aggregate="true">
<entity name="account">
<attribute name="bio_employeesworldwide" alias="TotalWorldWideEmployees" aggregate="sum" />
<filter>
<condition attribute="customertypecode" operator="eq" value="2" />
</filter>
<link-entity name="contact" from="parentcustomerid" to="accountid" alias="contact">
<attribute name="bio_webuseraccountstatus" alias="count_bio_webuseraccountstatus" aggregate="countcolumn" />
<attribute name="bio_webuseraccountstatus" alias="bio_webuseraccountstatusgroupby" groupby="true" />
</link-entity>
</entity>
</fetch>
I would like to have only 2 areas in this pie chart. One area should be all Active and the other should be everything that !="Active"
or describe in sql it would be:
Case When "Active" then "Active" else "NotActive".
How do I accomplish this with SSRS?
I've been trying to do this with group expressions for the series:
What am I doing wrong? How do I just get 2 shaded regions?
After attempting the IIF suggestion below, I am getting input string was not in a recognized format:
Following Kyle's advice, I've changed the formula to:
=
IIf(Not (IsNothing(Fields!bio_webuseraccountstatusgroupbyValue.Value)
OR Fields!bio_webuseraccountstatusgroupbyValue.Value="")
,"Active"
, "InActive")
and the result i am getting now is still that silly error message:
Another failed attempt:
=iif(NOT IsNothing(Fields!bio_webuseraccountstatusgroupbyValue.Value),
Switch(Fields!bio_webuseraccountstatusgroupbyValue.Value<>"InActive"
AND Fields!bio_webuseraccountstatusgroupbyValue.Value<>"Active",
"InActive", "Active")
,"InActive")
interestingly this time, there's only one error:
i incorrectly used a string value instead of numeric, so now it is this:
=IIF(NOT IsNothing(Fields!bio_webuseraccountstatusgroupbyValue.Value),
SWITCH(Fields!bio_webuseraccountstatusgroupbyValue.Value <> 1
AND Fields!bio_webuseraccountstatusgroupbyValue.Value<>3,
1,
True, 3
),1)
now i am getting no errors, just an incorrect pie chart: