Export a PROTECT Report to Excel (User s Guide Lesson 21 : Reports) 1. Run a PROTECT Export report 2. Click the Export button which is at far left on the toolbar in the PROTECT report window. 3. The Export window opens (see right). a. Set Format to Excel 97-2000 Data only b. Set Destination to Disk File. Click OK. 4. Excel Format Options window opens. a. Set Excel Format to Typical b. Keep all other default settings in place. Click OK. 5. The Choose Export File window open a. Navigate to the location where you wish to store this report. b. Name the report in the field at the bottom of the window. Click Save 6. Open MS Excel 7. Choose File Open and navigate to the location of the saved exported file. Tips for Using Microsoft Excel and Exported Reports 1. Bold the Column Headers a. Select Row 1 by placing cursor on top of the row 1 box. Click to select Row b. Click Bold toolbar button. 2. Adjust Column Widths a. All Columns at one time i. Press Ctrl + A on keyboard to select entire spreadsheet. ii. Format menu Column AutoFit Selection b. Adjust Width of a Single Column i. Place cursor between two column headers. A Double arrow appears. (See picture at right) 1. Click hold and drag to the right to make column wider. OR 2. Double click arrow to Auto fit to the widest entry in that column 3. Freeze Panes to keep Column headers in view when scrolling vertically a. Click in Cell B2 b. Window menu Freeze Panes i. The cells above and to the left of B2 are frozen, and will remain on the screen when scrolling. 4. Rename a worksheet a. Right click the worksheet tab i.e. Sheet 1 click Rename. b. Type name for sheet. i.e. All Cases 1-1-07 to 11-14-07 5. Sort a worksheet a. Click on one cell in the column you wish to sort by. Do NOT select the entire column. b. Click the A-Z or Z-A sort buttons on the toolbar at the top of the Excel window. c. The entire report contents are rearranged by this column. Page 1 of 6
d. If you were to have selected one entire column and sorted, only that column would be sorted. The rest of the columns would not match up. Your data would likely be messed up! 6. Insert a Column, so you can manually track other details about the exported records. a. To insert a new column between columns A and B, click in a cell in column B. b. From the menu choose, Insert Column. The column inserts to the left of the selected column. c. Type a column header name at the top of the column. 7. Use AutoFill to quickly copy or enter data based on a pattern a. To test out this feature, go to a blank workbook or worksheet. b. In Cell A1 type 1 (don t type the quotes) c. In Cell A2 type 2 (don t type the quotes) d. Select both cells A1:A2 e. With your mouse, grab the fill handle in the lower right corner of the selection. Your cursor turns into a black cross. f. Click hold and drag down. g. Release the mouse. The cells should have filled in with 1,2,3,4,5,6,7, etc 8. Scenario: User has a grant that requires statistics based on the age of the defendant. The grant wants to break down the defendant by set age ranges. Age ranges needed: 13-17, 18-25, 26-40, 41-60, Over 60 The current export reports don t have these defined age ranges but they do have the age of the defendant at the time of the incident. Solution: Insert a new column and manually enter in the appropriate Age Range value for that defendant using the AutoFill feature. How to Steps: 1. Run one of the DA Case List Demog report and export it. 2. Insert a new column after the Defendant Age at Incident column 3. Add column header called Def Age Range 4. Sort by Defendant Age at Incident column. Click in column, then click A-Z button on toolbar. 5. Click in the first cell in the new column. Assume that the first few defendants are all under age 18. 6. Type the text 13-17 7. Click in cell right underneath, Type 13-17 (This established the pattern that all cells should be the same, 13-17 ) 8. Select both cells and using the AutoFill handle, click hold and drag down until the defendant age at the left is 18. 9. Repeat steps 5-7, with remaining age range types based on value in Defendant Age at Incident 9. Apply an AutoFilter a. From the menu choose, Data Filter AutoFilter b. The column headers in Excel, now have drop down lists which contain the unique values in that column c. Click on a column header drop down and choose the value you would like to filter on d. The report now only shows those rows that contain the selected event value. e. To show all rows of the report, click the drop down list once again and choose All f. To remove the Auto Filter, choose, Data Filter AutoFilter. 10. Copy Filtered Data to a new Worksheet a. Select all the filtered data by using keyboard, press Ctrl + A b. Copy the data, Ctrl + C or click Copy button on toolbar c. From the Menu choose, Insert Worksheet d. Click in cell A1 if needed. Click Paste, or Edit Paste e. Now this worksheet contains a subset of the original data f. Rename worksheet as desired Page 2 of 6
When to Use PivotTable reports Use a PivotTable report when you want to make large, complex sets of data more comprehensible and easier to understand at a glance. PivotTable reports are especially useful when you have a large amount of data to sum and you want to compare several facts about each figure. Because PivotTable reports enable you to drag fields into different positions in the layout, you can change the view of the data to see more detail or calculate different summaries. Secrets to Success with Microsoft Office Excel PivotTable Reports Before you create a PivotTable report, keep in mind that you should: 1. Ask yourself what you want to know, which tells you which fields of information you want to use. 2. Check your source data. This is the exported report from PROTECT. a. The first row must have headings for each column of data. b. There should be no completely blank rows or columns within the range of data used for the report. c. Each column should contain only one kind of data for example, include text in one column and numeric values in a separate column. PROTECT Export reports are designed so that each of the above items is true. The reports are ready for use in PivotTables without any needed customization. Components of a PivotTable The Pivot Table Wizard presents you with a new worksheet area that contains everything you need to lay out a PivotTable view of your data: the PivotTable Field List that you'll drag fields from, and a layout area. Your job is to drag selected fields from the field list onto the four choices you have on the layout area: row, column, data, or page areas. Start by asking yourself what you need to know, which tells you which fields to use. The following are the Layout areas where o The Row Fields area displays data vertically, one item per row. o The Column Fields area displays data horizontally, one item in each column. o The Page Fields area groups and displays data as if the data were on separate pages, so that you can see only those parts of the data you want to see at one time. o The Data Items area is where data is shown and summarized. For example, this would be the place to drag the DA Case # field, because you want to see the count of the number of rows of data. o You don't have to use all the layout areas. Creating a PivotTable report is about moving stuff around to see how it looks. It's easy to move the pieces around as many times as you like. That's called "changing the layout," which usually just takes seconds to do, and it's an expected part of the process, like holding a picture up on several walls to see where it looks best. Create a PivotTable Report 1. Click in any cell in the worksheet that contains data. i.e. Cell A2 2. From the Data menu, choose PivotTable and PivotChart Report. 3. In Step 1of the Wizard, make sure that Microsoft Excel list or database is selected. 4. Under What kind of report do you want to create?, make sure that PivotTable is selected. Page 3 of 6
5. (Optional Step) Click Next. Step 2 of 3 appears. Excel is very smart and has selected the correct Range of data to use. Click Next. 6. (Optional Step) Step 3 of 3 appears. Make sure New Worksheet is selected. 7. Click Finish. 8. The Wizard provided a new worksheet for creating the report and list of the available fields on the PivotTable Field List. See picture below. Helpful Hints: o If the Pivot Table Field List is hidden, click Show Field List on the PivotTable toolbar (button on far right) o Clicking within the Layout Area shows the Field List. Click outside of the Layout Area and the Field List goes away. Add Fields to the Layout Area / Change Layout Area 1. To add a field as a Row, Column, Page or Data Item, do one of the following: a. Click on a field from the field List, and Click, hold and drag the field to a place on the layout area. Drop the field as a row, column, page, etc b. OR. Click on a field from the field List. At the bottom of the Field List, select Row Area, Columns Area, etc from the drop down list and click the Add To button. 2. Repeat until desired fields are on the table. 3. Multiple fields can be added to a single layout area, or an area does not need any fields at all (such as page, column). See Examples below of the same pivot table with different Page settings. Page 4 of 6
Above shows the breakdown by gender and race for all defendants on domestic cases only, for all referring agencies. Row: Def Gender, Def Race Page: Domestic (set to Domestic), Ref Agency Data Items : DA Case # Columns: None Above shows the breakdown by gender and race for all defendants on domestic cases where Monroe County Sheriff was the referring agency Row: Def Gender, Def Race Page: Domestic (set to Domestic), Ref Agency(set to Monroe Co Sheriff) Data Items : DA Case # Columns: None Filter the Data Included on the PivotTable 1. Click on the drop down arrow of one of the Field Headings located in the Row, Column or Page area. (See pictures at right) 2. Check/Uncheck the values as appropriate. Tip: Check/Uncheck Show All 3. On Statute fields, this filtering is useful when you want to only show cases that have certain fields: i.e. Sexual Assault charges (948 type statutes), or Drug Related statutes. (chapter 961) This filtering by statute makes sense on the DA Case List Demog Case Charge dispo for export report. 4. Scenario: You want statistics about cases with Sexual Assault type statutes. You are not confident that you have used the case type Sexual Assault consistently. Effectively you want the Page area to only be looking at cases with sex assault charges. How to: a. Create a Pivot Table based on DA Case List Demog Case Charge dispo for export report b. Place the DA Case Charge Statute in the Row or Column area. c. Click on the drop down for this charge field d. Uncheck Show All e. Scroll down and check all chapter 948 type statutes. f. Once you have checked all sexual assault related statutes, click OK. g. Move this DA Case Charge Statute field to the Page area of the layout. This allows the summary totals to be about sex assault charges only. This same filtering would be useful to find all charges where the defendant was effectively found guilty. This may mean adding the Charge Dispo field to the Pivot table but filtering the disposition values to only show the types of dispositions that mean found guilty. (See picture at right) Page 5 of 6
Other Tips/Tricks Using Pivot Tables 1. Show all page fields on different worksheets a. With a page field, you can choose whether to see the data for all the items in the field at once, or in groups of items. You can see different views by clicking the downward-pointing arrow alongside the field name. b. You can also display the different page fields on different worksheets. c. On the PivotTable toolbar, click PivotTable, and then click Show Pages. In the Show Pages dialog box, click OK. The various pages will appear as worksheet tabs. 2. A Report by Referral Date. How to Group by Month. (Show all referrals for the year by Jan, Feb, March, etc) a. Add Referral Date field to Row or Column b. Right click on header: Group and show detail group. Choose Months. 3. Remove a Field from the PivotTable a. Right click on top of the field header choose Hide 4. See the data behind a total a. Double click on a total within the pivot table b. A new worksheet opens with the rows of data that made up that total 5. Remove Subtotals a. Double Click on a field header. Set Subtotals to None. Click OK. 6. After changes to information in the source data, click the Refresh Data button on the PivotTable toolbar 7. Warning of the totals or the counts shown the pivot tables when the DA Case # field is set as the Data Item a. DA Case List Demog Summary Dispo for Export i. Each line in the exported report represents a unique defendant/court case #/DA Case number combination. So if a single DA Case # has 2 codefendants and each codefendant had 2 different court case numbers, there would be 4 lines for that DA Case in the exported report 1. DA Case #123, Def A, CC# 2007CT000123, Summary charge for CC# 2. DA Case #123, Def A, CC# 2007TR007896, Summary charge for CC# 3. DA Case #123, Def B, CC# 2007CM000658, Summary charge for CC# 4. DA Case #123, Def B, CC# 2007TR007999, Summary charge for CC# ii. Therefore when the totals are counting the DA Case # field, it would total 4, which seems to correctly represent 4 separate court case #s. iii. In short, the Summary report is good for counting cases b. DA Case List Demog Referred Charge for Export OR DA Case List Demog Case Dispo for Export i. Each line in the exported report lists a separate charge on the DA Case. So if there are 4 Referred charges on one DA case, the Referred Charge report will contain 4 lines of data. ii. When creating Pivot tables for either of these reports, the counts are totaling the number of rows of data which really is CHARGES, not unique cases. iii. This is not to say that you can t get counts of number of cases. Here is how: 1. Place either the Court Case # field or the DA Case # field as the left-most ROW item in the layout area 2. Remove any subtotals for this field 3. Select all the Court Case # s or DA Case #s that appear in the row area. a. With these numbers selected, go to the bottom of the Excel window and right click in the lower right gray area above the task bar. (see picture at right) b. Choose Count. The number that appears is the unique number of court case #s or DA Case #s across your totals within the Pivot table Page 6 of 6