{"id":101,"date":"2016-09-24T17:31:32","date_gmt":"2016-09-25T00:31:32","guid":{"rendered":"http:\/\/miriamposner.com\/classes\/dh101f16\/?page_id=101"},"modified":"2016-11-02T11:46:10","modified_gmt":"2016-11-02T18:46:10","slug":"summarize-values-with-excel","status":"publish","type":"page","link":"http:\/\/miriamposner.com\/classes\/dh101f16\/tutorials-guides\/data-visualization\/summarize-values-with-excel\/","title":{"rendered":"Summarize Values with Excel"},"content":{"rendered":"<div class=\"LessonSummary\">\n<p>In this exercise, we&#8217;ll look at ways to deal with\u00a0<em>nominal values<\/em> in our data. Remember, nominal data is categorized with labels, but those labels don&#8217;t correspond to quantitative values. So unlike other values &#8212; like &#8220;number of minutes&#8221; or &#8220;age&#8221; &#8212; they can&#8217;t be directly charted as numerical values. Instead, we first have to\u00a0<em>count\u00a0<\/em>the values. Then we can plot the number of records in each category.<\/p>\n<p>In Excel, a<strong> pivot table<\/strong> summarizes data values. For example, given a list of students\u2019 majors, a pivot table can tell us how many students have declared an English major, a communication major, and so on. Here, we\u2019ll use a pivot table first to understand the majors represented in our class, and next to understand the correlation of major with gender in our class.<\/p>\n<p>Open this\u00a0spreadsheet in Excel and then follow the steps below to build a chart of your data.<\/p>\n<p><em>Note: If you&#8217;re getting this error: &#8220;&#8221;This command requires at least two rows of source data. You cannot use the command on a selection in only one row,&#8221; please scroll to the end of this tutorial for a fix.<\/em><\/p>\n<\/div>\n<div class=\"LessonStep top\">\n<h3 class=\"StepTitle\">1. Pick a column<\/h3>\n<div class=\"StepImage\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/miriamposner.com\/dh101f15\/wp-content\/uploads\/2015\/10\/media_1445452093696.png\" alt=\"media_1445452093696.png\" width=\"301\" height=\"410\" \/><\/div>\n<div class=\"StepInstructions\">\n<p>To start with, we\u2019ll look at one variable (major) in isolation. Use your mouse to click on Column B.<\/p>\n<\/div>\n<\/div>\n<div class=\"LessonStep top\">\n<h3 class=\"StepTitle\">2. Turn your column into a pivot table (1)<\/h3>\n<div class=\"StepImage\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/miriamposner.com\/dh101f15\/wp-content\/uploads\/2015\/10\/media_1445452151918.png\" alt=\"media_1445452151918.png\" width=\"540\" height=\"385\" \/><\/div>\n<div class=\"StepInstructions\">\n<p>From the <strong>Data<\/strong> menu, select <strong>PivotTable. <\/strong>In the window that pops up, leave the options as they are and click <strong>OK<\/strong>.<\/p>\n<\/div>\n<\/div>\n<div class=\"LessonStep top\">\n<h3 class=\"StepTitle\">3. Turn your column into a pivot table (2)<\/h3>\n<div class=\"StepImage\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/miriamposner.com\/dh101f15\/wp-content\/uploads\/2015\/10\/media_1445452428630.png\" alt=\"media_1445452428630.png\" width=\"540\" height=\"441\" \/><\/div>\n<div class=\"StepInstructions\">\n<p>Excel will open a new worksheet and you\u2019ll see a blank table, along with the<strong>PivotTable Builder<\/strong>. The PivotTable Builder allows you to select which values you\u2019d like to summarize. In this case, we selected <strong>Majors<\/strong> in the previous step. Click on the word <strong>Majors<\/strong> on the PivotTable Builder and drag it, first into the <strong>Row Labels<\/strong> area and next into the <strong>Values<\/strong> area. Hey, look, the majors are summarized for you!<\/p>\n<\/div>\n<\/div>\n<div class=\"LessonStep top\">\n<h3 class=\"StepTitle\">4. Turn your pivot table into a chart (1)<\/h3>\n<div class=\"StepImage\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/miriamposner.com\/dh101f15\/wp-content\/uploads\/2015\/10\/media_1445452553307.png\" alt=\"media_1445452553307.png\" width=\"415\" height=\"614\" \/><\/div>\n<div class=\"StepInstructions\">\n<p>Now that your majors are summarized, it\u2019s pretty easy to turn them into a chart. Use your mouse to select the cells indicated in the image above. Then click on the <strong>Charts<\/strong> tab.<\/p>\n<\/div>\n<\/div>\n<div class=\"LessonStep top\">\n<h3 class=\"StepTitle\">5. Turn your pivot table into a chart (2)<\/h3>\n<div class=\"StepImage\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/miriamposner.com\/dh101f15\/wp-content\/uploads\/2015\/10\/media_1445452784616.png\" alt=\"media_1445452784616.png\" width=\"540\" height=\"404\" \/><\/div>\n<div class=\"StepInstructions\">\n<p>From the <strong>Chart<\/strong> tab, select <strong>Bar<\/strong> and then <strong>Stacked Bar<\/strong>. Check it out, you have a chart! Play with the coloring and formatting options to make the chart look the way you want.<\/p>\n<p>Remember, the more variation you introduce to your graph (e.g., color, shape, size), the harder it is to understand. So if you add an element, be sure it&#8217;s meaningful.<\/p>\n<\/div>\n<\/div>\n<div class=\"LessonStep top\">\n<h3 class=\"StepTitle\">6. Make a pivot table that compares two values<\/h3>\n<div class=\"StepImage\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/miriamposner.com\/dh101f15\/wp-content\/uploads\/2015\/10\/media_1445453044164.png\" alt=\"media_1445453044164.png\" width=\"540\" height=\"308\" \/><\/div>\n<div class=\"StepInstructions\">\n<p>We actually have two columns in our dataset, so why not see how they correlate with each other? Follow steps one and two above, except this time, in step one, select both columns A and B. When you get to the\u00a0<strong>PivotTable Builder<\/strong>, select the options indicated in the image above. (Tip: For \u201cRow Labels,\u201d it\u2019s generally good to select the column that has more values in it, and for \u201cColumn Labels,\u201d that column that has fewer values.)<\/p>\n<\/div>\n<\/div>\n<div class=\"LessonStep top\">\n<h3 class=\"StepTitle\">7. Make a chart that compares two values (1)<\/h3>\n<div class=\"StepImage\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/miriamposner.com\/dh101f15\/wp-content\/uploads\/2015\/10\/media_1445453375963.png\" alt=\"media_1445453375963.png\" width=\"540\" height=\"555\" \/><\/div>\n<div class=\"StepInstructions\">\n<p>Select the cells indicated in the image above. Then click on the <strong>Charts<\/strong> tab, just as you did in Step 4.<\/p>\n<\/div>\n<\/div>\n<div class=\"LessonStep top\">\n<h3 class=\"StepTitle\">8. Make a chart that compares two values (2)<\/h3>\n<div class=\"StepImage\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/miriamposner.com\/dh101f15\/wp-content\/uploads\/2015\/10\/media_1445453481904.png\" alt=\"media_1445453481904.png\" width=\"447\" height=\"350\" \/><\/div>\n<div class=\"StepInstructions\">\n<p>From the <strong>Charts<\/strong> tab, select <strong>Bar<\/strong>, and then <strong>Stacked Bar<\/strong>. Now you can see not only how many students have declared which major, but what proportion of these majors are male versus female!<\/p>\n<\/div>\n<\/div>\n<div id=\"wrapper\">\n<div id=\"header-row\">\n<div id=\"header-left\">\n<div id=\"header-left-content\">\n<div class=\"align-bottom\">\n<h1 class=\"clarify-article-title\"><em>If you&#8217;re having trouble selecting data for your pivot table&#8230;<\/em><\/h1>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div id=\"clarify-article-content\">\n<div class=\"clarify-article-description\">\n<p>A couple people have been getting the following error when they attempt to build a pivot table after selecting multiple columns: &#8220;<strong>This command requires at least two rows of source data. You cannot use the command on a selection in only one row.<\/strong>&#8221; I&#8217;m not sure exactly what is causing the error, but the following fix seems to take care of it.<\/p>\n<\/div>\n<div class=\"clarify-steps-container\">\n<div id=\"clarify-step-1\" class=\"clarify-step-container\">\n<h2 class=\"clarify-step-title\">Instead of selecting your columns and then creating a pivot table, do it the other way around<\/h2>\n<div class=\"clarify-step-instructions\">\n<p>Start by clicking on <strong>Insert<\/strong> and then <strong>Pivot Table<\/strong>. Then, with your cursor in the <strong>Table\/Range<\/strong> text box, click on the first column you want in your pivot table. Then, hold down <strong>shift<\/strong> and click on the second column. When you&#8217;re done, just click <strong>OK<\/strong>, and your pivot table should work!<\/p>\n<\/div>\n<div class=\"clarify-step-image-wrapper\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<p><a href=\"http:\/\/miriamposner.com\/classes\/dh101f16\/wp-content\/uploads\/sites\/5\/2016\/09\/instead-of-selecting-your-columns-and-then-creating-a-pivot-table-do-it-the-other-way-around.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1610\" src=\"http:\/\/miriamposner.com\/classes\/dh101f16\/wp-content\/uploads\/sites\/5\/2016\/09\/instead-of-selecting-your-columns-and-then-creating-a-pivot-table-do-it-the-other-way-around.png\" alt=\"instead-of-selecting-your-columns-and-then-creating-a-pivot-table-do-it-the-other-way-around\" width=\"754\" height=\"417\" srcset=\"http:\/\/miriamposner.com\/classes\/dh101f16\/wp-content\/uploads\/sites\/5\/2016\/09\/instead-of-selecting-your-columns-and-then-creating-a-pivot-table-do-it-the-other-way-around.png 754w, http:\/\/miriamposner.com\/classes\/dh101f16\/wp-content\/uploads\/sites\/5\/2016\/09\/instead-of-selecting-your-columns-and-then-creating-a-pivot-table-do-it-the-other-way-around-300x166.png 300w\" sizes=\"auto, (max-width: 754px) 85vw, 754px\" \/><\/a><\/p>\n<div class=\"footer\"><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>In this exercise, we&#8217;ll look at ways to deal with\u00a0nominal values in our data. Remember, nominal data is categorized with labels, but those labels don&#8217;t correspond to quantitative values. So &hellip; <a href=\"http:\/\/miriamposner.com\/classes\/dh101f16\/tutorials-guides\/data-visualization\/summarize-values-with-excel\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Summarize Values with Excel&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":92,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_eb_attr":"","footnotes":""},"class_list":["post-101","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"http:\/\/miriamposner.com\/classes\/dh101f16\/wp-json\/wp\/v2\/pages\/101","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/miriamposner.com\/classes\/dh101f16\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/miriamposner.com\/classes\/dh101f16\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/miriamposner.com\/classes\/dh101f16\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/miriamposner.com\/classes\/dh101f16\/wp-json\/wp\/v2\/comments?post=101"}],"version-history":[{"count":0,"href":"http:\/\/miriamposner.com\/classes\/dh101f16\/wp-json\/wp\/v2\/pages\/101\/revisions"}],"up":[{"embeddable":true,"href":"http:\/\/miriamposner.com\/classes\/dh101f16\/wp-json\/wp\/v2\/pages\/92"}],"wp:attachment":[{"href":"http:\/\/miriamposner.com\/classes\/dh101f16\/wp-json\/wp\/v2\/media?parent=101"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}