Solved

How do I dynamically change how a percentage is displayed?

Posted on 2011-09-20
2
255 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
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In this short article I will be talking about two functions in the SQL Server Reporting Services (SSRS) function stack.  Those functions are IIF() and Switch().  And I'll be showing you how easy it is to add an Else part to the Switch function. T…
Time Corrections for Reports Working with a report, we made some interesting discoveries about the time corrections/updates We are using the following Parameters: Starting Entered Date (Date) formatted as Data type: "Date/Time" Ending Entered …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

828 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