Solved

Displaying Percentage in SQL server 2005 reporting services

Posted on 2008-10-16
5
1,474 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 26

Accepted Solution

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

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 26

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

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Join & Write a Comment

by Mark Wills PIVOT is a great facility and solves many an EAV (Entity - Attribute - Value) type transformation where we need the information held as data within a column to become columns in their own right. Now, in some cases that is relatively…
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…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

708 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now