{"id":3738,"date":"2017-04-07T16:37:08","date_gmt":"2017-04-07T14:37:08","guid":{"rendered":"https:\/\/www.sheetgo.com\/?p=3738"},"modified":"2017-04-07T16:37:08","modified_gmt":"2017-04-07T14:37:08","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 utilizar la f\u00f3rmula DSUM de Google Sheets"},"content":{"rendered":"<p>[et_pb_section fb_built=&#8221;1&#8243; admin_label=&#8221;section&#8221; module_class=&#8221;sheetgo-post&#8221; _builder_version=&#8221;4.16&#8243; custom_padding=&#8221;54px|0px|0|0px|false|false&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#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.27.2&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>The<span>\u00a0<\/span><a href=\"https:\/\/support.google.com\/docs\/answer\/3094281?hl=en\" target=\"_blank\" rel=\"noopener noreferrer\">DSUM<\/a>\u00a0Google Sheets formula is almost similar to that of the<span>\u00a0<\/span><a href=\"https:\/\/support.google.com\/docs\/answer\/3093669?hl=en\" target=\"_blank\" rel=\"noopener noreferrer\">SUM<\/a><span>\u00a0<\/span>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 \u2018D\u2019 in the DSUM stands for \u2018Database\u2019, therefore, we can call this a Database SUM formula.<\/p>\n<p>[\/et_pb_text][et_pb_text admin_label=&#8221;Connections B &#8211; Importrange alternative &#8211; Horizontal&#8221; module_class=&#8221;sheetgo-post-no-shadow-img md2-contained-button vertical-banner-container&#8221; _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; background_color=&#8221;#f2f7ff&#8221; max_width=&#8221;700px&#8221; module_alignment=&#8221;center&#8221; max_height=&#8221;300px&#8221; custom_margin=&#8221;20px|0px|20px|0px|true|true&#8221; custom_padding=&#8221;25px|25px|25px|25px|true|true&#8221; sticky_limit_bottom=&#8221;section&#8221; border_radii=&#8221;on|20px|20px|20px|20px&#8221; border_width_all=&#8221;1px&#8221; border_color_all=&#8221;#d9e7ff&#8221; saved_tabs=&#8221;all&#8221; global_colors_info=&#8221;{}&#8221; global_module=&#8221;50475&#8243; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2024\/09\/Add-on-sm_sheets-connected-new-connection.webp\" width=\"250\" height=\"168\" alt=\"\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2024\/09\/Recommended-for-Google-Workspace-badge.webp\" width=\"150\" height=\"180\" alt=\"39\" \/><\/p>\n<p><span style=\"font-size: 22px; font-weight: 600;\">An importrange alternative, more efficient and easier to manage<\/span><\/p>\n<p><a href=\"https:\/\/workspace.google.com\/marketplace\/app\/sheetgo\/94172092257\" target=\"_blank\" rel=\"noopener\"><br \/><img decoding=\"async\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2024\/09\/available-on-google-workspace-button-text.webp\" width=\"180\" height=\"\" alt=\"\" \/><br \/><\/a><\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.16&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>&nbsp;<\/p>\n<h3>Syntax<\/h3>\n<p><span><strong>DSUM(database, field, criteria)<\/strong><\/span><\/p>\n<ul>\n<li><span><strong>database<\/strong><\/span><span>\u00a0<\/span>\u2013 is the reference to a structured data range that consists of labels, for each column, in the first row.<\/li>\n<li><span><strong>field<\/strong><\/span><span>\u00a0<\/span>\u2013 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<li><span><strong>criteria<\/strong><\/span><span>\u00a0<\/span>\u2013 this is a reference to a range that consists of criteria that the formula uses to filter the<span>\u00a0<\/span><span><strong>database<\/strong><\/span><span>\u00a0<\/span>values before counting.<\/li>\n<\/ul>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.16&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h3>Usage: DSUM Google Sheets formula<\/h3>\n<p>Let us assume that the below list of foods is our secret diet suggested by a nutritionist. We will try the formula out using a few examples.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2021\/10\/DSUM-google-sheets-1.png&#8221; alt=&#8221;DSUM google sheets 1&#8243; title_text=&#8221;DSUM google sheets 1&#8243; _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.16&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>We 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.<\/p>\n<p>Please 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 \u201cCarbs (g)\u201d column, subject to the criteria in the cell D2. Whereas the case in row # 11 sums the values from \u201cFat (g)\u201d 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 &amp; 10) that satisfies all of these conditions, hence the result 59.<\/p>\n<p>The case on the row # 10 is a rather interesting one! We didn\u2019t 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 \u201cFiber (g)\u201d column as there is no criteria to filter out the rows.<\/p>\n<h5>Unwarranted Cases<\/h5>\n<p>Now, 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.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2021\/10\/DSUM-google-sheets-2.png&#8221; alt=&#8221;DSUM google sheets 2&#8243; title_text=&#8221;DSUM google sheets 2&#8243; _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.16&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>Here, we tried summing non numeric values! Just like the SUM formula, DSUM formula sums only numbers. Therefore, it returned \u20180\u2019 as output.<\/p>\n<p>Here\u2019s the second one in the image below.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2021\/10\/DSUM-google-sheets-3.png&#8221; alt=&#8221;DSUM google sheets 3&#8243; title_text=&#8221;DSUM google sheets 3&#8243; _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.16&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><span>Seemingly there\u2019s nothing wrong with the formula this time but the result isn\u2019t what we are expecting. The problem lies within the labels. Apparently, a missing or a mismatched label doesn\u2019t help the DSUM formula, as its working hinges on the field name that the second parameter takes. Since the labels didn\u2019t match, it returned the sum as zero.<\/span><\/p>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][et_pb_row _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#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.27.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][et_pb_text admin_label=&#8221;Connections T &#8211; Automate beyond importrange &#8211; Horizontal&#8221; module_class=&#8221;sheetgo-post-no-shadow-img md2-contained-button-light vertical-banner-container&#8221; _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; background_color=&#8221;#f2f7ff&#8221; max_width=&#8221;700px&#8221; module_alignment=&#8221;center&#8221; max_height=&#8221;300px&#8221; custom_margin=&#8221;20px|0px|20px|0px|true|true&#8221; custom_padding=&#8221;25px|25px|25px|25px|true|true&#8221; sticky_limit_bottom=&#8221;section&#8221; border_radii=&#8221;on|20px|20px|20px|20px&#8221; border_width_all=&#8221;1px&#8221; border_color_all=&#8221;#d9e7ff&#8221; saved_tabs=&#8221;all&#8221; global_colors_info=&#8221;{}&#8221; global_module=&#8221;50462&#8243; theme_builder_area=&#8221;post_content&#8221;]<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2024\/09\/Add-on-sm_sheets-connected-new-connection.webp\" width=\"250\" height=\"168\" alt=\"\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2024\/09\/Recommended-for-Google-Workspace-badge.webp\" width=\"150\" height=\"180\" alt=\"39\" \/><\/p>\n<p><span style=\"font-size: 22px; font-weight: 600;\">Automate data transfers beyond Importrange<\/span><\/p>\n<p><a href=\"https:\/\/www.sheetgo.com\/connections\/\" target=\"_blank\" rel=\"noopener\">Find out how<\/a>[\/et_pb_text][\/et_pb_column][\/et_pb_row][\/et_pb_section]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The\u00a0DSUM\u00a0Google Sheets formula is almost similar to that of the\u00a0SUM\u00a0formula, 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 \u2018D\u2019 in the DSUM stands for \u2018Database\u2019, therefore, we can call this a [&hellip;]<\/p>\n","protected":false},"author":40,"featured_media":3835,"comment_status":"open","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":[],"_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}]}}