If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
zero sums
I'm confused about the Is Null feature in queries.
I have a query that sums 25 values, val1, val2,val3.... From that i print out a bar chart in a report that shows the magnitude of these values. I would like to ignore zero summed values so it fits nicer on the chart. How would i enter in the code either in SQL or in the criteria of the query? |
#2
|
|||
|
|||
zero sums
Dear SoLah:
After the GROUP BY clause, and before the ORDER BY clause (if any) put in: HAVING SUM(val1) 0 AND . . . Does this do it? Tom Ellison "SoLah" wrote in message ... I'm confused about the Is Null feature in queries. I have a query that sums 25 values, val1, val2,val3.... From that i print out a bar chart in a report that shows the magnitude of these values. I would like to ignore zero summed values so it fits nicer on the chart. How would i enter in the code either in SQL or in the criteria of the query? |
#3
|
|||
|
|||
zero sums
If you are saying that you don't want to include rows that have nulls in any
of the fields you are summing, you would include all the fields you are summing in the query, uncheck the "Show" box, and put something like the following in the criterion beneath each: Is Not Null However, if you have a table with fields named something like [Val1] and [Val2] and [Val3] and ..., you probably have a spreadsheet, not a relational database. Access provides a very powerful (and very easy) Totals query, but it only works on well-normalized data. That is, one field with values can be summed quite easily in an Access Totals query, but you will have to work quite hard to "sum" a series of fields as your description implies. Regards Jeff Boyce Microsoft Office/Access MVP "SoLah" wrote in message ... I'm confused about the Is Null feature in queries. I have a query that sums 25 values, val1, val2,val3.... From that i print out a bar chart in a report that shows the magnitude of these values. I would like to ignore zero summed values so it fits nicer on the chart. How would i enter in the code either in SQL or in the criteria of the query? |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Multiple Sums Depending on a description. | Hanzo | Worksheet Functions | 9 | December 28th, 2005 11:56 PM |
Calculating Row and Column Sums in a Crosstab Query | van_slanzar | Running & Setting Up Queries | 1 | August 31st, 2005 06:01 AM |
Grouping and Sums issue (do it w/ Query or Report?) | rgrantz | Setting Up & Running Reports | 1 | December 13th, 2004 02:48 AM |
adding and subtracting sums | Neal | Worksheet Functions | 2 | September 12th, 2004 09:41 PM |
Adding, sums, formulas in Visio | AngeP | Visio | 1 | April 30th, 2004 07:53 PM |