DSum help or something else!

Therat

Access Denied
Local time
Today, 02:18
Joined
May 21, 2002
Messages
53
I have a large table that I want to add a database column to that calculates market share.

In this new column I want to divide [people served]/ by the total number of [people served] for a particular [region] and [service line]. I tried the following expression in my attached sample database to no avail:


Market Share: [People served]/(DSum("[People served]","
",[Region] & [Service Lines]))

PS. I know this is wrong, but at least it is a start.


I've attached an small access 97 (I am upgrading to 2002 soon!) database as an example. My main table has more rows than excel allows, so that is not an option!

Thanks for your help!
 

Attachments

  • ms help.jpg
    ms help.jpg
    53.1 KB · Views: 162
DSum will work for you. Just need to look at how to build the WHERE portion a little closer:

MS: [People_Served]/DSum("People_Served","Table","Region = '" & [region] & "' and Service_Lines = '" & [service_lines] & "'")

Note: there are single quotes in bold

Also, always try not to have spaces in field names. Use an underscore to seperate words. This will help when you are referencing a field and forget to put the brackets around. It is also just good practice.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom