Solved

How do I dynamically change how a percentage is displayed?

Posted on 2011-09-20
2
251 Views
Last Modified: 2012-05-12
I am looking for an expression to change how percentages are displayed. Essentially if the numbers to the right of the decimal end in zero, lop off the zero. example...

100.0000% becomes 100%
99.6230% becomes 99.623%
99.5800% becomes 99.58%

Current format is p4

Expression is..
=iif(Fields!month2.Value = 0,"*",
iif(Fields!month2.Value = 1,"100%",Fields!month2.Value))
0
Comment
Question by:xtrout
2 Comments
 
LVL 27

Accepted Solution

by:
planocz earned 250 total points
Comment Utility
Use this type of code in your expressions (Formating)

=iif(Fields!month2.Value = 0,"*",
iif(Fields!month2.Value = 1,"100%",Format(Fields!month2.Value, "###.######%")))
0
 

Author Closing Comment

by:xtrout
Comment Utility
Perfect. thanks so much. I  was wracking my brain.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Written by Valentino Vranken. Introduction: In a previous article (http://www.experts-exchange.com/articles/Microsoft/Development/MS-SQL-Server/MS-SQL_Reporting/Reporting-On-Data-From-Stored-Procedures-part-1.html) I announced that I would writ…
Steps to solve SSRS SQL 2008 R2 User Access Control (UAC) Permission Error With the introduction of SQL Server 2008 R2 and Vista (Windows 7 as well) came new enhanced security features. One of the features included was User Access Control (UAC) t…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

744 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

18 Experts available now in Live!

Get 1:1 Help Now