{"id":5913,"date":"2012-10-25T14:14:17","date_gmt":"2012-10-25T14:14:17","guid":{"rendered":"https:\/\/www.snapsurveys.com\/support-snap11\/?page_id=5913"},"modified":"2018-10-04T15:50:43","modified_gmt":"2018-10-04T14:50:43","slug":"totalize-function-add-responses-arrive","status":"publish","type":"page","link":"https:\/\/www.snapsurveys.com\/support-snap11\/worksheets\/totalize-function-add-responses-arrive\/","title":{"rendered":"Using the Totalize function to add up responses as they arrive"},"content":{"rendered":"<p>You often have a set of questions where you wish to total the answers. For example:<\/p>\n<ul>\n<li>asking how many hours a week respondents spend doing different things<\/li>\n<li>asking how much money respondents spent on different activities during a visit<\/li>\n<li>asking respondents to share a fixed amount or percentage between a set of options<\/li>\n<\/ul>\n<p>The amount allocated to each option gives the relative importance of each. This gives good numeric data for analysis, but is quite difficult for respondents.<\/p>\n<p>This worksheet shows you how to do this using the <strong>Totalize <\/strong>(or <strong>Totalise<\/strong>) function in the Snap Toolkit. The <strong>Totalize <\/strong>function calculates a running total as the respondent completes the answers. It explains how to create a set of <strong>Open First<\/strong> and <strong>Open Next<\/strong> questions for quantity responses, and use <strong>Totalize <\/strong>to put a running total into the final response. It also shows you how to set a valid range on the total, so that respondents cannot move to the next page if the total has overrun.<\/p>\n<p><a name=\"o26593\"><\/a><\/p>\n<h3>Background<\/h3>\n<p>The <strong>Totalize <\/strong>function works on a group of questions in Snap consisting of the options to be added up and the running total. The running total can be anywhere in the group. The questions must be sequential and on a single web page. You can have several <strong>Totalize <\/strong>groups in a single survey.<\/p>\n<p>You run <strong>Totalize <\/strong>after you have published your survey. It inserts extra code in the published survey that displays the running total. The total is calculated according to your settings in <strong>Totalize<\/strong>.<\/p>\n<p>You can set a limit on the running total in Snap using the <strong>Valid <\/strong>option in <strong>Variable properties<\/strong> for that question (for example, setting a valid range of <strong>0 to 100<\/strong>). If you have set a limit on the total, the answers are checked against the valid range when the user goes to the next page. If they fall outside it, a message is displayed. You can customize the default message text, see the section &#8220;Changing specific texts&#8221; in the help topic: <a href=\"https:\/\/www.snapsurveys.com\/help\/25267.htm\" target=\"_blank\">Hiding question numbers in web surveys and changing associated text<\/a>.<\/p>\n<p><a name=\"o26600\"><\/a><\/p>\n<h3>Summary of steps<\/h3>\n<p><a id=\"h26610\" title=\"Step 1: Create your set of questions\" href=\"#o26594\" target=\"_self\">Step 1: Create your set of questions <\/a><br \/>\n<a id=\"h26611\" title=\"Step 2: Totalize the set of questions\" href=\"#o26604\" target=\"_self\">Step 2: Apply Totalize to the set of questions<\/a><\/p>\n<div>\n<p><a name=\"o26594\"><\/a><\/p>\n<h3>Step 1: Create your set of questions<\/h3>\n<p>This worksheet uses a new survey with a single set of questions to totalize. The first step is to create the group of questions that need to be totalled. These must be quantity questions.<\/p>\n<ol>\n<li>Create your web or Snap WebHost survey.<\/li>\n<li>Select <strong>Open First<\/strong> as the style of the first question and <strong>Quantity <\/strong>as the <strong>Response <\/strong>type.\n<div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-16676\" src=\"https:\/\/www.snapsurveys.com\/support-snap11\/wp-content\/uploads\/2012\/10\/op1_quant_sel1.png\" alt=\"QW: open first open next time spent and total for totalize\" width=\"481\" height=\"148\" \/><\/p>\n<\/div>\n<\/li>\n<li>Enter the question text, for example &#8220;<strong>How did you spend your day at the activity centre? Please allocate hours to the activities so the total is 8 or fewer.<\/strong>&#8220;<\/li>\n<li>Enter the first activity as the grid label.<\/li>\n<li>Press [Tab] to create the next question in the list. By default, Snap will create this as an <strong>Open Next<\/strong> question with a <strong>Quantity <\/strong>response. Enter an activity as the grid label. Repeat until you have entered all your activities and add an extra grid question to display the running total.\n<div><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-16681\" src=\"https:\/\/www.snapsurveys.com\/support-snap11\/wp-content\/uploads\/2012\/10\/totalize_ques1.png\" alt=\"QW: open first open next time spent and total for totalize\" width=\"453\" height=\"280\" \/><\/div>\n<\/li>\n<li>For this example, place a valid range on the <strong>Total <\/strong>question to ensure that the total number of hours does not exceed eight. (It would normally be adequate to sum the hours, as this makes it more complicated for the respondent. Doing it this way is purely as a demonstration.) Select the <strong>Total <\/strong>question and press [Alt] + [Enter] to open the <strong>Variable Properties<\/strong> window.<\/li>\n<li>Scroll down to the <strong>Valid <\/strong>entry and enter <strong>0 to 8<\/strong>.\n<div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-16682\" src=\"https:\/\/www.snapsurveys.com\/support-snap11\/wp-content\/uploads\/2012\/10\/vp_val_sel1.png\" alt=\"VP: variable properties showing valid set to 0 to 8\" width=\"286\" height=\"374\" \/><\/p>\n<\/div>\n<\/li>\n<li>Click <strong>[OK]<\/strong>.<\/li>\n<li>Select <strong>File|Publish<\/strong>to publish the survey. Make a note of where the published survey will be stored (the path).\n<div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-16675\" src=\"https:\/\/www.snapsurveys.com\/support-snap11\/wp-content\/uploads\/2012\/10\/op_path_sel1.png\" alt=\"VP: variable properties showing valid set to 0 to 8\" width=\"413\" height=\"185\" \/><\/p>\n<\/div>\n<\/li>\n<\/ol>\n<\/div>\n<div>\n<p><a name=\"o26604\"><\/a><\/p>\n<h3>Step 2: Totalize the set of questions<\/h3>\n<ol>\n<li>Open the <strong>Totalize<\/strong> program. You would normally do this by Selecting <strong>[Start]<\/strong> on the Microsoft toolbar, then <strong>type Totalize<\/strong> (this will be <strong>Totalise<\/strong> if you are in the UK) in the \u2018Search programs and files\u2019 box.\n<div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-21528\" src=\"https:\/\/www.snapsurveys.com\/support-snap11\/wp-content\/uploads\/2012\/10\/Windows-search.gif\" alt=\"Windows Search\" width=\"410\" height=\"244\" srcset=\"https:\/\/www.snapsurveys.com\/support-snap11\/wp-content\/uploads\/2012\/10\/Windows-search.gif 410w, https:\/\/www.snapsurveys.com\/support-snap11\/wp-content\/uploads\/2012\/10\/Windows-search-150x89.gif 150w\" sizes=\"auto, (max-width: 410px) 100vw, 410px\" \/><\/p>\n<\/div>\n<\/li>\n<li>Click the<strong> [Browse]<\/strong> button and select the published survey file.\n<div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-16677\" src=\"https:\/\/www.snapsurveys.com\/support-snap11\/wp-content\/uploads\/2012\/10\/tot_brow_sel1.png\" alt=\"VP: variable properties showing valid set to 0 to 8\" width=\"348\" height=\"292\" \/><\/p>\n<\/div>\n<\/li>\n<li>Click <strong>[Add]\u00a0<\/strong>to define the group of questions to total.\n<div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-16680\" src=\"https:\/\/www.snapsurveys.com\/support-snap11\/wp-content\/uploads\/2012\/10\/tot_group1.png\" alt=\"VP: variable properties showing valid set to 0 to 8\" width=\"268\" height=\"317\" \/><\/p>\n<\/div>\n<\/li>\n<li>Select the first question in the survey that contributes to the total.<\/li>\n<li>Select the last question in the survey that contributes to the total or is the total question. (The total is usually the last question in the group, but you could have a layout in which it is not the last question.)<\/li>\n<li>Select the question that displays the total as the <strong>target question<\/strong>.<\/li>\n<li>Click <strong>[OK]<\/strong> to define the totalize group. A summary of the group details appears in the <strong>Totalize <\/strong>window.\n<div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-16679\" src=\"https:\/\/www.snapsurveys.com\/support-snap11\/wp-content\/uploads\/2012\/10\/tot_group_proc_sel1.png\" alt=\"VP: variable properties showing valid set to 0 to 8\" width=\"348\" height=\"292\" \/><\/p>\n<\/div>\n<\/li>\n<li>Click <strong>[Process]<\/strong> to add the running total code to the published survey.<\/li>\n<li>Run your survey as normal. When respondents complete a question in the group, their answer will be added to the total.\n<div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-16678\" src=\"https:\/\/www.snapsurveys.com\/support-snap11\/wp-content\/uploads\/2012\/10\/tot_example1.png\" alt=\"VP: variable properties showing valid set to 0 to 8\" width=\"506\" height=\"333\" \/><\/p>\n<\/div>\n<\/li>\n<\/ol>\n<p>If you re-publish the survey, the totalize information will be lost. You will have to add it again. You can do this quickly by clicking<strong> [Save] <\/strong>in <strong>Totalize <\/strong>to save your settings and then browsing to the settings file to add the settings back to the survey. This only works if you have not changed the question variables in the survey.<\/p>\n<\/div>\n<p><a name=\"o26592\"><\/a><\/p>\n<h3>Conclusion<\/h3>\n<p>This worksheet has explained how to use the <strong>Totalize <\/strong>function to add a running total to a group of questions in a published survey. It also describes how to set a valid range on the total figure to ensure that responses do not exceed a permitted maximum.<\/p>\n<p>If you do not need to display a running total, you can use derived variables to calculate totals. Examples of calculating values using a derived variable are available in the worksheet: <a href=\"https:\/\/www.snapsurveys.com\/support-snap11\/worksheets\/calculating-difference-times-dates\/#o22593\">Calculating the difference between times on different dates<\/a> and the help page: <a title=\"\" href=\"https:\/\/www.snapsurveys.com\/help\/#22902\" target=\"_blank\">Calculating age from a date of birth<\/a>. There is also reference information about <a title=\"\" href=\"https:\/\/www.snapsurveys.com\/help\/#22406\" target=\"_blank\">derived variables<\/a>.<\/p>\n<p>If you are entering data using the <strong>Data Entry<\/strong> screen within Snap you can also display running totals by <a title=\"\" href=\"https:\/\/www.snapsurveys.com\/help\/#14468\" target=\"_blank\">including calculations in the questionnaire<\/a>.<\/p>\n<p>For more information about setting valid ranges on questions, see the section: <a title=\"\" href=\"https:\/\/www.snapsurveys.com\/help\/#23345\" target=\"_blank\">Setting valid ranges on a question<\/a>.<\/p>\n<p>There is help available for the <strong>Totalize <\/strong>tool if you click the<strong> [Help]<\/strong> button on the tool windows.<\/p>\n<p>If there is a topic you would like a worksheet on, email to <a title=\"\" href=\"mailto:snapideas@snapsurveys.com\" target=\"_self\">snapideas@snapsurveys.com<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p><a class=\"ninja_pages_read_more\"  href=\"https:\/\/www.snapsurveys.com\/support-snap11\/worksheets\/totalize-function-add-responses-arrive\/\"><\/a><\/p>\n","protected":false},"author":10,"featured_media":0,"parent":43,"menu_order":129,"comment_status":"open","ping_status":"closed","template":"page-templates\/child-page.php","meta":{"_acf_changed":false,"footnotes":""},"class_list":{"0":"post-5913","1":"page","2":"type-page","3":"status-publish","5":"search_category-support-hub"},"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.8 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Using the Totalize function to add up responses as they arrive - Snap Surveys<\/title>\n<meta name=\"robots\" content=\"noindex, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Using the Totalize function to add up responses as they arrive - Snap Surveys\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.snapsurveys.com\/support-snap11\/worksheets\/totalize-function-add-responses-arrive\/\" \/>\n<meta property=\"og:site_name\" content=\"Snap Surveys\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/SnapSurveys\" \/>\n<meta property=\"article:modified_time\" content=\"2018-10-04T14:50:43+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@snapsurveys\" \/>\n<meta name=\"twitter:label1\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.snapsurveys.com\/support-snap11\/worksheets\/totalize-function-add-responses-arrive\/\",\"url\":\"https:\/\/www.snapsurveys.com\/support-snap11\/worksheets\/totalize-function-add-responses-arrive\/\",\"name\":\"Using the Totalize function to add up responses as they arrive - Snap Surveys\",\"isPartOf\":{\"@id\":\"https:\/\/www.snapsurveys.com\/support-snap11\/#website\"},\"datePublished\":\"2012-10-25T14:14:17+00:00\",\"dateModified\":\"2018-10-04T14:50:43+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.snapsurveys.com\/support-snap11\/worksheets\/totalize-function-add-responses-arrive\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.snapsurveys.com\/support-snap11\/worksheets\/totalize-function-add-responses-arrive\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.snapsurveys.com\/support-snap11\/worksheets\/totalize-function-add-responses-arrive\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.snapsurveys.com\/support-snap11\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Worksheets\",\"item\":\"https:\/\/www.snapsurveys.com\/support-snap11\/worksheets\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Using the Totalize function to add up responses as they arrive\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.snapsurveys.com\/support-snap11\/#website\",\"url\":\"https:\/\/www.snapsurveys.com\/support-snap11\/\",\"name\":\"Snap Surveys\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.snapsurveys.com\/support-snap11\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Using the Totalize function to add up responses as they arrive - Snap Surveys","robots":{"index":"noindex","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"og_locale":"en_GB","og_type":"article","og_title":"Using the Totalize function to add up responses as they arrive - Snap Surveys","og_url":"https:\/\/www.snapsurveys.com\/support-snap11\/worksheets\/totalize-function-add-responses-arrive\/","og_site_name":"Snap Surveys","article_publisher":"https:\/\/www.facebook.com\/SnapSurveys","article_modified_time":"2018-10-04T14:50:43+00:00","twitter_card":"summary_large_image","twitter_site":"@snapsurveys","twitter_misc":{"Estimated reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.snapsurveys.com\/support-snap11\/worksheets\/totalize-function-add-responses-arrive\/","url":"https:\/\/www.snapsurveys.com\/support-snap11\/worksheets\/totalize-function-add-responses-arrive\/","name":"Using the Totalize function to add up responses as they arrive - Snap Surveys","isPartOf":{"@id":"https:\/\/www.snapsurveys.com\/support-snap11\/#website"},"datePublished":"2012-10-25T14:14:17+00:00","dateModified":"2018-10-04T14:50:43+00:00","breadcrumb":{"@id":"https:\/\/www.snapsurveys.com\/support-snap11\/worksheets\/totalize-function-add-responses-arrive\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.snapsurveys.com\/support-snap11\/worksheets\/totalize-function-add-responses-arrive\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.snapsurveys.com\/support-snap11\/worksheets\/totalize-function-add-responses-arrive\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.snapsurveys.com\/support-snap11\/"},{"@type":"ListItem","position":2,"name":"Worksheets","item":"https:\/\/www.snapsurveys.com\/support-snap11\/worksheets\/"},{"@type":"ListItem","position":3,"name":"Using the Totalize function to add up responses as they arrive"}]},{"@type":"WebSite","@id":"https:\/\/www.snapsurveys.com\/support-snap11\/#website","url":"https:\/\/www.snapsurveys.com\/support-snap11\/","name":"Snap Surveys","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.snapsurveys.com\/support-snap11\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"}]}},"_links":{"self":[{"href":"https:\/\/www.snapsurveys.com\/support-snap11\/wp-json\/wp\/v2\/pages\/5913","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.snapsurveys.com\/support-snap11\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.snapsurveys.com\/support-snap11\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.snapsurveys.com\/support-snap11\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/www.snapsurveys.com\/support-snap11\/wp-json\/wp\/v2\/comments?post=5913"}],"version-history":[{"count":10,"href":"https:\/\/www.snapsurveys.com\/support-snap11\/wp-json\/wp\/v2\/pages\/5913\/revisions"}],"predecessor-version":[{"id":26112,"href":"https:\/\/www.snapsurveys.com\/support-snap11\/wp-json\/wp\/v2\/pages\/5913\/revisions\/26112"}],"up":[{"embeddable":true,"href":"https:\/\/www.snapsurveys.com\/support-snap11\/wp-json\/wp\/v2\/pages\/43"}],"wp:attachment":[{"href":"https:\/\/www.snapsurveys.com\/support-snap11\/wp-json\/wp\/v2\/media?parent=5913"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}