Solved

How do I dynamically change how a percentage is displayed?

Posted on 2011-09-20
2
261 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Want Experts Exchange at your fingertips?

With Experts Exchange’s latest app release, you can now experience our most recent features, updates, and the same community interface while on-the-go. Download our latest app release at the Android or Apple stores today!

Question has a verified solution.

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

This code started out as a fix for a customer that had incoming data that was hunderds of numbers and words long that was to fit in one column. The problem was that the customer did not want to split words or numbers when wrapping in the column. …
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…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

626 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