Improve company productivity with a Business Account.Sign Up

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

Displaying Percentage in SQL server 2005 reporting services

I am trying to create a table to show some basic information followed by a percentage. How do I round my percentages to only display whole numbers?

=Fields!Expr1.value/(Count(Fields!Expr1.value))*100  is what I am using to display my percents.  

 Thanks.
0
LP_Tech
Asked:
LP_Tech
  • 3
1 Solution
 
ZberteocCommented:
For the column that displays the percentage in the properties change the format to P0.
0
 
ZberteocCommented:
That is P zero.
0
 
LP_TechAuthor Commented:
I noticed when I changed the formating to P0 I had to remove the *100

Thanks for the quick answer!
0
 
PutochCommented:
Hi there, just wondering, if the value is null, how do you get rid of NaN on the Percentage value area? instead of having 0?
Thanks
0
 
ZberteocCommented:
You can wrap the field value in a testing function similar to ISNULL in SQL and replace the NULL values with something, I think the IsNothing is the function. You can do:

IIF(IsNothing(field.Value),0,field.Value)


0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

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