By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,107 Members | 1,318 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,107 IT Pros & Developers. It's quick & easy.

Crosstab with month/year ... count and average

P: n/a
I would like to have a crosstab of the number of campers by month as
row headings and by year as column headings with an additional column
of the average.

So, in January we had 10 campers for 1999, 20 campers in 2000, 5
campers in 2001, 30 campers in 2002 and 50 campers in 2003.

The row heading would be January (and then February, March, April,
May, etc., with all of its data), the column headings would be 1999,
2000, 2001, 2002 and 2003 with another column heading of Avg that will
have a value of 23.

Is this possible? When I use the month as a row heading I can't get it
to sort in chronolgical order - it goes alphabetical.

Any, ALL suggestions much welcomed AND appreciated!!!
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a

In order to get the columns to sort correctly, use Month(CampingDate) as the
column heading, and Year(CampingDate) as the row heading. This will give
you columns lables 1, 2, 3. If you need to have the month names appear on
the column heading, you can use this query as input to another query, or a

Hope this helps,

Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.