DSUM(database, field, criteria)One free generation or explanation per browser, shared across Excel and Google Sheets. Account usage limits apply afterward.
database:
The range of cells that contains the data you want to analyze, including headers.
field:
The column label or index number that specifies which column in the database you want to sum. This can be a string (the header name) or a number (the column index).
criteria:
The range of cells that contains the conditions you want to apply to the database. This defines which records will be included in the sum based on the specified conditions.
The DSUM function in Google Sheets is a database function that calculates the sum of a set of values in a specified field (column) based on given criteria. It is particularly useful for summing values in a structured dataset, allowing you to filter data dynamically without needing to create separate calculations or use complex formulas.
In simpler terms, DSUM helps you to quickly calculate totals based on specific conditions, making it an invaluable tool for data analysis and reporting.
Imagine you are managing a sales database that contains records of transactions:
| Date | Product | Amount |
|---|---|---|
| 2023-01-01 | Widget A | 100 |
| 2023-01-02 | Widget B | 150 |
| 2023-01-03 | Widget A | 200 |
| 2023-01-04 | Widget C | 300 |
| 2023-01-05 | Widget B | 250 |
You want to calculate the total sales amount for "Widget A".
To achieve this, you would use the DSUM function as follows:
=DSUM(A1:C6, "Amount", D1:D2)In this formula:
A1:C6 is the range of the entire database including headers."Amount" is the field (column) from which you want to sum the values.D1:D2 is the criteria range where you specify the conditions for summing. For example, if D1 contains "Product" and D2 contains "Widget A".When you apply the DSUM formula to the sales database, the output would be:
| Total Sales for Widget A |
|---|
| 300 |
This result indicates that the total sales amount for "Widget A" is 300, which is the sum of the amounts from the two transactions involving "Widget A".
DSUM is beneficial because it allows for efficient data analysis without the need for complex filtering or additional calculations. It provides a straightforward way to sum values based on specific criteria, making it easier to derive insights from your data. Additionally, it works well with structured datasets, ensuring that your calculations remain organized and clear.
DSUM is an essential function for anyone working with data in Google Sheets, providing a robust way to enhance data analysis and reporting capabilities.
Happy spreadsheeting!
You have a sales data table with columns for product categories, sales amounts, and regions. Use DSUM to calculate total sales for a specific category in a chosen region, enabling quick insights into performance without manual calculations.
Sign up for Better Analyst and get unlimited AI-powered formula generation, explanations, and advanced data analysis.
Browse our complete library of Google Sheets formula guides
Compare your options
Open a neutral research prompt in the AI tool you already use. Compare capabilities, limitations, and fit before you choose.
AI answers can be incomplete. Check source links, current pricing, and product documentation before deciding.