[AccessD] Totals on a crosstab query

Stuart McLachlan stuart at lexacorp.com.pg
Mon Oct 1 01:50:15 CDT 2007


On 30 Sep 2007 at 10:08, Arthur Fuller wrote:

> The xtab in question lists horses on the rows and lesson types on the
> columns (i.e. private, semi-private, group), then populates the columns with
> counts for the number of lessons per horse per lesson type. No problem so
> far. But the specs call for vertical totals of the columns, and I cannot
> figure out how to do them with the xtab wizard. What I need is a sum of
> each of the columns to be presented as the bottom row (i.e sum of private,
> semi-private and group columns, including all horses).
> 
> Any suggestions gratefully accepted.

In a pure query, you would need to use a UNION of the crosstab with a second 
"SELECT DISTINCT...SUM(...).......GROUP BY...." query.

If you base a report on the query, you can have a Footer section where you can do the totalling.










More information about the AccessD mailing list