Book Image

Learn Power Query

By : Linda Foulkes, Warren Sparrow
Book Image

Learn Power Query

By: Linda Foulkes, Warren Sparrow

Overview of this book

<p>Power Query is a data connection technology that allows you to connect, combine, and refine data from multiple sources to meet your business analysis requirements. With this Power Query book, you’ll be empowered to work with a variety of data sources to create interactive reports and dashboards using Excel and Power BI. </p><p>You’ll start by learning how to access Power Query across different versions of Excel and install the Power BI engine. After you've explored Power Pivot, you’ll see why Excel users find it challenging to clean data in Power Pivot and learn how Power Query can help to tackle the problem. The book will show you how to transform data using the Query Editor and write functions in Power Query. A dedicated section will focus on functions such as IF, Index, and Modulo, and creating parameters to alter query paths in a table. You’ll also work with dashboards, get to grips with multi-dimensional reporting, and create automated reports. As you advance, you'll cover the M formula language in Power Query, delve into the basic M syntax, and write the M query language with the help of examples such as loading all library functions offline in Excel and Power BI. Finally, the book will demonstrate the difference between M and DAX and show how results are produced in M. </p><p>By the end of this book, you’ll be ready to create impressive dashboards and multi-dimensional reports in Power Query and turn data into valuable insights.</p>
Table of Contents (17 chapters)
Free Chapter
1
Section 1: Overview of Power Pivot and Power Query
6
Section 2: Power Query Data Transformations
11
Section 3: Learning M

Appending multiple files

There are two different ways in which we can join tables in Power Query or Power BI, namely, merge or append. In computer science, append means to add to an existing file and not overwrite anything that came before.

This goes beyond here, as even in our merge queries that we have done before this, we have had a primary or relationship key that has allowed us to create new columns or fields. When we append something, it comes underneath everything else that has gone before.

In Power Query or Power BI, when we append files, we will end up with a query that is made up of two or more queries. As an example, we have the following two different tables in different workbooks. We are going to append these files so that they are underneath each other:

Figure 6.32 – Two different tables to be appended

Figure 6.32 – Two different tables to be appended

We are also going to go a step further in this example, as we would like to load the two Excel files, but we will also load...