Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Am able to format a division of the first part of this expression to two decimal places(below), however am unable able to format it after a multiplication by 100. i want to format to one decimal place the result of multiplication

=formatnumber((SUM(IIf(Fields!Gender.Value = "F",Fields!Eligibleteachers.Value,0)))/SUM(IIf(Fields!Gender.Value = "F",Fields!CountTeachers.Value,0)),2)*100

thanks
Posted

1 solution

Multiply by 100 before taking on the precision.

Try:
VB
=formatnumber(100*(SUM(IIf(Fields!Gender.Value = "F",Fields!Eligibleteachers.Value,0)))/(SUM(IIf(Fields!Gender.Value = "F",Fields!CountTeachers.Value,0))),1)
 
Share this answer
 
v2
Comments
mayeso 5-Feb-13 13:25pm    
Thanks Sandeep it worked, great. I also find a way to get what i wanted. I just needed a 3 decimal places,if this is multiplied by 100 it will displace two decimals hence i will have 1 decimal place
Sandeep Mewara 6-Feb-13 0:15am    
Welcome.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900