MIS - Lab02 - Charts-Pivot Tables

Download as pdf or txt
Download as pdf or txt
You are on page 1of 15

Lab 2: Charts and Pivot Tables

Charts
Turning data into charts can help visualize the information at hand. To convey the appropriate message
from your data, you need to select an appropriate type of chart for your data.

Let us start out with creating a simple chart using the chart wizard. Open the file excellab2.xslx. In the
total expenses sheet, you will see a table showing the total expenses accumulated by a company in the
12 months of a particular year. Select the entire table.

Peeking into Computer Science | Excel Lab Manual


On the ribbon, click the Insert tab. There you will notice the Charts group, showing all the different types
of charts that can be created out of the data. Select the 1st option in 2D bars (the clustered bar chart).

Lab 2: Charts and Pivot Tables


10
This is the chart Excel creates:

Peeking into Computer Science | Excel Lab Manual

You may need to drag the corner of the chart to make it larger so that all the months are clearly visible
on the y‐axis. The chart needs some tweaking. First, we need to decide what extra information we want
the chart to show. We want this chart to have a meaningful title and show a title for the x‐axis. We do

Lab 2: Charts and Pivot Tables


11
not need a legend, a title for the y‐axis nor data labels. Now that I know what we want, the chart
becomes very easy to customize using Excel’s chart layouts.

Looking at Excel’s built‐in layouts, you will notice that none of them quite satisfy our chart
requirements. Here we have two options. One option is to select one of the layouts and modify it to fit
our needs. For instance, we could pick Layout 6 and simply delete the data labels. The other option
would be to go to the Layout tab in the Chart Tools menu. This tab lets you fine tune the layout of the
chart.

Take a look at the Labels group in the Layout tab. Since we already have a chart title, we do not need to
worry about it. Let us add the x‐axis title. Select Axis Titles, then hover over Primary Horizontal Axis Title,
and select Title Below Axis.

Peeking into Computer Science | Excel Lab Manual

Lab 2: Charts and Pivot Tables


12
The chart now shows an x‐axis title:

Peeking into Computer Science | Excel Lab Manual

Exercise 1
Remove the legend through the Labels group in the Layout tab. If needed, adjust the chart size so that
all the data are clearly visible.

Lab 2: Charts and Pivot Tables


13
Now that the layout of the chart is what we want, let us enter the correct titles. Click the chart title and
replace it with “Total expenses for 2009”. Do the same for the axis title and replace it with “Expenses
($)”.

Now we can play around with the chart colors. Again, Excel allows you to either select one of its predefined
themes or to change the background and colors, one at a time. Select Style 25 from the
Chart Styles group in the Design tab.

Peeking into Computer Science | Excel Lab Manual

Lab 2: Charts and Pivot Tables


14
Your chart now looks like this:

Let’s do a little more formatting. Select the chart area (the box that encompasses the chart title and plot
area). Go to the Format tab and under Shape styles, select Subtle Effect ‐ Purple, Accent 4.

Peeking into Computer Science | Excel Lab Manual

Now, select the plot area (the area that includes the chart ONLY) and select Colored Outline ‐ Dark 1.

Lab 2: Charts and Pivot Tables


15
It is quite easy to change the chart type in Excel. To do this, select the chart area and go to the Insert
tab. Select the Clustered Column from the Column charts menu.

Peeking into Computer Science | Excel Lab Manual

This changes the chart type as follows:

Lab 2: Charts and Pivot Tables


16
Exercise 2
Using the same table (Total Expense sheet), create a 2D pie chart. Instead of showing absolute values, we
would like the chart to show the percentages that each segment makes up as a data label. The month
name should also be part of the label and the legend is not needed. The labels should be at the inside end
of the data points. Make sure the chart has a meaningful title. Adjust the chart size so that all the data
is clearly visible. Give the chart area a black border.

Pivot tables

Peeking into Computer Science | Excel Lab Manual


