Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

SSRS 2008  expression in report to count values

Posted on 2014-12-01
5
Medium Priority
?
135 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 2000 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Written by Valentino Vranken. Introduction: The first step of creating a SQL Server Reporting Services (SSRS) report involves setting up a connection to the data source and programming a dataset to retrieve data from that data source.  The data…
Introduction As you'll probably know, a data region in a SQL Server Reporting Services report can be linked to only one dataset.  This makes it troublesome when you need to display data from more than one dataset in the same data region.  SQL Serve…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Suggested Courses

971 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