Total SUM in crosstab query

S

Santa-D

I've got a crosstab query which sums the total number of vehicles per
business area over two ranges.

What I want to do is add a total row at the bottom of the report, is
this possible?

The output of the crosstab query looks like this.

BADesc FR205872 FR205916
Area 1 182
Area 2 21
Area 3 3
Area 4 160
Area 5 5
Area 6 4
Area 7 8
Area 8 152
Area 9 4
Area 10 1
Area 11 34

* I want to add a total row so it sums the total number of vehicles.


The Design of the crosstab looks like this:

Field: BADESC Invoice No.
Current Vehicle
Table: Seg 1 - Bus Area statefleet-extract MAIN
Total: Group by Group by
Count
Crosstab: Row Heading Column Heading Value
 
D

Duane Hookom

You should be able to create totals like any other numeric field:
=Sum([Your Column Heading Value])
 
G

Gary Walter

PMFBI

In addition to Duane's sage response,
maybe another way of thinking about it......

sample NorthWind example:

TRANSFORM Count(*) AS countCity
SELECT
Customers.Country,
Count([countCity]) AS DistinctCityCount,
Count(Customers.City) AS TotalCityCountForCountry,
DCount("City","Customers") AS uberCount
FROM Customers
GROUP BY Customers.Country
PIVOT Customers.City;

the total count of all cities (uberCount) will be
*in every row of result,* not at "bottom" though.

Field: uberCount: DCount("[Current Vehicle]","MAIN")
Table:
Total: Expression
Crosstab: Row Heading
Sort:
Criteria:
or:

of course, Duane's solution of just summing at bottom
of report would be much more efficient (plus you would
not have to worry about adding filter clause to domain
function if you filter report).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Crosstab voes 5
CrossTab Query Format 2
Help on crosstab query 2
Crosstab Query Question 5
dynamic crosstab query 2
Crosstab column data count 6
Crosstab Query 2
crosstab query 3

Top