Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

IIF statment issues Expand / Collapse
Author
Message
Posted Monday, October 21, 2013 12:37 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Monday, February 24, 2014 11:06 AM
Points: 109, Visits: 215
Hello all,

I am rather new to the syntax of SSRS coding. Basically what I need to do is count a column based on it's contents. So IF the column = "answered", I just want to count Answered. IF the column = "Abandoned", I want to count Abandoned. And Finally IIF the column = "VM", then I want to count VM. I am trying to do this in separate fields, so 1 row for each.

Basically, all of these are just counting whatever is in the column. So if I have 4 Answered and 2 Abandoned, it simply counts 6 regardless of what I enter (Abandoned, Answered, etc.)

Any help would be greatly appreciated.


=COUNT(IIF(Fields!Call_Disposition.Value = "Answered", Fields!Call_Disposition.Value, 0))
=COUNT(IIF(Fields!Call_Disposition.Value = "Abandoned", Fields!Call_Disposition.Value, 0))
=COUNT(IIF(Fields!Call_Disposition.Value = "VM", Fields!Call_Disposition.Value, 0))
Post #1506797
Posted Monday, October 21, 2013 1:18 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Monday, February 24, 2014 11:06 AM
Points: 109, Visits: 215
I answered my own question :) Posting here for anyone else who has the same issue...


=COUNT(IIF(Fields!Call_Disposition.Value="Abandoned",1,Nothing))
Post #1506826
Posted Tuesday, October 22, 2013 8:08 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Today @ 12:29 PM
Points: 1,211, Visits: 6,540
Have you looked at pivoting the data?
Date Answered VM Adandoned etc.
Cnt Cnt Cnt
10/22 90 42 4
Post #1507162
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse