CHAPTER 37Making Queries Work Together

Data analysis is frequently done in layers, with each layer of analysis using or building on the previous layer. When you build a PivotTable using the results of a Power Query output, you are layering your analysis. When you build a query based on a table created by a SQL Server view, you are also creating a layered analysis.

You'll often find the need to build queries on top of other queries to get the results you're seeking. That's what this chapter is all about. Here you'll take a look at a few ways that you can advance your data analysis by making your queries work together.

  1. Sales By Employee.xlsx
  2. Appending_Data.xlsx
  3. Merging_Data.xlsx
  4. FuzzyMatch.xlsx

Reusing Query Steps

It's common to rely on the same main data table for all kinds of analysis. Even the simple table shown in Figure 37.1 can be used to create different views: sales by employee, sales by business segment, sales by region, and so forth.

Of course, you can build separate queries, each performing different grouping and aggregation steps, but that ...

Get Microsoft Excel 365 Bible now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.