user3569565
user3569565

Reputation: 1

SSRS reporting using labels in expressions

I am trying to produce a table - a count of responders by gender and site ID.

Instead of getting Site_ID out as 1, 2, 3 and Gender as 0, 1 on the graph I'm trying to recode Gender as Male / Female and Site_ID as Site 1, Site 2, Site 3, etc.

How can I set the expression for y, currently =Count(Fields!GENDER.Value) to put value labels (Male / Female) as outputs.

i.e. how can I put =IIf(Fields!gender.Value = 1, "Male", "Female") into =Count(Fields!GENDER.Value) for me to get the desired graph without errors?

Also the same for Site_ID where the expression for x is currently =Fields!SID.Value - how can I add value labels to this expression in SSRS?

My SQL skills are very rusty as you might have guessed (last used on an INGRES system years ago).

Thank you in advance for you time

Upvotes: 0

Views: 1101

Answers (1)

Hituptony
Hituptony

Reputation: 2860

Maybe something like?

COUNT(IIF(Fields!gender.Value=1,"F",Nothing))

or

COUNT(IIF(Fields!gender.Value=1,"F","M"))

Upvotes: 1

Related Questions