How to Sum Multiple Fields and Filter the Total in Access
Question details
The user needs to sum multiple repeating columns (such as quarterly fields) in an Access query and apply filters to the calculated total based on form inputs.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- Calculating a total sum across multiple repeating fields in a database query and filtering the results dynamically.
- Observed behavior
- The current unnormalized table design makes it difficult to maintain, calculate, and filter total values across multiple quarterly fields.
Before modifying your query structure, identify all the fields you need to sum and ensure you have the necessary permissions to alter the database table design if normalization is required.
Normalize the Table Design for Easier Querying
The most robust way to handle repeating data is to normalize your table design by storing one record per reporting period.
Storing repeating data groups (like 16 individual quarterly fields) as separate columns violates database normalization principles. A normalized production table makes quarterly and annual totals much easier to calculate and filter.
Design a new production table with fields such as ProductionID, MineID, ProductionDate, and Tonnage.
Restructure your data so that each reporting period is stored as a separate record rather than a separate column.
In Access, create a new query and use the Group By feature on fields like MineID and ProductionDate.
Add the Tonnage field to the query grid, change the Total row to Sum, and let Access calculate the total automatically.
Apply criteria to the query by referencing your form controls, for example, setting the year criteria to Forms!frmMineTonnage!ProductionYear.

Create a Calculated Field in Your Existing Query
If you cannot change the current table structure, you can add all the fields together in a calculated query column and apply criteria to it.
Manage Your Office Documents Easily with WPS Office
While database structures like Microsoft Access require complex queries and table normalization, many data management and aggregation tasks can be handled efficiently with spreadsheets. WPS Office provides a free, lightweight, and powerful alternative to Microsoft Office, offering full compatibility with Excel formats for your data analysis needs.
- 1. Download WPS Office: Visit the official WPS website and download the free installer.
- 2. Install the suite: Run the installer and follow the on-screen instructions to set up the lightweight office suite.
- 3. Open WPS Spreadsheet: Launch WPS Spreadsheet to easily manage, sum, and filter your tabular data.

Frequently Asked Questions
Why is my calculated query field showing blank results when summing columns?
If any of the fields you are adding together contain a Null value, standard addition will result in a Null. Use the Nz() function, such as Nz([Field1], 0) + Nz([Field2], 0), to treat blank fields as zeros.
Can I filter a calculated field in the same query it was created?
Yes, you can filter a calculated field by placing your criteria directly in the Criteria row of that column in the Access Query Design view.
What is table normalization in Access?
Normalization is the process of organizing data in a database to reduce redundancy and improve data integrity, such as turning repeating column groups (like Q1, Q2, Q3) into distinct rows in a related table.
How do I reference a form text box in an Access query?
You can reference a form control using the expression builder format: Forms!YourFormName!YourControlName. Ensure the form is open and loaded when running the query.




