[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1495
  • 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

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

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