1. 02 | Drilldown on Data Discovery using
Power Query
Matt Masson| Senior Program Manager
2. What You Will Learn
• Introducing Power Query
• Working with Power Query
• Partner Opportunities
• Resources
3. Introducing Power Query
• Power Query is a new add-in for Excel to discover, transform and
consume data
• Allows defining queries which run a sequence of steps to import and
reshape data from one or more data sources
- Query steps are defined by using Power Query Formula Language (informally known as
"M“)
Simple query step logic does not require writing formulas
Advanced query step logic can be written to leverage the full power of the language
• Supports a large collection of data source types
• Query results can be loaded into an Excel table or the workbook data
model
4. Business Analysts
• Create queries
• Publish queries
IT Professionals
• Configure data services
• Create and publish
advanced queries
Users
• Search for, and consume,
published queries
Introducing Power Query
PowerQueryAudiences
5. Introducing Power Query
System Requirements
• Supported Operating Systems:
- Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows Server 2008
• Office versions:
- Office 2010 SP1
- Office 2013
- Office Professional Plus and Office 365 Professional Plus editions only
• Internet Explorer 9, or greater
• Available for 32-bit (x86) and 64-bit (x64) platforms
- The selection must match the architecture of the installed version of Office
6. Introducing Power Query
Power Query Ribbon
• Preserves familiarity with the Excel Data tab
• Includes functionality to:
- Search for published queries and load their data
- Source external or workbook data to create a new query
- Combine queries to create a new query
- Manage workbook and machine settings
7. Working with Power Query
• Online Search
• Creating Queries
• Combining Queries
• Managing Queries
• Advanced Scenarios
8. Working with Power Query
Online Search
• Power Query can be used to preview and import data from a large
collection of public queries, for example:
- Wikipedia tables
- A subset of Windows Azure Marketplace and data.gov
• Filters can be applied to limit the scope of a search:
- My Shared
- Organization
- All
• Filters can further refine searches by name, description, data source, data
range and column name
9. Working with Power Query
Creating Queries
• A query is typically created by sourcing external data
• Data can be sourced from:
- Web (an HTML page)
- File
- Database
- Other sources
11. Working with Power Query
Creating Queries – Query
• Queries are defined in the Query Editor window
• Once a data source is defined, the query can be named, and steps created
• Steps can filter and shape data into a desired result
- Steps can easily be produced by applying column filters, and by using the commands
available from the ribbon, or the query and column context menus
- It is possible to select a step and preview the data at that step
- It is also possible to remove steps – but take care not to remove a step that downstream
steps depend on
- Step formulas can be viewed or edited in the formula bar
12. Working with Power Query
Creating Queries – Query Editor
Import the latest data
(run query steps)
14. Working with Power Query
Combining Queries
• New queries can be created to:
- Merge two queries (joining on a common column)
- Append two queries (union)
15. Working with Power Query
Managing Queries
• Each query is added as a workbook
connection, and can be refreshed like
standard data connections
• Queries are managed in the Workbook
Queries pane
• Hovering over the query will produce a
preview of the data, and provide commands
• Queries can be edited, duplicated, referenced,
deleted, merged, appended or shared
16. Working with Power Query
Advanced Scenarios
• The Power Query options allow enabling advanced query editing
• When enabled, a query can be edited as a script, and new queries
can be scripted from scratch
• Customized logic can be developed by implementing functionality
not exposed by the context menus, by using looping constructs, and
parameterizing queries to create functions to be invoked by other
queries
18. Partner Opportunities
• Replace legacy Excel data retrieval logic with Power Query queries
- Create refreshable queries to source, filter and shape data
- Eliminate the requirement to manually prepare and load data
- Eliminate complex transformational logic in worksheets and macros
- Load data directly into workbook data models
• Leverage new data source types:
- OData data feeds, Hadoop, Facebook, etc.
• Publish libraries of queries for discovery and reuse within the
organization
Speaker Notes:
Power Query is a new capability included with Excel.
In essence, Power Query enables the discovery, acquisition and transformation of data. This is achieved with units known as queries.
In this presentation, the focus will be on the creation of queries, and there use to deliver a table of data to a workbook data model.
Speaker Notes:
This slide helps identify the different audiences and the roles they may play with Power Query.
Speaker Notes:
The system requirements for Power Query are listed on this slide.
Microsoft recommend using x64 platform, especially when working with large sets of data, and/or complex transformations.
Speaker Notes:
When the Power Query add-in is installed (and enabled), the Power Query ribbon allows searching for queries, retrieving external data, and producing and managing queries.
Speaker Notes:
These topics will be covered in the remainder of this presentation.
Speaker Notes:
The online search capability allows locating and previewing data sources.
The topic of shared and organization-scoped data sources will be covered in presentation TYDG-06-DECK-01.
Speaker Notes:
Queries can be created based on a external data, and the following slides will describe the currently supported types.
Speaker Notes:
This slide provides a visual of the external data source types.
Ask attendees whether there is a data source that they work with that is not currently supported.
The product team has mentioned that the set of external data sources will likely increase in the future.
Speaker Notes:
The development method usually commences by defining an external data source.
Once the data has been acquired, the user can define a series of steps to filter and shape the data.
The result of the steps is a query result.
Speaker Notes:
Use this animated slide to introduce the layout and functionality of the Query Editor.
Speaker Notes:
Use this animated slide to introduce the functionality available from various context menus that can be launched from within the Query Editor.
Speaker Notes:
When working with multiple queries, it is possible to combine them, as described in this slide.
An advanced combination could involve queries sourced from different data stores, even from different data formats.
Speaker Notes:
Once a query is created, it can be managed by editing it in the Query Editor.
The download of data can be disabled (this is required when the rows exceed the row limit of a worksheet – 1,048,576 rows).
The query can also be loaded into the data model, and will result in a table. If refreshed, the table will refresh the Power Query query.
Speaker Notes:
Advanced scenarios can be enabled by using the Power Query options.
Once enabled, customized logic can be written to produce sophisticated functionality. Describing how to achieve this is beyond the scope of this presentation. A resource on the entire expression language is included in the Resources section of this presentation.
Speaker Notes:
This slide describes how to edit the query as a script.
The icon is only available when Advanced Query Editing is enabled.
Speaker Notes:
Refer to the demonstration scripts and resources.
Speaker Notes:
There are numerous partner opportunities to produce Power Query queries.
Consider asking attendees what opportunities they see based on their experience and customers needs.