Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Percent of a number 1

Status
Not open for further replies.

Taecca

Technical User
Jul 20, 2004
59
US
I have a column with values. The maximum obtainable value is 5000.
I need to display in another column the percentage value for each individual.

I entered:
((Sum(tblResponses.Value))*5000)/100 AS Percentage but I get numbers like: 11941975.00%

How do I obtain a two digits value like 75% for example?

Thank you for your help
 
I think you'll want to divide by 5000 and multiply by 100 instead of the way you do it now.

[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
 
Sorry, you are correct abou the formula.
It is (Sum(tblResponses.Value)/5000)*100 AS Percentage
however my problem is that I get too many digits.

I need to format the number to have only ##.##

How do I do that?
 
If this is a column in a table, try looking at the field properties in design mode. Specifically the format property.

[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top