Options

sql reporting help count(iif()

phoeneousphoeneous Member Posts: 2,333 ■■■■■■■□□□
I'm creating a report in visual studio for ssrs and I cant figure out why the expression below isn't counting all of my records correctly.
= "Total Cases: " & CountDistinct(Fields!case_sk.Value) & vbcrlf &
 
"Total Active Cases: " & Count(iif(Fields!description.Value = "Accounting" OR Fields!description.Value = "Accounting - Subrogation"
OR Fields!description.Value = "Accounting - Medicare"
OR Fields!description.Value = "Petition for Minor's Comp.",1,Nothing))

It doesnt count any record that is "Accounting" in the description column but it counts all the other strings. I'm pretty sure I didn't misspell Accounting, and that's how it looks in the record when the query is ran. Thoughts?

EDIT: I've even tried CStr, InStr, Trim against "Accounting"...

Comments

Sign In or Register to comment.