473,405 Members | 2,349 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Crosstab with month/year ... count and average

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
1 4900

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
report.

Hope this helps,

Gary
Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Luis | last post by:
Hi, I am trying to create a stored procedures (SQL 7.0), to provide data in a crosstab format. (I'm using Crystal Reports 8.5, but the Crosstab capabilities are terrible, so I have to do as...
2
by: Mary | last post by:
I am trying to develop a query which will determine the average costs using a rolling average of the past 12 months of data. In other words, if I entered the Ship Month of January and the Ship...
2
by: Catherine | last post by:
I am trying to create a report that will give me q total count by month to date, and then another by year to date. Example: Discharges By Type Month To Date Year To Date...
3
by: Paula | last post by:
I need to do a summary using a crosstab query. The data has a Date field (Not named "Date"). I can do the Row Heading and Value but am having trouble with the Column Heading. The summary Columns...
3
by: KevLow | last post by:
Hi, Hope some kind soul can help me out here.. I'm trying to programmatically modify the column headings of a crosstab query such that it can be dynamic based on user specified period (Month...
14
by: Tina | last post by:
My employer tracks productivity/performance of clinicians (how much they bill) each week, its averages for the month, and the 6 months. These averages are compared to their expected productivity....
1
by: Mani | last post by:
Hi all! I have cross tab report with 4 columns values in percents for current month for the current row. On columns 5 I need to show average for the current month and on column 6 I need to show...
1
by: bruce24444 | last post by:
First of all I'm new to the forum and am working on my first database. So far I think I've done not too bad but have hit a stumbling block for which I'm not sure how to get around. What I have is...
4
by: m.wanstall | last post by:
I have a crosstab query that compiles data for Months of the year. I have a stacked select query on top of that crosstab query that uses the latest 2 months data and exports it to a fixed length...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.