T
TuffyE
These are probably simple and I appreciate the patience of everyone. Yes, I
am trying the "search" with no success so far. I'll try to explain in more
detail below, but the basic questions are as follows:
1. How do I simply get the crosstab to show all rows/columns, even if there
are not values?
2. How do I get the crosstab to output values of 0 in those cells where it
is?
Although I am working with waterfowl band recoveries, the clear analogy
would be something like this:
There are 62 salesmen selling 16 products in each of 12 months. I want to
generate a crosstabe query to COUNT the quantities of each product sold by
each salesman in each month. The setup is no problem and SHOULD result in
992 (16X62) rows and 12 (Jan-Dec) value columns. Keeping those row numbers
in mind, we can even think of the simpler version as if there were only 3
salesmen (A/B/C) and 3 products (A/B/C) sold in 4 quarters. That SHOULD look
like this:
Salesman Product Q1 Q2 Q3 Q4
A A 2 3 0 1
A B 0 0 0 0
A B 2 3 0 1
B A 2 3 0 1
B B 2 3 0 1
B C 2 3 0 1
C A 2 3 0 1
C B 2 3 0 1
C C 2 3 0 1
If this were the value results, the crosstab query (as I am seeing it now)
would NOT show the row with Salesman "A" and Product "B" because there are no
values. It would also not show the Q3 column for the same reason. That is
the first question. The second question is because none of the 0's would
show up at all; they would be blank (nulls?). That appears to be a problem
when I get it into Excel and try to perform calculations there. That part
HAS to be easy, but is not yet obvious to me.
I have even been thinking about "workarounds". Could I simply ADD records
with values in a "not-to-be-used "Q5" column for all 992 rows that I wanted
to appear and in an extra row for all columns. These could be easily deleted
in the output, leaving just what I wanted in terms of the number of rows and
columns. I would still have to figure out how to make it output zero-values,
though. I'm afraid it would mean a LOT of records if I had the value, one
for each value cell in the desired output?. I might even be able to leave
the field that is counted BLANK and get by with only the 992 records and 12
(actually 80) columns? Would the query show these, but not include them in
the count?
For the record, the objective is to be able to past the output into the data
area of a much larger spreadsheet that performs various calculations.
I will keep searching and studying the query options/properties/field
formats/etc., but wanted to post the question in the hopes that it is easy
and obvious to someone. Thanks for any and all assistance.
Tuffy
am trying the "search" with no success so far. I'll try to explain in more
detail below, but the basic questions are as follows:
1. How do I simply get the crosstab to show all rows/columns, even if there
are not values?
2. How do I get the crosstab to output values of 0 in those cells where it
is?
Although I am working with waterfowl band recoveries, the clear analogy
would be something like this:
There are 62 salesmen selling 16 products in each of 12 months. I want to
generate a crosstabe query to COUNT the quantities of each product sold by
each salesman in each month. The setup is no problem and SHOULD result in
992 (16X62) rows and 12 (Jan-Dec) value columns. Keeping those row numbers
in mind, we can even think of the simpler version as if there were only 3
salesmen (A/B/C) and 3 products (A/B/C) sold in 4 quarters. That SHOULD look
like this:
Salesman Product Q1 Q2 Q3 Q4
A A 2 3 0 1
A B 0 0 0 0
A B 2 3 0 1
B A 2 3 0 1
B B 2 3 0 1
B C 2 3 0 1
C A 2 3 0 1
C B 2 3 0 1
C C 2 3 0 1
If this were the value results, the crosstab query (as I am seeing it now)
would NOT show the row with Salesman "A" and Product "B" because there are no
values. It would also not show the Q3 column for the same reason. That is
the first question. The second question is because none of the 0's would
show up at all; they would be blank (nulls?). That appears to be a problem
when I get it into Excel and try to perform calculations there. That part
HAS to be easy, but is not yet obvious to me.
I have even been thinking about "workarounds". Could I simply ADD records
with values in a "not-to-be-used "Q5" column for all 992 rows that I wanted
to appear and in an extra row for all columns. These could be easily deleted
in the output, leaving just what I wanted in terms of the number of rows and
columns. I would still have to figure out how to make it output zero-values,
though. I'm afraid it would mean a LOT of records if I had the value, one
for each value cell in the desired output?. I might even be able to leave
the field that is counted BLANK and get by with only the 992 records and 12
(actually 80) columns? Would the query show these, but not include them in
the count?
For the record, the objective is to be able to past the output into the data
area of a much larger spreadsheet that performs various calculations.
I will keep searching and studying the query options/properties/field
formats/etc., but wanted to post the question in the hopes that it is easy
and obvious to someone. Thanks for any and all assistance.
Tuffy