Book Image

Power Query Cookbook

By : Andrea Janicijevic
Book Image

Power Query Cookbook

By: Andrea Janicijevic

Overview of this book

Power Query is a data preparation tool that enables data engineers and business users to connect, reshape, enrich, and transform their data to facilitate relevant business insights and analysis. With Power Query's wide range of features, you can perform no-code transformations and complex M code functions at the same time to get the most out of your data. This Power Query book will help you to connect to data sources, achieve intuitive transformations, and get to grips with preparation practices. Starting with a general overview of Power Query and what it can do, the book advances to cover more complex topics such as M code and performance optimization. You'll learn how to extend these capabilities by gradually stepping away from the Power Query GUI and into the M programming language. Additionally, the book also shows you how to use Power Query Online within Power BI Dataflows. By the end of the book, you'll be able to leverage your source data, understand your data better, and enrich it with a full stack of no-code and custom features that you'll learn to design by yourself for your business requirements.
Table of Contents (12 chapters)

Designing a report with diagnostics results

Once you have run the query diagnostics, it is important to know how to interpret these results. By just reading data from Power Query in a table, you can miss out on some relevant information. The best way to avoid this is to create a report on top of it by importing the diagnostics queries into a Power BI model and building visuals that can make sense out of that data.

Getting ready

For this recipe, you need to download the FactInternetSales CSV file.

In this example, we will refer to the C:\Data folder.

How to do it…

Once you open your Power BI Desktop application, you are ready to perform the following steps:

  1. Click on Get data and select the Text/CSV connector.
  2. Browse to your local folder where you downloaded the FactInternetSales CSV file and load it two times in order to make a comparison later in the recipe. You should have the following view:

    Figure 10.12 – Queries pane

  3. Rename the FactInternetSales...