![]() |
||||||||
|
|
||||||||
|
Pivot table analysis We recommend that you analyse UCAS Annual Datasets using Pivot Tables. The information below is designed as a guide to get you started - when it comes to using Pivot Tables there really is no substitute for practice. Our Statistical and Analytical Services Team can provide hands-on training on all aspects of UCAS data, including Pivot Tables. For more information, please contact stats@ucas.ac.uk, or tel: 01242 544896, quoting SAAST. Creating a Pivot Table Creating a Pivot Table Excel then presents the Pivot Table Wizard with which you create the table. The first step is to define the data source. In all Annual Datasets, the data comes from a "Microsoft Excel List or Database". This option is the default. Click on Next. Here you are prompted for the location of the source data. Excel usually comes up with a default of some kind, but to simplify matters, we have already defined the appropriate range as 'data'. Enter 'Data' (without the quotes) and select Next. Now you can start to build the table. (If you are using Excel 2000, you will first need to select Layout.) The icons to the right of the window are the titles used at the top of each column of data in the dataset and are used to create the table of your choice. The key point to note is that category data (i.e. InstOrd, InstName, InstRegn and Age) should be used for the Page, Row and Column parts of the table whilst the numeric variables should be used for the Data. The Page field can be used to limit the data further by selecting just one category at a time from the drop-down list that is automatically created. Drag the required icons to their positions. Click on Next and you will have the choice of putting the Pivot Table on a New worksheet or on the Existing worksheet. Select New worksheet and click on Finish. Customising the Pivot Table The first point to note is that, having created a Pivot Table you are able to edit it without having to re-create it. This is done by selecting any cell in the Pivot Table and clicking on Data / Pivot table (or PivotTable and PivotChart Report in later versions) from the top menu bar - or selecting the Pivot Table icon. (In later versions you will also need to select Layout to return to the Pivot Table Wizard box). In later versions of Excel, there is also a PivotTable toolbar, which you can use to make the changes you require. Editing the table One of these is to drag the title bars (the grey boxes describing the page, row and column contents) to a new location. Similar options are available for changing page, row and column data. Again, using the Pivot Table, drag the title bar by pressing the left mouse key and moving the mouse slowly up and down between the first three rows. Three different icons are displayed depending on where the mouse is. These icons indicate that the data will be shown as either a page, row or column item. Sorting By default, all Pivot Tables when first created are sorted alphabetically. However, having been sorted manually, edited versions of the Pivot Table retain the sorted order. Grouping Pivot Tables can be manipulated in such a way as to remove some of the clutter from your data. This is done by grouping the data. To do this open a dataset and click with the left mouse button on a cell, keeping the button pressed, move the mouse to another cell and then let go of the button. With the mouse pointer inside the selected area, click with the right mouse button. From the menu displayed select 'Group and outline' followed by 'Group'. This process may be repeated. Moving category data Drilling This process can be repeated for categories within this category. Copying Pivot Tables Since the data used to create each Pivot Table is held within the table (i.e. you don't have to have the original dataset present in the same workbook as the table to which it relates) you can copy Pivot Tables to new workbooks that contain just Pivot Tables. To copy a Pivot Table, select the whole of the table (including any page fields) and type Control-C (or use the top menu bars Edit / Copy). Select the cell where you want the table to be copied to (this might be the same worksheet, a new worksheet in the same workbook or a new workbook), and type Control-V (or Edit / Paste from the top menu bars). The table can now be manipulated independently of the original. If the table is in its final form it will save space if you use the Paste Special function in the Edit menu (instead of Paste). This enables you to copy just the contents of the cells without having to save the data that was used to create the table. To do this select the destination cell and choose Edit / Paste Special from the menu. Then check the button labelled Values in the dialogue box before clicking on OK. The table is now just text - as if you'd typed in the data. Calculations What is especially useful about having such calculations is that, with the addition of one or more page fields, the resultant table is updated as soon as you select a new page item. Again it is crucial that both tables are updated to show comparable data. It is also possible to amend the pivot table to calculate data directly. Open the Pivot Table Wizard box (click on Data / Pivot table (or PivotTable and PivotChart Report, then Layout, in later versions) from the top menu bar). Next, double-click the Data variable in your table with the left mouse button. Select the calculation you require from the list and press OK. Then select OK/Finish to update your table. Charts To create a chart, position the cursor over one of the worksheet titles - enabling you to select the type of chart you require; the data you wish to chart; titles; legends and so on. Select any chart and follow through the steps in the 'Chart Wizard'. If you are using Excel 2000, you will also be able to create a Pivot Chart, which can be manipulated in the same way as Pivot Tables themselves. Even in earlier versions of Excel, charts can easily be modified by use of Page field of the Pivot Table. Having produced a chart, check the figures against the Pivot Table previously created. Now, change the Pivot Table by selecting a new page item. (Click on the down arrow next to the Subject page field and select a subject group). The chart is automatically updated. One point to note is that it is particularly helpful to link chart titles to the data actually displayed. This can be done by typing an equals sign in the chart title followed by a worksheet and cell reference. Pivot Tables themselves duplicate the data. If you produce a Pivot Table in a new workbook and give that workbook to someone else you are not only giving him or her the table but the data and the ability to change the table. It may be better to create the table and copy it to a new workbook using the Paste Special option (checking the Values box) in the Edit menu. Subsets of the data can be produced from the original dataset by double-clicking with the left mouse button on a Pivot Table (data) cell. Excel will 'extract' all of the rows in the original data that were used in creating the data in the cell and put them into a new worksheet. This is ideal if you wish to give a subset of the data to a colleague. |
||||||||
| © UCAS 2003 | ||||||||
![]() |
||||||||