Horizontal Sum in crosstab query

  • Thread starter Thread starter mrolt
  • Start date Start date
M

mrolt

Guest
I've created a crosstab query with countries as row headings and each of their fiscal quarter results as column headings.

Is there any way of setting up a field to automatically calculate the annual total for each row (ie. the sum of the four quarters)??

Your help would be appreciated.
 
Hi.

The following should help:

TRANSFORM Sum(VALUE) AS [The Value]
SELECT Country, Sum(VALUE) AS [Total Of VALUE]
FROM {TableName}
GROUP BY Country
PIVOT FiscalQuarter;

This will add an extra RowHeading with the Total of the Quarters.

HTH
wink.gif
 

Users who are viewing this thread

Back
Top Bottom