CrossTab Query - how to include average column and table setup

M

Mary

I have two questions regarding setting up a new "small" Access 2007 database.
First off, I'm new to designing databases, so I may not ask my questions
using the correct terms. I do want to learn how to do this the right way, so
please correct my terms so I can speak your language.

Below is a sample of the data that will be used. The data consists of type,
items, years, and amounts. The amounts values are "totals" as seen below,
and are either number, percentage or currency. There can be some Null values,
where the number is not known.

Type Item 2009 2008 2007
Average
N Num. attend 234 210 198 214
N Total hours 10.25 20.45 17.65
16.12
P % 0.101% 0.035% 0.0125% .049%
C $ $50,000.00 $45,680.71 $44,350.90
$46,677.20
C $$ $1.93 $.98 $1.23
$1.37

First question:
I have set up separate table for Items, Year and Type.
Then an ItemsDetail table where the amount is entered into the "amount"
field and lookup values to type, item and year.
Is this the correct way to enter the various amounts, I mean, by entering
the different types into one field, the "amount" field?

Second Question:
I created a crosstab query to display the information similar to the above
sample, but I cannot figure out how to include an Average Column with the
"avg" data.

Thank you in advance for your help.
 
K

KARL DEWEY

Your table structure is wrong in several ways. A single field, your 2009,
(column to a spreadsheet person) cannot contain numbers, percentages, and
dollars.

The data need to be like this --
Type Year Num_attend Total_hours
N 2007 198 17.65
N 2008 210 20.45
N 2009 234 10.25
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top