Solved

SSRS 2008  expression in report to count values

Posted on 2014-12-01
5
123 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A recent question popped up and the discussion heated up regarding updating a COMMENTS (TXT) field in a table using SSRS. http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/MS-SQL_Reporting/Q_27475269.html?cid=1572#a37227028 (htt…
A recent questions about how to add SSRS named instances, couldn't find any that talks about SQL server 2008, anyway I decided to help by creating some screen shots. The installation is straightforward, you just pop the SQL server 2008 installati…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
Need to grow your business through quality cloud solutions? With everything required to build a cloud platform and solution, you may feel like the distance between you and the cloud is quite long. Help is here. Spend some time learning about the Con…

937 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

1 Experts available now in Live!

Get 1:1 Help Now