IIF statment issues

  • 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))

  • I answered my own question 🙂 Posting here for anyone else who has the same issue...

    =COUNT(IIF(Fields!Call_Disposition.Value="Abandoned",1,Nothing))

  • Have you looked at pivoting the data?

    Date Answered VM Adandoned etc.

    Cnt Cnt Cnt

    10/22 90 42 4

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply