Show only sum values that exceed a certain total

  • Thread starter Thread starter Trudy
  • Start date Start date
T

Trudy

I am trying to produce a report where I have a sum for a
collective amount (number field) and that will print only
when greater that a certain amount.

Anyone have an expression that will allow me to weed out
the lower numbers?

For example, I have a sum of all contributions to our
agency, I want to only print those over $5000 in the sum
of their contributions.

Thanks in advance for any help!
Trudy
 
I am trying to produce a report where I have a sum for a
collective amount (number field) and that will print only
when greater that a certain amount.

Anyone have an expression that will allow me to weed out
the lower numbers?

For example, I have a sum of all contributions to our
agency, I want to only print those over $5000 in the sum
of their contributions.

If you create a Totals query grouping by contributor and summing
contributions, you can put a criterion of >5000 on the sum field. The
SQL will be something like

SELECT <ContributorFields>, Sum([Contribution])
FROM Contributions
GROUP BY <ContributorFields>
HAVING Sum([Contribution]) > 5000;

The HAVING operator differs from the WHERE operator in that it applies
*after* the Totals operations have been done; WHERE filters the
records which go into the calculation before the summing takes place.
 
Back
Top