# Google Sheets DSUM Function: Syntax, Examples & Tips

- URL: https://betteranalyst.com/google-sheets/dsum-function
- Author: Better Analyst

Formula Bot is now Better Analyst—same account, more powerful analysis.Formula Bot is now Better Analyst—same account and workflows, with more powerful analysis, dashboards, and automation.

[Learn what changed](https://betteranalyst.com/formula-bot-is-now-better-analyst)

The DSUM function calculates the sum of a specified column in a database that meets given criteria.

```
DSUM(database, field, criteria)
```

Generate FormulaExplain Formula

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

Describe the DSUM you need in plain EnglishGenerate Formula

## 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:

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

## DSUM Formula

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

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

[Create Free Account](https://betteranalyst.com/signup)[Try Formula Generator](https://betteranalyst.com/excel-ai)

## Google Sheets how-to guides

- [How To Highlight Duplicates In Google Sheets](https://betteranalyst.com/google-sheets/how-to-highlight-duplicates-in-google-sheets)
- [How To Insert Checkbox In Google Sheets](https://betteranalyst.com/google-sheets/how-to-insert-checkbox-in-google-sheets)
- [How To Insert Multiple Rows In Google Sheets](https://betteranalyst.com/google-sheets/how-to-insert-multiple-rows-in-google-sheets)
- [How To Lock A Row In Google Sheets](https://betteranalyst.com/google-sheets/how-to-lock-a-row-in-google-sheets)
- [How To Lock Cells In Google Sheets](https://betteranalyst.com/google-sheets/how-to-lock-cells-in-google-sheets)
- [How To Make A Copy Of An Google Sheets Sheet](https://betteranalyst.com/google-sheets/how-to-make-a-copy-of-an-google-sheets-sheet)
- [How To Make A Graph In Google Sheets](https://betteranalyst.com/google-sheets/how-to-make-a-graph-in-google-sheets)
- [How To Make A Histogram In Google Sheets](https://betteranalyst.com/google-sheets/how-to-make-a-histogram-in-google-sheets)

## 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.](https://chatgpt.com/?prompt=Compare%20Better%20Analyst%20with%20using%20a%20general-purpose%20AI%20assistant%20for%20data%20analysis.%20Evaluate%20spreadsheet%20and%20document%20analysis%2C%20dashboards%2C%20repeatable%20reports%2C%20code%20transparency%2C%20data%20connections%2C%20pricing%2C%20and%20limitations.%20Use%20current%20public%20sources%2C%20distinguish%20verified%20facts%20from%20assumptions%2C%20and%20explain%20which%20types%20of%20users%20each%20option%20fits%20best.)
2. [02ClaudeOpen the same research prompt in Claude.](https://claude.ai/new?q=Compare%20Better%20Analyst%20with%20using%20a%20general-purpose%20AI%20assistant%20for%20data%20analysis.%20Evaluate%20spreadsheet%20and%20document%20analysis%2C%20dashboards%2C%20repeatable%20reports%2C%20code%20transparency%2C%20data%20connections%2C%20pricing%2C%20and%20limitations.%20Use%20current%20public%20sources%2C%20distinguish%20verified%20facts%20from%20assumptions%2C%20and%20explain%20which%20types%20of%20users%20each%20option%20fits%20best.)
3. [03PerplexityResearch the comparison with linked web sources.](https://www.perplexity.ai/search?q=Compare%20Better%20Analyst%20with%20using%20a%20general-purpose%20AI%20assistant%20for%20data%20analysis.%20Evaluate%20spreadsheet%20and%20document%20analysis%2C%20dashboards%2C%20repeatable%20reports%2C%20code%20transparency%2C%20data%20connections%2C%20pricing%2C%20and%20limitations.%20Use%20current%20public%20sources%2C%20distinguish%20verified%20facts%20from%20assumptions%2C%20and%20explain%20which%20types%20of%20users%20each%20option%20fits%20best.)

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