Can I add totals to a query column?

kblehman

Registered User.
Local time
Yesterday, 20:28
Joined
May 11, 2007
Messages
22
I have a rather simple query that shows the number of layoffs in a given period and would like to know if I can have the query sum the numbers.


Company City Date Incident Laid-Off
CompanyABC CityABC 5/3/2007 Mass Layoff 207
CompanyKLM CityKLM 5/5/2007 Mass Layoff 54
CompanyQRS CityQRS 5/7/2007 Plant Closing 436
CompanyXYZ CityXYZ 5/9/2007 Plant Closing 75


Is it possible to somehow display the total (772) underneath the "Laid-Off" column? Or create a separate column that only displays the "Laid-Off" total?

Or would it be easier to just build a report from the query and display laid off totals on the report?

(I apologize for the "table." I tried to import the query results as an image but couldn't get it to work.)

Thanks in advance for your help,
Kerry
 
The simplest way is to base a report on that query and do the totals on the report. What you ask can be done (UNION query), but since we don't typically expose queries to the user directly anyway, why bother?
 
Well, the user does see the results of this query (and a couple other simple ones) but I agree with your assessment. I'll suggest to the users that the queries that they need totals for be converted to reports. Thanks, PB.
 
Well, like I said, it can be done. You create a second query that returns the total, and UNION the 2 queries together.
 

Users who are viewing this thread

Back
Top Bottom