Figuring funny aggregate totals in Query

nowanda

Board Regular
Joined
May 27, 2002
Messages
67
I have a query which gives me a category (cat) and a value (val). I'd like to calculate a percent on the total of the values.. where :

per=val/([Total of Val])*100

cat val per
A 01 0.84
B 45 37.8
C 73 61.3

Total is 119 so per is 1/119, 45/119 and 73/119.

Ways I have tried give me aggregate errors. Sum(Val) for example.
Any tips?

Nowanda:)
This message was edited by nowanda on 2003-02-21 16:51
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
nowanda said:
I have a query which gives me a category (cat) and a value (val). I'd like to calculate a percent on the total of the values.. where :

per=val/([Total of Val])*100

cat val per
A 01 0.84
B 45 37.8
C 73 61.3

Total is 119 so per is 1/119, 45/119 and 73/119.

Ways I have tried give me aggregate errors. Sum(Val) for example.
Any tips?

Nowanda:)
This message was edited by nowanda on 2003-02-21 16:51

Care to provide the relevant table(s) using the standard notation...

TABLE(PrimaryKey,Field1,Field2,...)

like in...

CUSTOMERS(Customer#,CustomerName,Street,City,State)
 
Upvote 0

Forum statistics

Threads
1,221,495
Messages
6,160,142
Members
451,624
Latest member
TheWes

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