Solved

SSRS 2008  expression in report to count values

Posted on 2014-12-01
5
121 Views
Last Modified: 2014-12-12
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
Comment
Question by:shmz
  • 3
  • 2
5 Comments
 
LVL 24

Assisted Solution

by:Phillip Burton
Phillip Burton earned 500 total points
ID: 40474541
Do you mean:

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

Change the 2 for a 1 for the active records.
0
 

Author Comment

by:shmz
ID: 40490290
Phillip Burton
I was not looking for sum. it was more about counting.
I resolved and delete this question.
thanks for your help
0
 

Author Comment

by:shmz
ID: 40490935
I've requested that this question be deleted for the following reason:

questioning about 'counting records and not summing up.
0
 
LVL 24

Expert Comment

by:Phillip Burton
ID: 40490936
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
 

Accepted Solution

by:
shmz earned 0 total points
ID: 40491819
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Written by Valentino Vranken. Introduction: In a previous article (http://www.experts-exchange.com/articles/Microsoft/Development/MS-SQL-Server/MS-SQL_Reporting/Reporting-On-Data-From-Stored-Procedures-part-1.html) I announced that I would writ…
Hi All, I am here to write a simple article to move SSRS (SQL Server Reporting Services) reports from one server to another. When I have faced the same issue to move reports those were developed by developer on development server and now need to …
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now