Solved

SSRS 2008  expression in report to count values

Posted on 2014-12-01
5
131 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

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

This code started out as a fix for a customer that had incoming data that was hunderds of numbers and words long that was to fit in one column. The problem was that the customer did not want to split words or numbers when wrapping in the column. …
It is helpful to note: This is a cosmetic update and is not required, but should help your reports look better for your boss.  This issue has manifested itself in SSRS version 3.0 is where I have seen this behavior in.  And this behavior is only see…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

615 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