Book Image

Mastering Microsoft Power BI

By : Brett Powell
5 (1)
Book Image

Mastering Microsoft Power BI

5 (1)
By: Brett Powell

Overview of this book

This book is intended for business intelligence professionals responsible for the design and development of Power BI content as well as managers, architects and administrators who oversee Power BI projects and deployments. The chapters flow from the planning of a Power BI project through the development and distribution of content to the administration of Power BI for an organization. BI developers will learn how to create sustainable and impactful Power BI datasets, reports, and dashboards. This includes connecting to data sources, shaping and enhancing source data, and developing an analytical data model. Additionally, top report and dashboard design practices are described using features such as Bookmarks and the Power KPI visual. BI managers will learn how Power BI’s tools work together such as with the On-premises data gateway and how content can be staged and securely distributed via Apps. Additionally, both the Power BI Report Server and Power BI Premium are reviewed. By the end of this book, you will be confident in creating effective charts, tables, reports or dashboards for any kind of data using the tools and techniques in Microsoft Power BI.
Table of Contents (15 chapters)

To get the most out of this book

A Power BI Pro license and access to the Power BI service is necessary to follow many of the topics and examples in this book. The assignment of the Power BI Service Administrator role within the Office 365 admin center, as well as administrative access to an On-premises data gateway, would also be helpful for the second half of this book. It's assumed that readers are familiar with the main user interfaces of Power BI Desktop and have some background in business intelligence or information technology.

The primary data source for the examples in this book was the AdventureWorks data warehouse sample database for SQL Server 2016 CTP3. A SQL Server 2017 Developer Edition database engine instance was used to host the sample database. For the import mode dataset, an Excel workbook stored the sales plan data. For the DirectQuery dataset, the sales plan data was stored in the sample SQL Server database.

The AdventureWorksDW2016CTP3 sample database can be downloaded from the following URL:

Editions of SQL Server 2017 are available for download from the following URL:

The Power BI Desktop files and specific queries and scripts utilized in the book are included in the code bundle. However, the source data and database are not included in the code bundle. Additionally, the database used by the book contains objects not included in the downloadable sample database, such as SQL views for each fact and dimension table. Therefore, even with access to a SQL Server 2017 database engine instance and the sample AdventureWorks data warehouse database, the examples in the book cannot be completely reproduced.

Download the example code files

You can download the example code files for this book from your account at If you purchased this book elsewhere, you can visit and register to have the files emailed directly to you.

You can download the code files by following these steps:

  1. Log in or register at
  2. Select the SUPPORT tab.
  3. Click on Code Downloads & Errata.
  4. Enter the name of the book in the Search box and follow the onscreen instructions.

Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:

  • WinRAR/7-Zip for Windows
  • Zipeg/iZip/UnRarX for Mac
  • 7-Zip/PeaZip for Linux

The code bundle for the book is also hosted on GitHub at In case there's an update to the code, it will be updated on the existing GitHub repository.

We also have other code bundles from our rich catalog of books and videos available at Check them out!

Download the color images

Conventions used

There are a number of text conventions used throughout this book.

CodeInText: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "Mount the downloaded WebStorm-10*.dmg disk image file as another disk in your system."

A block of code is set as follows:

P.ProductKey as 'Product Key'
, P.ProductAlternateKey as 'Product Alternate Key'
, P.EnglishProductName AS 'Product Name'
, ISNULL(S.EnglishProductSubcategoryName, 'Undefined') 'Product

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

Internet Sales Amount (Import) =
SUMX('Internet Sales','Internet Sales'[Order Quantity]*'Internet
Sales'[Unit Price])
Internet Sales Amount (DirectQuery) =
SUM('Internet Sales'[Sales Amount])

Bold: Indicates a new term, an important word, or words that you see onscreen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: "Select System info from the Administration panel."

Warnings or important notes appear like this.
Tips and tricks appear like this.