Vous êtes sur la page 1sur 20

Module 5

Importing Data from Excel Reports


Module Overview

• Importing Data from Excel Reports


• Transforming Excel Report Data
Lesson 1: Importing Data from Excel Reports

• Receiving Data As a Report


• Using the Query Editor
• Managing Row Data
• Handling Headers
• Removing Unnecessary Columns
Receiving Data As a Report

• Reports contain formatted information, typically


including:
• Headings
• Totals and
subtotals
• Blank rows,
columns, and
cells
• Graphs and
images
• A data model simply requires the raw data
Using the Query Editor

• Query Editor enables you to “scrub” data as it is


imported
• You define steps that filter and transform the data
• The steps are applied to the data when it is loaded into a
worksheet
• The steps are saved with the query in the worksheet

• You can:
• Edit the query steps if you need to modify
transformations
• Share queries with other users through the Data Catalog
• Duplicate queries and edit their properties if you need to
perform similar operations against other data sources
Managing Row Data

• Remove Rows: Deletes rows that don’t contain


useful data:
• Text
• Footers
• Blank rows

• Retain Rows: Removes all but a contiguous


subsection of the data
• Remove Errors: Removes all rows that contain
an error in selected columns
• Remove Duplicates: Removes all rows that
contain duplicated values in selected columns
Handling Headers

• Columns are given default names


• Column1, Column2, …

• The report might contain column names in a


header row

• Click Use First Row As Headers to promote the


data in this row to column headings
• You can also demote headings to a row
Removing Unnecessary Columns

• Many reports include:


• Totals or other summary columns
• Empty columns, for formatting

• Select these columns, and then click Remove


Columns to delete them
Lesson 2: Transforming Excel Report Data

• Filling Missing Values


• Splitting and Merging Columns
• Replacing Data
• Removing Unnecessary Rows
• Transposing and Unpivoting Data
• Customizing Steps
• Demonstration: Creating an Excel Table from
Report Data
Filling Missing Values

• Groups in reports frequently omit repeating data


• Use Fill -> Down to reinstate this data
Splitting and Merging Columns

• A report can display data generated as the result


of splitting or combining data
• You might need to reconstitute the original data
• Use Split Column to separate combined data
back into its constituent parts
• Use Merge Column to recombine data
Replacing Data

• Replacing values
• Search and replace in selected columns

• Replacing errors
• Replace error indicators with data

• Extracting data
• Replace data with a substring or length

• Formatting data
• Convert data to upper/lower/mixed case
• Trim and clean data
• Add prefixes and suffixes
Removing Unnecessary Rows

• Reports may contain


repeated heading,
subtotals, or other
redundant rows
• Use column filters
to remove these rows
Transposing and Unpivoting Data

• Reversing data
• Transposing data
• Unpivoting data
Customizing Steps

• Query Editor generates Power Query Formula


Language code
• You can edit
this code
directly if you
need to
perform
advanced
operations
Demonstration: Creating an Excel Table from
Report Data

• In this demonstration, you will see how to use


the Query Editor to import data from a report
into an Excel worksheet
Lab: Importing Data from a Report

• Exercise 1: Import Data from a Report


• Exercise 2: Transform the Data
• Exercise 3: Load the Data into an Excel Data Model

Logon Information
Virtual machine: 20779B-MIA-CLI
User name: Student
Password: Pa55w.rd

Estimated Time: 60 minutes


Lab Scenario

You work for an environmental organization that is


concerned with monitoring the extent of sea ice in
the Arctic and Antarctic. For nearly 40 years, a
team of scientists has been taking regular
measurements. They have produced a report that
shows the trends in the area of sea ice at both
regions, broken down by month and year. You
have been asked to extract the data from this
report so that you can use it in a data model for
further analysis.
Lab Review

• Which feature in Query Editor should you use to


transform selected columns into attribute-value
pairs where columns become rows?
• Which feature in Query Editor should you use to
remove rows based on their values?
Module Review and Takeaways

• Review Question(s)

Vous aimerez peut-être aussi