{"id":3738,"date":"2017-04-07T16:37:08","date_gmt":"2017-04-07T14:37:08","guid":{"rendered":"https:\/\/www.sheetgo.com\/?p=3738"},"modified":"2026-10-27T14:46:49","modified_gmt":"2026-10-27T13:46:49","slug":"formula-dsum-google-sheets","status":"publish","type":"post","link":"https:\/\/www.sheetgo.com\/es\/blog\/google-sheets-formulas\/dsum-formula-google-sheets\/","title":{"rendered":"C\u00f3mo usar DSUM en Google Sheets (criterios y ejemplos)"},"content":{"rendered":"<p>[et_pb_section fb_built=&#8221;1&#8243; admin_label=&#8221;section&#8221; _builder_version=&#8221;4.16&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221; da_is_popup=&#8221;off&#8221; da_exit_intent=&#8221;off&#8221; da_has_close=&#8221;on&#8221; da_alt_close=&#8221;off&#8221; da_dark_close=&#8221;off&#8221; da_not_modal=&#8221;on&#8221; da_is_singular=&#8221;off&#8221; da_with_loader=&#8221;off&#8221; da_has_shadow=&#8221;on&#8221; da_disable_devices=&#8221;off|off|off&#8221;][et_pb_row admin_label=&#8221;row&#8221; _builder_version=&#8221;4.16&#8243; background_size=&#8221;initial&#8221; background_position=&#8221;top_left&#8221; background_repeat=&#8221;repeat&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.16&#8243; custom_padding=&#8221;|||&#8221; global_colors_info=&#8221;{}&#8221; custom_padding__hover=&#8221;|||&#8221; theme_builder_area=&#8221;post_content&#8221;][et_pb_text _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>Google Sheets features many categories of built-in functions, including twelve database functions. These functions can only be used with data structured like a database table. In other words, the first row contains the fields or column labels, and the subsequent rows are the individual records. All the database functions have the same syntax, but each performs a different operation. When you need to sum values in your database based on specific criteria, you can use the DSUM function in Google Sheets.<\/p>\n<p>In this guide, you will learn about the syntax for the DSUM function and how to format the criteria. First, you have step-by-step instructions on how to use DSUM with a single criterion. Additionally, you have detailed examples of how to use DSUM with multiple criteria applied to a single field and how to use it with multiple criteria applied to different fields. Finally, you will learn the difference between DSUM and the <a href=\"https:\/\/www.sheetgo.com\/blog\/google-sheets-formulas\/sumif-google-sheets\/\">SUMIF and SUMIFS functions<\/a> and when it&#8217;s appropriate to use each one. You&#8217;ll also see how to write criteria as an array literal and why DSUM sometimes returns 0.<\/p>\n<p>[\/et_pb_text][et_pb_text module_id=&#8221;what-is-dsum&#8221; _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h2>What is DSUM?<\/h2>\n<p>The DSUM function returns the sum of values selected based on criteria applied to a field in your table-like array. The D stands for database, so DSUM works much like a sum query on a database table. Like other database functions in Google Sheets &#8211; e.g., DGET, DPRODUCT, or <a href=\"https:\/\/www.sheetgo.com\/blog\/google-sheets-formulas\/dcount-formula-google-sheets\/\">DCOUNT<\/a> &#8211; DSUM requires data formatted like a database table, where the first row contains the field names.<\/p>\n<h3>DSUM syntax<\/h3>\n<p>The DSUM function in Google Sheets has the following syntax:<\/p>\n<pre class=\"hljs language-excel\">=DSUM(database, field, criteria)<\/pre>\n<ul>\n<li><strong>database:<\/strong> the array or range containing the data to consider. The data has to be structured as a table where the first row contains the column headers or field labels.<\/li>\n<li><strong>field:<\/strong> specifies the column containing the values you want to sum. You can use the text corresponding to the column header or an index number. When using an index, remember that the value of the first column is \u201c1\u201d.<\/li>\n<li><strong>criteria:<\/strong> an array or range with zero or more criteria to filter the values before summing them.<\/li>\n<\/ul>\n<p>Criteria can be specified in two different ways:<\/p>\n<ul>\n<li>A range of cells containing the criteria array.<\/li>\n<li>An array expression describing the criteria array.<\/li>\n<\/ul>\n<p>This guide will focus on the first method as it provides more flexibility: it\u2019s easier to modify the criteria array. Additionally, the first method will save you a lot of typing and curly brackets. The array form is covered in the criteria section below.<\/p>\n<p>[\/et_pb_text][et_pb_text module_id=&#8221;how-to-use-dsum-in-google-sheets&#8221; _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h2>How to use DSUM in Google Sheets<\/h2>\n<p>In the cell where you want the result, type the DSUM function and select your table as the database. Next, type the column label or field name as the field. Alternatively, you can use the column index. Finally, add the conditions that values must meet to be summed.<\/p>\n<h3>1. Set up criteria<\/h3>\n<p>The first step is to set up the criteria array. In this case, I will use a single criterion to sum the sales of FirstProduct. In an empty cell, type the field name (product) and type the criterion in the cell below it (FirstProduct).<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2026\/10\/dsum-google-sheets-criteria-range.webp&#8221; alt=&#8221;DSUM Google Sheets \u2014 criteria range with the product header and FirstProduct below it, next to the transactions table&#8221; title_text=&#8221;Criteria range with the product header and FirstProduct below it, next to the transactions table&#8221; align=&#8221;center&#8221; _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; width=&#8221;100%&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h3>2. Type the DSUM function<\/h3>\n<p>In the cell where you want the result, type the DSUM function. Select the range of cells containing the database or type the <a href=\"https:\/\/golayer.io\/blog\/google-sheets\/named-ranges-in-google-sheets\/\" target=\"_blank\" rel=\"noopener\">range name<\/a> as the first parameter.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2026\/10\/dsum-google-sheets-type-function.webp&#8221; alt=&#8221;DSUM Google Sheets \u2014 DSUM typed in K3 with transactions as the database and the syntax tooltip open&#8221; title_text=&#8221;DSUM typed in K3 with transactions as the database and the syntax tooltip open&#8221; align=&#8221;center&#8221; _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; width=&#8221;100%&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h3>3. Add the field and criteria<\/h3>\n<p>For the second parameter, type the field label or column between quotation marks: \u201camount\u201d. For the third parameter, select the range of cells containing your criterion.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2026\/10\/dsum-google-sheets-field-and-criteria.webp&#8221; alt=&#8221;DSUM Google Sheets \u2014 formula with the amount field and the criteria range J2:J3 selected&#8221; title_text=&#8221;Formula with the amount field and the criteria range J2:J3 selected&#8221; align=&#8221;center&#8221; _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; width=&#8221;100%&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h3>4. Get the DSUM result<\/h3>\n<p>Remember to close the parenthesis and press \u2018Enter\u2019 to see the result.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2026\/10\/dsum-google-sheets-result.webp&#8221; alt=&#8221;DSUM Google Sheets \u2014 result of $376,335.34 for FirstProduct sales in cell K3&#8243; title_text=&#8221;Result of $376,335.34 for FirstProduct sales in cell K3&#8243; align=&#8221;center&#8221; _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; width=&#8221;100%&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text module_id=&#8221;how-to-write-dsum-criteria-in-google-she&#8221; _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h2>How to write DSUM criteria in Google Sheets<\/h2>\n<p>The criteria array works like a small table. Its first row holds field names that match the headers of your database exactly, and the rows below hold the conditions. DSUM reads it with two rules:<\/p>\n<ul>\n<li>Conditions in the same row must all be true (AND).<\/li>\n<li>Conditions in different rows are alternatives (OR): a record counts if it matches any one row.<\/li>\n<\/ul>\n<p>A condition can be a value, such as FirstProduct, or a comparison, such as &gt;=1\/1\/22 or &lt;2\/1\/22. To set a range on one field, repeat its name in two columns, as in the date example below.<\/p>\n<h3>DSUM with multiple criteria<\/h3>\n<p>Put each AND condition in its own column and each OR alternative in its own row. When you combine both, repeat the AND conditions on every row. A blank cell sets no condition, so a row that leaves one out matches every value in that field. The examples below walk through each case.<\/p>\n<h3>DSUM criteria as an array literal<\/h3>\n<p>Instead of a range, you can type the criteria into the formula as an array literal. Commas separate columns and semicolons separate rows: the first row holds the field names and each row after it holds conditions. With the sample data in this guide, this formula sums the sales of FirstProduct:<\/p>\n<pre class=\"hljs language-excel\">=DSUM(transactions,\"amount\",{\"product\";\"FirstProduct\"})<\/pre>\n<p>This one sums the sales of FirstProduct or SecondProduct made by Agent1:<\/p>\n<pre class=\"hljs language-excel\">=DSUM(transactions,\"amount\",{\"product\",\"sales_agent\";\"FirstProduct\",\"Agent1\";\"SecondProduct\",\"Agent1\"})<\/pre>\n<p>If your spreadsheet locale uses a comma as the decimal separator, separate columns with a backslash instead of a comma. Array literals suit one or two fixed conditions. For longer criteria, a range is easier to read and change.<\/p>\n<p>[\/et_pb_text][et_pb_text module_id=&#8221;dsum-examples-with-multiple-criteria&#8221; _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h2>DSUM examples with multiple criteria<\/h2>\n<p>Now that you know how to use DSUM with a single criterion, it\u2019s time to use it with multiple criteria. The first examples focus on multiple criteria applied to a single field. In the first case, I want to include rows that match any of the criteria (OR). In the second, I want to include rows with values in a specific range by specifying the maximum and minimum values (AND). The third example focuses on applying multiple criteria to different fields (AND).<\/p>\n<h3>Google Sheets DSUM with multiple criteria for the same column (OR)<\/h3>\n<p>Using DSUM, you can apply multiple criteria to the same column. Your criteria array can contain multiple rows under the field name, with each criterion on its own row. For this example, I want to sum the records if they contain \u201cFirstProduct\u201d or \u201cSecondProduct\u201d.<\/p>\n<p><strong>1. <\/strong>Set up the criteria array as shown below.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2026\/10\/dsum-multiple-criteria-or-criteria-range.webp&#8221; alt=&#8221;DSUM multiple criteria \u2014 OR criteria range with FirstProduct and SecondProduct under the product header&#8221; title_text=&#8221;OR criteria range with FirstProduct and SecondProduct under the product header&#8221; align=&#8221;center&#8221; _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; width=&#8221;100%&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><strong>2. <\/strong>In an empty cell, type the DSUM function and select the table as the database.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2026\/10\/dsum-multiple-criteria-or-function.webp&#8221; alt=&#8221;DSUM multiple criteria \u2014 DSUM typed under a sum header with transactions as the database&#8221; title_text=&#8221;DSUM typed under a sum header with transactions as the database&#8221; align=&#8221;center&#8221; _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; width=&#8221;100%&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p id=\"google-sheets-dsum-with-multiple-criteria-for-the-same-column-or-section\">3. Type the field between quotation marks, and after the comma, select the cells with the criteria array.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2026\/10\/dsum-multiple-criteria-or-select-criteria.webp&#8221; alt=&#8221;DSUM multiple criteria \u2014 formula with the amount field and the criteria range J1:J3 selected&#8221; title_text=&#8221;Formula with the amount field and the criteria range J1:J3 selected&#8221; align=&#8221;center&#8221; _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; width=&#8221;100%&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><strong>4. <\/strong>Press \u2018Enter\u2019 to see the result.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2026\/10\/dsum-multiple-criteria-or-result.webp&#8221; alt=&#8221;DSUM multiple criteria \u2014 result of $755,096.26 for FirstProduct or SecondProduct sales&#8221; title_text=&#8221;Result of $755,096.26 for FirstProduct or SecondProduct sales&#8221; align=&#8221;center&#8221; _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; width=&#8221;100%&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h3>Google Sheets DSUM with multiple criteria for the same column (AND)<\/h3>\n<p>In this example, you\u2019ll learn how to apply multiple criteria to a single column using AND. Follow the steps below to sum the sales made between two dates: on or between January 1st and January 31st.<\/p>\n<p><strong>1. <\/strong>Set up the criteria array as shown below.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2026\/10\/dsum-multiple-criteria-and-date-range.webp&#8221; alt=&#8221;DSUM multiple criteria \u2014 two date columns set to on or after 1\/1\/22 and before 2\/1\/22&#8243; title_text=&#8221;Two date columns set to on or after 1\/1\/22 and before 2\/1\/22&#8243; align=&#8221;center&#8221; _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; width=&#8221;100%&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><strong>2. <\/strong>In the cell where you want the result, type the DSUM function and select the table as the database.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2026\/10\/dsum-multiple-criteria-and-function.webp&#8221; alt=&#8221;DSUM multiple criteria \u2014 DSUM typed in L2 with transactions as the database&#8221; title_text=&#8221;DSUM typed in L2 with transactions as the database&#8221; align=&#8221;center&#8221; _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; width=&#8221;100%&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><strong>3. <\/strong>Type the field between quotation marks as the second parameter, and select the cells with the criteria array as the third.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2026\/10\/dsum-multiple-criteria-and-select-criteria.webp&#8221; alt=&#8221;DSUM multiple criteria \u2014 formula with the amount field and the date criteria range J1:K2 selected&#8221; title_text=&#8221;Formula with the amount field and the date criteria range J1:K2 selected&#8221; align=&#8221;center&#8221; _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; width=&#8221;100%&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><strong>4. <\/strong>Close the parenthesis and press \u2018Enter\u2019 to see the result.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2026\/10\/dsum-multiple-criteria-and-result.webp&#8221; alt=&#8221;DSUM multiple criteria \u2014 result of $96,343.95 for sales made in January 2022&#8243; title_text=&#8221;Result of $96,343.95 for sales made in January 2022&#8243; align=&#8221;center&#8221; _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; width=&#8221;100%&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h3>Google Sheets DSUM with multiple criteria for different columns<\/h3>\n<p>In this example, you will learn to apply different criteria to different fields by structuring the array using AND and OR logic. For records to be included in the sum, they must match all the criteria specified for each field.<\/p>\n<p>In this case, the record must contain \u201cFirstProduct\u201d OR \u201cSecondProduct\u201d in the \u201cproduct\u201d field and \u201cAgent1\u201d in the \u201csales_agent\u201d field. Additionally, the date must be on or after January 1st but before July 1st.<\/p>\n<p><strong>1. <\/strong>Set up the criteria array as shown below. In this case, it will contain four columns and three rows, as shown below. Since there are two conditions in the first field (OR), the criteria for the other fields must be repeated in each row.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2026\/10\/dsum-criteria-different-columns-range.webp&#8221; alt=&#8221;DSUM criteria \u2014 range J1:M3 with product, sales_agent and two date columns on two rows&#8221; title_text=&#8221;Range J1:M3 with product, sales_agent and two date columns on two rows&#8221; align=&#8221;center&#8221; _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; width=&#8221;100%&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><strong>2. <\/strong>In the cell where you want the result, type the DSUM function and select the table as the database.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2026\/10\/dsum-criteria-different-columns-function.webp&#8221; alt=&#8221;DSUM criteria \u2014 DSUM typed in N2 with transactions as the database&#8221; title_text=&#8221;DSUM typed in N2 with transactions as the database&#8221; align=&#8221;center&#8221; _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; width=&#8221;100%&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><strong>3. <\/strong>Type the field name in quotes as the second parameter and select the criteria array as the third.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2026\/10\/dsum-criteria-different-columns-select.webp&#8221; alt=&#8221;DSUM criteria \u2014 formula with the amount field and the criteria range J1:M3 selected&#8221; title_text=&#8221;Formula with the amount field and the criteria range J1:M3 selected&#8221; align=&#8221;center&#8221; _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; width=&#8221;100%&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><strong>4. <\/strong>Press \u2018Enter\u2019 to see the result.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2026\/10\/dsum-criteria-different-columns-result.webp&#8221; alt=&#8221;DSUM criteria \u2014 result of $104,289.00 for Agent1 sales of both products&#8221; title_text=&#8221;Result of $104,289.00 for Agent1 sales of both products&#8221; align=&#8221;center&#8221; _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; width=&#8221;100%&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text module_id=&#8221;why-dsum-returns-0&#8243; _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h2>Why DSUM returns 0<\/h2>\n<p>If DSUM returns 0 when you expect a total, check the field first. Like SUM, DSUM adds only numbers, so pointing it at a text column, such as product names, gives you 0.<\/p>\n<p>Then check the criteria labels. Each one has to match a database header exactly. A criteria label that says Protein won&#8217;t match a header that says Protein (g), so no record matches and the sum is 0.<\/p>\n<p>[\/et_pb_text][et_pb_text module_id=&#8221;what-is-the-difference-between-dsum-and&#8221; _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h2>What is the difference between DSUM and SUMIF?<\/h2>\n<p><a href=\"https:\/\/www.sheetgo.com\/blog\/google-sheets-formulas\/sumif-google-sheets\/\">SUMIF and SUMIFS<\/a> can be used on data that is not formally structured. To use the DSUM function, you must structure your data like a database table, with field names or column headers in the first row. This makes it easy to specify criteria without writing long or complex expressions.<\/p>\n<p>Therefore, if the data you want to use is not structured in a database-like table, you can use SUMIF or SUMIFS. However, if your data is already structured as a database table, DSUM requires less explicit cell referencing, and criteria can also be supplied in tabular form. If you prefer the formula approach, see how to use <a href=\"https:\/\/www.sheetgo.com\/blog\/google-sheets-formulas\/sumifs-with-multiple-criteria\/\">SUMIFS with multiple criteria<\/a>.<\/p>\n<p>[\/et_pb_text][et_pb_text module_id=&#8221;conclusion&#8221; _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h2>Conclusion<\/h2>\n<p>The DSUM function in Google Sheets is useful and flexible. While it does require that you structure your data in a specific way, this makes it easier to use with multiple conditions using both AND and OR logic. The <a href=\"https:\/\/www.sheetgo.com\/blog\/google-sheets-formulas\/sumif-google-sheets\/\">SUMIF and SUMIFS functions<\/a> can be used with unstructured data, but you need to write longer conditions with many explicit cell references and logical operators to join them. DSUM, on the other hand, allows you to specify your criteria array as a table, where the placement of the field names and values determines the logic. In other words, if your data is already structured like a table in a database, DSUM will get results with a cleaner formula and much less typing.<\/p>\n<p>To learn about other methods of adding numbers in Google Sheets, check out our guide on <a href=\"https:\/\/golayer.io\/blog\/google-sheets\/how-to-add-numbers-in-google-sheets\/\" target=\"_blank\" rel=\"noopener\">how to add numbers in Google Sheets<\/a>.<\/p>\n<p>DSUM is one of several ways to filter and total data in Google Sheets. For more control over which rows you pull out, see the <a href=\"https:\/\/www.sheetgo.com\/blog\/google-sheets-formulas\/filter-formula-google-sheets\/\">FILTER formula<\/a> and the <a href=\"https:\/\/www.sheetgo.com\/blog\/google-sheets-formulas\/query-formula-google-sheets\/\">QUERY formula<\/a>.<\/p>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][\/et_pb_section]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Google Sheets features many categories of built-in functions, including twelve database functions. These functions can only be used with data structured like a database table. In other words, the first row contains the fields or column labels, and the subsequent rows are the individual records. All the database functions have the same syntax, but each [&hellip;]<\/p>\n","protected":false},"author":40,"featured_media":3835,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_et_pb_use_builder":"on","_et_pb_old_content":"The <a href=\"https:\/\/support.google.com\/docs\/answer\/3094281?hl=en\">DSUM<\/a> formula in Google Sheets is almost similar to that of the <a href=\"https:\/\/support.google.com\/docs\/answer\/3093669?hl=en\">SUM<\/a> formula, but with a distinction. It gives us the sum of values available in a table like range, that meet a specified criteria. This is analogous to an SQL database sum query. The 'D' in the DSUM stands for 'Database', therefore, we can call this a Database SUM formula.\n<h3>Syntax<\/h3>\n<span style=\"font-size: 14pt;\"><strong><span style=\"font-family: courier new,courier,monospace;\">DSUM(database, field, criteria)<\/span><\/strong><\/span>\n<ul>\n \t<li><span style=\"font-size: 12pt; font-family: courier new,courier,monospace;\"><strong>database<\/strong><\/span> - is the reference to a structured data range that consists of labels, for each column, in the first row.<\/li>\n \t<li><span style=\"font-family: courier new,courier,monospace; font-size: 12pt;\"><strong>field<\/strong><\/span> - indicates the column on which the DSUM formula should sum the numeric values. This can be a text or a column index too.<\/li>\n \t<li><span style=\"font-family: courier new,courier,monospace; font-size: 12pt;\"><strong>criteria<\/strong><\/span> - this is a reference to a range that consists of criteria that the formula uses to filter the <span style=\"font-family: courier new,courier,monospace; font-size: 12pt;\"><strong>database<\/strong><\/span> values before counting.<\/li>\n<\/ul>\n<h3>Usage: DSUM Formula<\/h3>\nLet us assume that the below list of foods is our secret diet suggested by a nutritionist. We will try our hands with a few examples.\n\n<img class=\"aligncenter size-full wp-image-3763\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2017\/10\/frame-generic-54.png\" alt=\"DSUM Formula - Illustration 1\" width=\"1248\" height=\"360\" \/>\n\nWe see that the data set is in a labeled tabular form spanning across cells A4 through to G13. And the criteria is keyed in the cells A1 through to G2.\n\nPlease note from the cases illustrated above that we can specify one or more criteria to filter the summing process. For example, the case in the row # 7 sums the values in the \"Carbs (g)\" column, subject to the criteria in the cell D2. Whereas the case in row # 11 sums the values from \"Fat (g)\" column, subject to the criteria within the cells C2 and D2. The last case on row # 12 includes all the criteria from A2 through to G2, and apparently there are two rows (9 & 10) that satisfies all of these conditions, hence the result 59.\n\nThe case on the row # 10 is a rather interesting one! We didn't specify anything in the cell G2, yet, we gave that reference to the DSUM formula. The result is 40.5, because it summed everything in the \"Fiber (g)\" column as there is no criteria to filter out the rows.\n<h5>Unwarranted Cases<\/h5>\nNow, let us talk about pitfalls. Here is the first one, which we might already be aware of. Please consider the first case in the snapshot below.\n\n<img class=\"aligncenter size-full wp-image-3765\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2017\/10\/frame-generic-55.png\" alt=\"DSUM Formula - Illustration 2\" width=\"1237\" height=\"360\" \/>\n\nHere, we tried summing non numeric values! Just like the SUM formula, DSUM formula sums only numbers. Therefore, it returned '0' as output.\n\nHere's the second one in the image below.\n\n<img class=\"aligncenter size-full wp-image-3766\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2017\/10\/frame-generic-56.png\" alt=\"DSUM Formula - Illustration 3\" width=\"1238\" height=\"363\" \/>\n\nSeemingly there's nothing wrong with the formula this time but the result isn't what we are expecting. The problem lies within the labels. Apparently, a missing or a mismatched label doesn't help the DSUM formula, as its working hinges on the field name that the second parameter takes. Since the labels didn't match, it returned the sum as zero.\n\n\u00a0","_et_gb_content_width":"","footnotes":""},"categories":[54],"tags":[39,28],"class_list":["post-3738","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-google-sheets-formulas","tag-connections-t","tag-spreadsheets"],"acf":[],"permalink_manager":null,"_links":{"self":[{"href":"https:\/\/www.sheetgo.com\/es\/wp-json\/wp\/v2\/posts\/3738","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sheetgo.com\/es\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sheetgo.com\/es\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sheetgo.com\/es\/wp-json\/wp\/v2\/users\/40"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sheetgo.com\/es\/wp-json\/wp\/v2\/comments?post=3738"}],"version-history":[{"count":0,"href":"https:\/\/www.sheetgo.com\/es\/wp-json\/wp\/v2\/posts\/3738\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sheetgo.com\/es\/wp-json\/wp\/v2\/media\/3835"}],"wp:attachment":[{"href":"https:\/\/www.sheetgo.com\/es\/wp-json\/wp\/v2\/media?parent=3738"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sheetgo.com\/es\/wp-json\/wp\/v2\/categories?post=3738"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sheetgo.com\/es\/wp-json\/wp\/v2\/tags?post=3738"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}