Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Count value in SSRS

I want to ask a question regarding the count error that is generated in SSRS reporting server. I have two condition simultaneously, but the count is working only for one condition not for both. Please suggest is there any problem in my logic or anyone have any better idea to count both condition.

enter image description here

like image 774
Arpit Sharma Avatar asked Feb 24 '26 03:02

Arpit Sharma


1 Answers

The Switch function takes pairs of conditions and results. It looks like you gave it just two conditions. So basically it's counting a boolean when the second condition is true.

It sounds like you want to count cases where that column has either value. In this case you could write the statement like this:

=Count(IIf(Fields!IPMS_SETUP_13.Value = 1 OR Fields!IPMS_SETUP_13.Value = 2, 1, Nothing))

In other words, if the column has either value, count it, otherwise do nothing.

like image 99
StevenWhite Avatar answered Feb 27 '26 02:02

StevenWhite