We help IT Professionals succeed at work.

# formatting percent in SQL Reporting services 2005

on
20,250 Views
How do I format the following:
=Fields!School.Value & " Percentage (" & (Count(Fields!S_SSN.Value) / Max(Fields!StudentPop.Value))*100  & "% )"
so my percent shows now digits to the right of the decimal?  Right now my output is:

Percentage (25.8205689277899%)

Comment
Watch Question

## View Solution Only

Commented:
Use "P0" as the format string

Commented:
PFrog:
I used:
=Fields!School.Value & " (" & Format((Count(Fields!S_SSN.Value) / Max(Fields!studentpop.Value)*100),"00.") & "%"  & ") of student population"
and it works fine now. Can you explain "P0" to me. I do not understand your comment.
Mike
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)

Commented:
PFrog:
Mike

Commented:
I can't seem to get this to work with the Percent Stacked Chart.  P0 gives me 4,000 % for 40 on the axis.

Commented:
it should be

``````=IIF(Max(Fields!studentpop.Value)=0,100&"%", round(Count(Fields!S_SSN.Value) / Max(Fields!studentpop.Value)*100,2) & "%"
``````

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

###### Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

Deciding to stick with EE.

Mohamed Asif

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
###### Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Connect with Certified Experts to gain insight and support on specific technology challenges including:

• Troubleshooting
• Research
• Professional Opinions
Unlock the solution to this question.