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

x
?
Solved

Displaying Percentage in SQL server 2005 reporting services

Posted on 2008-10-16
5
Medium Priority
?
1,490 Views
Last Modified: 2012-05-05
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
Comment
Question by:LP_Tech
  • 3
5 Comments
 
LVL 27

Accepted Solution

by:
Zberteoc earned 200 total points
ID: 22731041
For the column that displays the percentage in the properties change the format to P0.
0
 
LVL 27

Expert Comment

by:Zberteoc
ID: 22731046
That is P zero.
0
 

Author Comment

by:LP_Tech
ID: 22731067
I noticed when I changed the formating to P0 I had to remove the *100

Thanks for the quick answer!
0
 

Expert Comment

by:Putoch
ID: 23421873
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
 
LVL 27

Expert Comment

by:Zberteoc
ID: 23424340
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

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

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

This article will describe one method to parse a delimited string into a table of data.   Why would I do that you ask?  Let's say that you need to pass multiple parameters into a stored procedure to search for.  For our sake, we'll say that we wa…
by Mark Wills Attending one of Rob Farley's seminars the other day, I heard the phrase "The Accidental DBA" and fell in love with it. It got me thinking about the plight of the newcomer to SQL Server...  So if you are the accidental DBA, or, simp…
Integration Management Part 2
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

972 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