Google Sheets DSUM Function: Syntax, Examples & Tips

The DSUM function calculates the sum of a specified column in a database that meets given criteria.
Google Sheets
DSUM(database, field, criteria)

One free generation or explanation per browser, shared across Excel and Google Sheets. Account usage limits apply afterward.

On this page
  1. Parameters
  2. What is a DSUM?
  3. A Practical Example
  4. DSUM Formula
  5. Result of the Formula
  6. Why Use DSUM?
  7. Key Takeaways:
  8. Example use case

Parameters

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.

What is a DSUM?

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.

A Practical Example

Imagine you are managing a sales database that contains records of transactions:

Sales Database:

DateProductAmount
2023-01-01Widget A100
2023-01-02Widget B150
2023-01-03Widget A200
2023-01-04Widget C300
2023-01-05Widget B250

You want to calculate the total sales amount for "Widget A".

DSUM Formula

To achieve this, you would use the DSUM function as follows:

Google Sheets
=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".

Result of the Formula

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".

Why Use DSUM?

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.

Key Takeaways:

  • DSUM: A powerful function for summing values in a dataset based on specified criteria.
  • Dynamic Filtering: Allows for easy adjustments to criteria, enabling quick recalculations as needed.
  • Structured Data: Ideal for use with databases or tables where data is organized in rows and columns.
  • Common Use Cases: Useful for financial analysis, sales reporting, and any scenario where conditional summation is required.

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!

Example use case

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.

Need more help with Google Sheets formulas?

Sign up for Better Analyst and get unlimited AI-powered formula generation, explanations, and advanced data analysis.

Explore all Google Sheets formulas

Browse our complete library of Google Sheets formula guides

Compare your options

Decide with evidence, not a sales pitch.

Open a neutral research prompt in the AI tool you already use. Compare capabilities, limitations, and fit before you choose.

  1. 01ChatGPTOpen a balanced comparison prompt in ChatGPT.
  2. 02ClaudeOpen the same research prompt in Claude.
  3. 03PerplexityResearch the comparison with linked web sources.

AI answers can be incomplete. Check source links, current pricing, and product documentation before deciding.