Pivot tables are used to easily create meaning out of large amounts of data. Let us take an example.
Open the departmental expenses sheet. Select the entire table and then go to the Insert tab on the
ribbon. Click the PivotTable button.

Lab 2: Charts and Pivot Tables


17
The dialog box that pops up allows you to modify the range of data to be used for the pivot table, and to
choose where the pivot table needs to be placed. Leave everything as is and press the OK button.

Peeking into Computer Science | Excel Lab Manual

Lab 2: Charts and Pivot Tables


18
This is what you should get:

Let us first take a look at what the different field areas are used for. Their usage will become clear

Peeking into Computer Science | Excel Lab Manual


shortly.

 Values: this is used to display summary calculations in the pivot table.


 Row labels: these labels are used to display fields as rows on the side of the pivot table. The
table is broken down by the first row label; each subsequent label appears as subcategory of the
previous label.
 Column labels: these labels are used to display fields as columns on the top of the pivot table.
Column labels are nested in a similar way to row labels.
 Report filter: this is used to filter the whole report (the pivot table).

The pivot table menu to the right allows you to select the fields you want to add to the table. Select all
of the fields by clicking their respective checkboxes.

Lab 2: Charts and Pivot Tables


19
At this stage, the pivot table does not look like anything that makes sense. We need to tweak it a little
bit to show the information we need. Notice that all the fields have come under Row Labels, except for
Expense, which is under Values.

Peeking into Computer Science | Excel Lab Manual


Drag the Expense Type field to Report Filter. Drag the Department field to the Column Labels.

Lab 2: Charts and Pivot Tables


20
Notice how more meaningful the pivot table has become. It shows the total departmental expenditures
per month, as well as each person’s expenditures in each month. To rearrange the months so that they
are in the correct order, select the cell you want reordered and then move the mouse along the borders
of the cell until a 4‐headed arrow appears. You can then drag the cell to its new location.

Peeking into Computer Science | Excel Lab Manual

Now assume that we only want the information for Travel and Social expenses. Click on the drop‐down
field next to Expense type, and then check the Select Multiple Items checkbox. After that, deselect the
Expense types we do not need and click OK.

Lab 2: Charts and Pivot Tables


21
Now, the pivot table shows the information for only the required expense types.

Peeking into Computer Science | Excel Lab Manual

You can also filter column and row labels in the same way. Excel pivot tables allow for different calculations
of the data value. Currently, the Expenses are being summed up. Let us modify this so that the table shows
the average of all expenses.

In the pivot table field list (to the right of the screen), click on Sum of Expenses and select Value Field
settings from the menu.

Lab 2: Charts and Pivot Tables


22
The dialog box allows you to select the calculation type for the data field. Select Average and then press
the OK button.

Peeking into Computer Science | Excel Lab Manual

Lab 2: Charts and Pivot Tables


23
The pivot table now shows the average of expenses instead of the sum.

Exercise 3
Modify the pivot table so that it shows the number of times expenses incurred for each month, per
department and per employee, for all expense types.

Exercise 4
Go to the exercise4 sheet in the excellab2.xlsx workbook. The data in the table shows the population
in Canada by age and sex group for 2009.
a) Calculate the totals for each column and row (hint: try dragging the formula).

Peeking into Computer Science | Excel Lab Manual


b) Make sure all your data shows the 1000 separator mark.
c) Create a meaningful chart out of this table. Make sure you include titles and data labels as
appropriate.
d) Modify both the chart and plot area backgrounds to colors of your choice.

Exercise 5
Go to the exercise5 sheet in excellab2.xlsx.
a) Format the dates so that they are in the dd/mm/yyyy format.
b) Format the expense amounts so that they show the $ sign (without decimal places).
c) Create a pivot table that shows the total amounts spent on groceries and clothes, by date and
store.

Lab 2: Charts and Pivot Tables


24

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy