# DSUM

The `DSUM` function is a database function that calculates the sum of a set of values in a specified field, subject to the provided criteria. It is commonly used for filtering large data sets based on certain criteria and calculating the total sum of a particular field that matches the criteria.

## Usage

Use the `DSUM` formula with the syntax shown below, it has 3 required parameters:

Parameters:
1. database (required):
The range of cells that make up the database, including headers.
2. field (required):
The column or field that contains the values to be summed.
3. criteria (required):
The range of cells that contain the criteria to filter the data set.

## Examples

Here are a few example use cases that explain how to use the `DSUM` formula in Google Sheets.

### Calculate total sales for a specific product

Use `DSUM` to calculate the total sales for a specific product in a large data set.

### Calculate total expenses for a specific category

Use `DSUM` to calculate the total expenses for a specific category in a large data set.

### Calculate average score for a specific group

Use `DSUM` to calculate the average score for a specific group of students in a large data set.

## Common Mistakes

`DSUM` not working? Here are some common mistakes people make when using the `DSUM` Google Sheets Formula:

### Using incorrect database range

One common mistake when using DSUM is providing an incorrect range for the database argument. Double-check that the range you provide includes all the rows and columns you need for your calculation.

### Providing incorrect field parameter

Another common mistake is providing an incorrect field parameter. Make sure that the field you want to calculate is specified correctly.

### Incorrectly specifying criteria

A common mistake is not specifying the criteria parameter correctly. Double-check that you have provided the correct criteria for your calculation.

### Incorrectly formatting criteria

Another common mistake is incorrectly formatting the criteria parameter. Make sure that you are using the correct syntax for your criteria.

### Using DSUM with non-numeric data

DSUM is designed to work with numeric data only. If you try to use it with non-numeric data, you may get unexpected results.

The following functions are similar to `DSUM` or are often used with it in a formula:

• `SUMIF`

The `SUMIF` formula is used to add up values in a range that meet a specific criterion. It can be used to sum values based on text, numbers, or dates. The formula is most commonly used in financial analysis, budgeting, and data analysis.

• `SUMIFS`

The `SUMIFS` formula is a function in Google Sheets that adds the values in a specified range based on multiple criteria. It is most commonly used to sum data that meets specific criteria, such as summing sales for a particular month by region or summing expenses for a specific category and date range.

• `AVERAGEIF`

The `AVERAGEIF` function calculates the average of a range of cells that meet a specified criteria. It is commonly used when working with large datasets to quickly calculate the average of a subset of data. The function takes a range of cells to evaluate (criteria_range), a string or value to compare against (criterion), and an optional range of cells to average (average_range). If the average_range is not specified, the function will use the same range as the criteria_range.

• `AVERAGEIFS`

The `AVERAGEIFS` formula calculates the average of a range of cells that meet multiple criteria. It is most commonly used to find the average of a range of values that meet specific conditions. The formula takes one required argument (average_range) and any number of optional argument pairs (criteria_range, criterion).

You can learn more about the `DSUM` Google Sheets function on Google Support.