The New York Department of Motor Vehicles tracks information about citations, drivers, and officers in separate tables. You import the tables in Excel and in Power Query to build PivotTables with a slicer and a timeline.
[Student Learning Outcomes 10.1, 10.2, 10.4, 10.5, 10.6, 10.7]
File Needed: Database-10.accdb (Student data files are available in the Library of your SIMnet account.)
Completed Project File Name: [your initials] Excel 10-5.xlsx
Skills Covered in This Project
- Get data from an Access database in a workbook.
- Get external data in Power Query.
- Transform data in in Power Query.
- Build PivotTables from the data model.
- Design a dashboard with PivotTables.
- Insert a slicer for PivotTables.
- Insert a timeline for PivotTables.
- Create a new workbook and save it as [your initials] Excel 10-5.
- Get data from an Access database and in Power Query.
- Click the Get Data button [Data tab, Get & Transform Data group] and load tblDMVDrivers-10 from Database-10 directly to your workbook. It displays on a sheet with the same name as the Access table. (Rename the sheet if necessary as tblDMVDrivers-10.)
- Launch Power Query. The Excel table is part of the data model.
- Click the New Source button [Home tab, New Query group] and choose Database and Access.
- Import tblDMVOfficer-10 from Database-10 in your student data files and then import tblDMVTickets-10. The data model has three tables or queries.
- Transform data in the queries.
- Remove the Gender field from tblDMVDrivers-10.
- Edit the label for the first column (license number) to DLN and change the data type to Whole Number.
- Edit the label for the second column to DOB and change the data type to Date.
- Edit labels to display LName and FName.
- Change the Zip field to Whole Number.
- Display the tblDMVOfficer-10 query and edit the label in the first column (officer ID) to Badge.
- Edit the name labels to display First and Last.
- Edit the label for the last column to DOH and change the data type to Date.
- Display the tblDMVTickets-10 query.
- Change the first label to Ticket and the second label to DLN.
- Change both data types to Whole Number.
- Change the label in the third column to Date and set the data type to Date.
- Display Offense and Badge as labels.
- Close and load the queries to your workbook. The tblDMVDrivers table is refreshed and the other two tables are newly loaded. Rename the sheets to match the query names if necessary (see the Queries & Connections pane for query names).
- Summarize data in a PivotTable.
- Select a cell in the tickets table.
- Click the Summarize with PivotTable button [Table Design, Tools group], place the PivotTable on a new worksheet, and add the data to the data model.
- Display the ticket and the offense as Rows. If Sum of Ticket displays in the Values area, drag it to the Rows area below the Offense field.
- Display the fine as a Values field.
- Choose tabular form for the report layout and turn off subtotals if they display.
- Format the values in column C as Currency with no decimal places and change the label to Fine.
- Create a relationship for a PivotTable.
- Click All in the PivotTable Fields pane and expand the tblDMVDrivers-10 list.
- Place the DLN field in the Rows area as the third entry.
- Detect or define the relationship between the tickets and the drivers tables using the DLN field.
- Turn off the display of grand totals.
- AutoFit each column.
- Name the PivotTable as pvtTickets.
- Copy PivotTables.
- Insert a column at column A. You will use column A later in the project for the slicer.
- Select the entire PivotTable and copy and paste it in cell G3. Values display in exponential form when the column is too narrow; AutoFit the columns to see the values.
- Name the PivotTable in cell G3 as pvtOfficers.
- Remove all fields from the PivotTable.
- Place all fields from tblDMVOfficer-10 in the Rows area. If the date field separates into three fields for year, quarter, and month, remove the sectioned fields leaving only the DOH field and drag DOH to the Rows area as the last field.
- AutoFit the columns as needed.
- Apply the None style from the PivotTable Styles gallery. It is the first icon (Figure 10-96).
- Select and copy pvtOfficers to cell L3 and name the new copy pvtOffenses.
- Remove all fields and display the Offense field in the Rows area and the Fine in the Values area.
- Display grand totals for the columns. AutoFit the columns.
- Format the values as Currency with no decimals.
- Edit the label to display Fine.
- Layout the dashboard.
- Name the worksheet as Dashboard.
- Set the width of column A to 30.
- Select pvtTickets, the first PivotTable, and apply the None style to match the other tables.
- Insert a slicer for the officer’s last name.
- Position the slicer in the middle of column A with its top border at row 3 and size it to display all names.
- Connect the slicer to the pvtTickets and pvtOffenses tables.
- Apply White, Slicer Style Light 3.
- Insert and connect a timeline.
- Select row 2 and set the height to 132.
- Select pvtTickets, the first PivotTable.
- Insert a timeline for the ticket date field.
- Display Months as the time division.
- Position the timeline in the middle of row 2 with its left edge at column B.
- Apply Light Gray, Timeline Style Light 3.
- Connect the timeline to pvtOffenses in addition to the tickets table.
- Set the column width to 5 for columns F and K.
- Hide the gridlines.
- Add a second relationship for the PivotTables.
- Click a cell in the pvtTickets table.
- Click the Relationships button [PivotTable Analyze tab, Calculations group]. One relationship between the tickets and the drivers tables displays.
- Click New.
- Create a relationship with tblDMVTickets as the Table and tblDMVOfficer as the related table and determine the common field.
- Select Torres and Markley in the slicer and August 2021 in the timeline.
- Save and close the workbook (Figure 10-97).
Do you need help with this assignment or any other? We got you! Place your order and leave the rest to our experts.
