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

x
?
Solved

How do I dynamically change how a percentage is displayed?

Posted on 2011-09-20
2
Medium Priority
?
271 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 1000 total points
ID: 36569780
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
ID: 36569997
Perfect. thanks so much. I  was wracking my brain.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

Hi All, I am here to write a simple article to move SSRS (SQL Server Reporting Services) reports from one server to another. When I have faced the same issue to move reports those were developed by developer on development server and now need to …
Introduction In the following article I’ll be discussing and demonstrating several different ways of how images can be put on a report. I’m using SQL Server Reporting Services 2008 R2 CTP, more precisely version 10.50.1352.12, but the methods ex…
Integration Management Part 2
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

926 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