<< Go back to all functions

DSUM

The DSUM function in Google Sheets is a powerful tool to return the sum of values selected from a database table-like array or range using a SQL-like query. Whether you're working with a database, analyzing data, or performing calculations, the DSUM function simplifies the task. Dive into our comprehensive guide to master its application.

Function Syntax and Parameters

Syntax: DSUM(database, field, criteria)

Parameters:

  • database: The range or array representing the database table.
  • field: The column or field to sum.
  • criteria: The criteria to meet. This can be a single condition or multiple conditions separated by the AND or OR operators.

Step-by-Step Tutorial

  1. Using DSUM with a database table-like array:

    • Example: =DSUM(A1:C10, "Sales", "Region='West'")
    • Result: Returns the sum of the "Sales" field from the database table defined by the range A1:C10 where the "Region" field is equal to "West".
  2. Using DSUM with a range:

    • Example: If A2:C10 has the database table, then =DSUM(A2:C10, "Quantity", "Category='Electronics'") will return the sum of the "Quantity" field from the database table where the "Category" field is equal to "Electronics".

Use Cases and Scenarios

  1. Inventory Management: Calculate the total stock quantity for a specific category.
  2. Sales Analysis: Determine the sum of sales for a particular Sales Representative.
  3. Expense Tracking: Calculate the total expenses based on specific criteria.

Related Functions

  • DGET: Returns the single value from a database table-like array or range using a SQL-like query.
  • DAVERAGE: Calculates the average of selected database entries using a SQL-like query.

Related Articles