Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cross Tab or Query or Report

Status
Not open for further replies.

pat731

Technical User
Jan 12, 2003
39
US
I need to find out a few counts of different fields. I tried a crosstab but it didn't work so I NEED to figure out if a query or report would do it for me.
I have fields
race - gender - act code - term -- expre

a m 1-11 22003 1 or 2
b f
c
x

So I need the bottom line count of race,gender, act code and matching expre 1 or 2 in term 22003. Any ideas would help
 
If you are asking for a total line at the bottom of you cross tab it is very easy to do.

Create two cross tabs exactly the same. Take one of them (which will become the total line) and modify the grouping so that you get a single record displayed. Do this by change the field name line of the rowHeading that contains the groupby, modify it by placing a ":" after the field name then follow that with "Z-TOTAL". Now when you run this query you get a single row with the column totals.

Step two create a union query using both of the above queries and you and up with a cross tab with totals across and down. Naming the total line "Z-Total" alphabetically brings it to the bottom. Sometimes you may need to be inventive with the name in order to firce it to the bottom.

Hope this is what you where looking for.
Good Luck
ssecca

 
Hi,
I wrote an FAQ on crosstabs. Just click on this link: faq703-2868 HTH, [pc2]
Randy Smith
California Teachers Association
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top