Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Power Query Cookbook
  • Table Of Contents Toc
  • Feedback & Rating feedback
Power Query Cookbook

Power Query Cookbook

By : Janicijevic
4.5 (14)
close
close
Power Query Cookbook

Power Query Cookbook

4.5 (14)
By: 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)
close
close

Creating tables in M

Thanks to M language, you can create complex tables from scratch without necessarily defining them inside an external data source and then importing them in Power Query. One common example is the definition of a list of dates that can then be customized.

Getting ready

In this recipe, you only need to have Power BI Desktop running on your PC.

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 Blank query connector.
  2. The Power Query UI will pop up and you will see an empty query with its default name as Query1:

    Figure 7.48 – Blank query

  3. Browse to the Home tab and click on Advanced Editor.

    We want to create a list of dates that starts at 01/01/2011 and ends on the current date. In order to define this logic, we have to use the List.Dates expression and its syntax is as follows:

    List.Dates(start as date, count as number, step as duration...

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech

Create a Note

Modal Close icon
You need to login to use this feature.
notes
bookmark search playlist download font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Delete Note

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Edit Note

Modal Close icon
Write a note (max 255 characters)
Cancel
Update Note

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY