Calculated Fields - Percentage

aeddipa

Active Member
Joined
Jun 1, 2009
Messages
337
Does anybody know how to calculate a percentage based of another field in a query?

Essentially what I have is 100 rows of data with different dollar amounts. I want to divide each rows dollar amount by the sum of all the rows and multiply that by 100 to get the percentage for each row.

Ex.

100
200
300
350
250
400

Total = 1600

So, 100/1600 = .0625 * 100 = 6.25%

I want my field to show the result of 6.25%, but I'm not sure how to calculate it. Any ideas?

Thanks in advance!
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
One way is to use a two-step process (two queries).

First, create an aggregate query to get your SUM. This should just end up returning a single record.

Then create a new query using your original data set and SUM query together. You can then divide each record by the SUM to get your percentage.
 
Upvote 0
Awesome, that worked. The only question I have remaining is after I convert it to a percentage by multiplying by a 100, is there a way to show the '%' sign and is there a way to round to the nearest hundredth?

Ie.

2.056789 round to 2.06

Thanks Joe!
 
Upvote 0
No need to do either of these things, just format your calculated field as a Percentage with two decimal places. Just right click on the calculated field in Query Builder, select Properties, and set the Format and Decimal Place values accordingly.

If you really need to round the results (instead of just displaying them as rounded, use the ROUND function).
 
Upvote 0
Thanks!

I'm decent with Excel, but a noob when it comes to Access. I don't know the simplest things. Thanks for showing me the Property area. It made things very easy!
 
Upvote 0
You mean the "dark" side? LOL Yes, Access is a whole new ball game. Really need to learn more about this because I can see the benefits.
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,719
Members
452,939
Latest member
WCrawford

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top