Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 136
  • Last Modified:

SSRS 2008 expression in report to count values

Hi,
I have a column that returns either 1,2 for active and inactive records.

I like to have two fields, one calculate total number of records returning 1 and another display total number of records returning 2.

Thanks
0
shmz
Asked:
shmz
  • 3
  • 2
2 Solutions
 
Phillip BurtonDirector, Practice Manager and Computing ConsultantCommented:
Do you mean:

=Sum(Iif(Fields!MyField.Value=2,1,0))

Change the 2 for a 1 for the active records.
0
 
shmzAuthor Commented:
Phillip Burton
I was not looking for sum. it was more about counting.
I resolved and delete this question.
thanks for your help
0
 
shmzAuthor Commented:
I've requested that this question be deleted for the following reason:

questioning about 'counting records and not summing up.
0
 
Phillip BurtonDirector, Practice Manager and Computing ConsultantCommented:
My solution was about counting - it said that if the value was equal to 2, then "Sum 1", which is the equivalent of "counting".

If you have resolved this issue, what was your answer please.
0
 
shmzAuthor Commented:
Hi Philip,

I have used the following as a solution:

Countdistinct(iif(fields!x.value="2"
, fields!yID.value
, Nothing))

And similar used for 1 (Active)
Regards
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now