Download as pdf or txt
Download as pdf or txt
You are on page 1of 129

Microsoft Power BI Desktop

In this course, we will explain Power BI features that can be used to create a dashboard of different
reports describing related tables. We will take the students through a step-by-step process displaying the
capabilities including Getting Data, Query Editor, Data View, Relationships, Visual Reports,
Formatting, Filtering, Publishing on the Web, and Creating a Dashboard. The final step will post the
Dashboard on the internet to be shared with others.

1 - Power BI Process Overview - Here we will describe the Power BI program, how to download it, and
how it relates to the online Power BI tools. We will also discuss terminology and the overall process
to create a dashboard. You need to install Power BI Desktop in order to attend the class. Go to
http://PowerBI.com/pricing to get your free download.
2 - Get Data - This will extract the data source from a database such as Excel, Access, etc.
3 - Query Editor - This will allow us to review the data extracted and filter or remove specific records
prior to saving it to the Power BI file.
4 - Data View - This will allow us to review the structure of the data extracted and add additional
fields as needed. These new fields can be used for establishing relationships or creating new fields.
5 - Relationships - This will allow the different tables to display how data is tied together. Storing all
data into a single table isn’t as efficient as storing data in separate tables containing specific
information.
6 - Visual Report - This will generate different reports describing the data from different tables. These
reports will include Charts, Matrix, Tables, Summary Information, Maps, etc.
7 - Filter Report - Once you create a report, it can be filtered to display the desired information.
8 - Format Report - Once you create a report, it can be formatted to display the desired layout.
9 - Publish Report - Once reports are complete, they can be Published to a web browser version of
Power BI and shared with others on the internet.
10 - Create A Dashboard - Once reports are Published, they can be organized into a dashboard layout
for others to preview. Different Dashboards can be created describing a different set of data in each
of the tables.

Exercise Download
Exercises are posted on the website and can be downloaded to your computer.
Please do the following:
Open Internet Explorer/Edge: Or Google Chrome:
Type the web address: elearnlogic.com/download/powerbi-2.exe
You might get several security warnings, but answer yes and run through each one. When you click
“Unzip,” the files will be located in C:\Data\PowerBI-2 folder.

If there are any questions or problems, please


contact Jeff Hutchinson at:
JeffHutch@elearnlogic.com
Note: For Mac users, download the file at:
elearnlogic.com/download/powerbi-2.zip

Page 1
Introduction

Table of Contents
Chapter 1 - Power BI Process Overview ...................................................................................... 5
Step 1 - Get Data ................................................................................................................. 7
Step 2 - Query Editor .......................................................................................................... 8
Step 3 - Data View ............................................................................................................ 10
Step 4 - Relationships ....................................................................................................... 11
Step 5 - Visual Report ....................................................................................................... 12
Step 6 - Filtering Report ................................................................................................... 15
Step 7 - Formatting Report ............................................................................................... 16
Step 8 - Publish Report ..................................................................................................... 17
Step 10 - Create A Dashboard .......................................................................................... 18
Student Project A - Create Report With Relationships ..................................................... 20
Chapter 2 - Get Data.................................................................................................................... 25
Section 1 - Power BI Interface .......................................................................................... 25
Section 2 - Home Ribbon Tab .......................................................................................... 28
Chapter 3 - Visual Report ........................................................................................................... 33
Section 1 - Operations And Manipulation ........................................................................ 33
Section 2 - Report Types................................................................................................... 38
Chapter 4 - Filter Report ............................................................................................................ 51
Section 1 - Chart Filters .................................................................................................... 51
Section 2 - Format Contextual Ribbon Tab ...................................................................... 58
Section 3 - Data / Drill Contextual Ribbon Tab................................................................ 60
Chapter 5 - Format Report ......................................................................................................... 65
Section 1 - Chart Formatting............................................................................................. 65
Section 2 - Page Formatting .............................................................................................. 69
Section 3 - Format Contextual Ribbon Tab ...................................................................... 70
Section 4 - View Ribbon Tab............................................................................................ 72
Section 5 - Special Formatting Topics .............................................................................. 73
Chapter 6 - Data View ................................................................................................................. 81
Section 1 - Modeling Ribbon Tab ..................................................................................... 81
Chapter 7 – Relationships ........................................................................................................... 89
Section 1 - Relationships .................................................................................................. 89
Section 2 - Modeling Ribbon Tab ..................................................................................... 91
Chapter 8 - Query Editor ............................................................................................................ 93
Section 1 - Query Editor Interface .................................................................................... 94
Section 2 - Home Ribbon Tab .......................................................................................... 95
Section 3 - Transform Ribbon Tab ................................................................................. 111
Section 4 - Add Column Ribbon Tab ............................................................................. 120
Section 5 - View Ribbon Tab.......................................................................................... 124
Index - Power BI Desktop ......................................................................................................... 127

Page 2
Introduction

Copyright and Release Information


This document was updated on 5/7/2018 (Version 1) and is designed for Power BI Desktop. Power BI
Web Services is a separate book and comprehensive book is available which combines both books. This
material is the sole property of Jeff Hutchinson and eLearnLogic. Any emailing, copying, duplication or
reproduction of this document must be approved by Jeff Hutchinson in writing. However, students who
take a class or purchase the material can use this document it for personal development and learning. This
document is based on April 2018 Release 2.57.5068.721.
ISBN-13: 978-1718621961 ISBN-10: 1718621965

About the Author


Jeff Hutchinson is a computer instructor teaching a variety of classes around the country. He has a BS
degree from BYU in Computer-Aided Engineering and has worked in the Information Technology field
supporting and maintaining computers for many years. He also previously owned a computer training and
consulting firm in San Francisco, California. After selling his business in 2001, he has continued to work
as an independent computer instructor around the country. Jeff Hutchinson lives in Utah and also provides
training for Utah Valley University Community Education system, offering valuable computer skills for
the general knowledge of students, career development, and career advancement. Understanding the
technology and the needs of students has been the basis for developing this material. Jeff Hutchinson
can be contacted at JeffHutch@elearnlogic.com or (801) 376-6687.

Manual Design
This manual is designed in conjunction with an Online-Instructor-Led course (for more information
see: www.elearnlogic.com). Unlike other manuals, you will not need to review lengthy procedures in
order to learn a topic. All that is needed are the brief statements and command paths located within the
manual that demonstrate how a concept is used. Furthermore, you will find that this manual is often used
as a reference to help understand concepts quickly, and an index is provided on the last page of the
manual to reference pages as necessary. However, if more detail is needed, you can always use the
Internet to search a concept. Also, if your skills are weak due to lack of use, you can refresh your memory
quickly by visually scanning the concepts needed and then testing them out using the application.

Manual Organization
The following are special formatting conventions:
Numbered Sections on the left are the Concepts covered.
Italic Text is used to highlight commands that will perform the concept or procedure in
completing the practice exercises.
Practice Exercises are a Step-by-Step approach to demonstrate the concept.
Student Projects are a more comprehensive approach to demonstrate the concept.
Dark, Grayed-Out Sections are optional/advanced concepts.
Bolded items are commands in the ribbons or commands used.
Tip - These are additional ideas about the concept.

Page 3
Chapter 1 - Power BI Process Overview
In this chapter, we will discuss the history of Power BI. This includes commonly used products,
strategies, and steps to build a Dashboard.
Concept Explanation / Command String in italic.
1.1 History of Power BI evolved from Excel Add-ins including PowerPivot, PowerQuery,
Power BI PowerView, and PowerMap. You will see many similarities in Excel and Power
BI, but the features are much better integrated.
1.2 Power BI This is a downloadable, locally installed program used to create and develop a
Desktop Dashboard of charts describing your data source. One of the most important
elements of Power BI is the development of Visuals (also called Reports or Tiles).
When developing multiple Visuals, you can place them on a page and create
multiple pages in the lower portion of the screen, similar to Excel.

The chart above is the Visual Report (also called a Tile) and Page1 is the page
where the Visual is placed. The Command Ribbons are located on the top, the
Visualizations are the different reports to add, and the Fields on the right are the
Data Table Fields available to create Visuals.
1.3 Power BI Web This will allow you to Publish Visuals/Reports and organize them into a single
Service Dashboard. It can be shared on the Power BI web service (Microsoft Cloud) for
the world to view. A URL will be provided to send to those who need access to the
Dashboard. You can also do some development at the web service level, but
usually, it will occur at the installed Power BI Desktop version. An On-Premise
Power BI version is a special install and will allow you to upload your Dashboard
to a controlled cloud at your company. Therefore, some organizations may not
want their Dashboards exposed to the Microsoft Cloud for security reasons.

Page 5
Chapter 1 - Power BI Process Overview

1.4 Story Before you create a Dashboard, you must first develop a visual story (or
message). This is the objective of the end result of a Dashboard. You must
determine the message you want the person viewing your Dashboard to receive.
Questions to consider while preparing a Dashboard:
1. What story do you want to tell?
2. What do you want to show?
3. Are you trying to show trends, geography, or active information?
4. Who is your audience?
5. What do you want them to discover?
Who is reviewing your Dashboard?
There are different ways to layout a Dashboard. The following are people who
may want to view things in different ways:
1. A Manager wants to see things on a first look.
2. A Technical person may want a drill-down capability.
3. A Project team member wants to see status/progress.
1.5 Dashboard The order or layout of a Dashboard is important and the following are guidelines
Development when creating one:
Guidelines 1. Readability - People read from top to bottom and left to right. Therefore,
the location of charts is critical for the reader.
2. Start With The End - What decisions need to be made for this particular
Dashboard? What are the main considerations?
3. Think Critically - Do you understand what you are showing?
Do your measures/DAX formulas make sense?
4. Match The Graphic To The Data - Make sure you are using
the graphic that represents the data properly.
5. Simpler Is Better - Using too many reports/graphics on a page could
provide too much information. The order of arrangement is key to good
visibility.
6. Be Consistent - Keep the colors, formatting, title colors, and overall theme
consistent throughout.
7. Edit Interactions - Test out the interactions by clicking on a chart to see all
other charts adjust. Is this the result you want?
8. Number Result Formatting - Make sure your numbers are formatted
consistently with percents, thousands, millions, etc.
Practice Exercise 1 The following Step-By-Step Practice Exercise will walk you through the process
to build a Power BI Visual Report. A brief overview of the concepts necessary to
perform each Step will be reviewed prior to starting the Practice Exercise.

Page 6
Chapter 1 - Power BI Process Overview

Step 1 - Get Data


Concept Explanation / Command String in italic.
1.6 Get Data This is the first step in the process to Get Data for the creation of a
Dashboard. The system supports many data sources including an Excel
Spreadsheet.
This will skip to the Query Editor step and
1.7 Load
load the Visual Report screen.
This will open the Query Editor to make
1.8 Edit changes to the data source and filter the data.
Practice Exercise 2 1. Start Power BI Desktop or a new blank report (File Tab New).
Get Data
2. Open Power BI Desktop Get Data drop-down Excel
C:\Data\PowerBI-2\Financial Sample1.xlsxOpen.
3. Choose the Financial Sheet.

4. Edit .
This will open the Query Editor and adjust the data to be loaded into Excel

Page 7
Chapter 1 - Power BI Process Overview

Step 2 - Query Editor


Concept Explanation / Command String in italic.
1.9 Query This will go into the interface (similar to Excel PowerQuery) to manipulate the
Interface data. At this point, you can filter or eliminate undesired records. If you pull data
from an information website (such as government censuses data), you will need to
reduce the amount of information available. In some cases, you will go straight to
generating visuals (reports). The goal of this step is to place the core data in a
Power BI data table that is necessary for the reports.
1.10 Edit Query After you leave the Query Editor, you can return by selecting the Edit Query
button.

1.11 Close And When finished manipulating the Query, choose the “Close and Apply” button.

Apply
Practice Exercise 3 1. The Query Editor should be open:
Query Editor

2. Make changes to the labels or rename the labels:


Double Click on the label and change it to the following:
Original Label Change to

3. Sort by :
Locate the Label Sort Ascending

4. Review the data type:

Locate the Date Field 


Select the data type icon Change the data type to Date 

Page 8
Chapter 1 - Power BI Process Overview

The icon will change to the date data type .


8. The end result will look like the following:

9. Close and Apply changes: Home Ribbon Tab Close & Apply.
The result will look similar to the following:

Page 9
Chapter 1 - Power BI Process Overview

Step 3 - Data View


Concept Explanation / Command String in italic.
1.12 Data View Data View is used to manipulate columns in the tables. Many of the same
options are available in the Query Editor, but it is primarily designed to limit or
filter the amount of data that is loaded into the Power BI Data View . You could
go back to the Query Editor, or make changes in the Data View , by choosing
the Edit Query button.
Practice Exercise 4 1. Data button (left side of the screen).
DAX Formula
2. Create New Column: Modeling Ribbon Tab New Column Type in the
DAX formula to create the New Column by typing the following:
Products Sold = Financial[Product] & “-“ & Financial[Units Sold]
The result should look similar to the following:

3. Press the checkbox to finalize the New Column.


4. Review the New Column:

Page 10
Chapter 1 - Power BI Process Overview

Step 4 - Relationships
Concept Explanation / Command String in italic.
1.13 Table Tables can be joined, or related, in order to access and coordinate information in
Relationships all fields of the related tables. Joining tables is a useful way to avoid entering
duplicate information. In addition, it allows you to pull data, located in different
tables, into a single report. Relating Tables allows you to create smaller, more
efficient tables that can be referenced when you need access to the data.
1.14 Auto- If the field names and data types are the same, the system will relate the tables
Relationships automatically.
1.15 Manage This will open the Relationship options in order to display the tables to be related.
Relationship You will be able to view defined, add New, Autodetect, Edit or Delete
Relationships.
Modeling Ribbon Tab Manage Relationships

1.16 Relationship This is a graphical representation of the related tables.


Button Click on the Relationship button (Located on the left side of the screen).

Practice Exercise 5 The Financial Sample1 is a flat database and does not require any relationships.
Relationships We will explore this Student Project A.

Page 11
Chapter 1 - Power BI Process Overview

Step 5 - Visual Report


Concept Explanation / Command String in italic.
1.17 Visuals, These are terms defining the individual Reports that are generated. These include
Reports, Tiles Charts, Locations/Maps, Text Tiles, etc. The Reports are used in combination to
create a Dashboard. Visuals are also called Visualizations. The following are
several Visual Reports that define a Dashboard.

1.18 Field List This will list the Fields (Columns) stored in the data source.
They can be used to create the Visuals (Reports). To add them
to a report simply drag and drop the field name in the Report
Area.

1.19 Bucket A Bucket is located in the Visual Report pane and a dashed
line appears around the Bucket if it can be dropped.
1.20 Well This is located in the Visual Report pane and contains several
Buckets.
One box is a bucket, but the entire area is a well.

Practice Exercise 6 1. Create a Country Clustered The Chart will look


Clustered Column Chart. similar to the following:
Column 1a. Select the chart type:
Chart
Clustered
Column Chart.
1b. Drag the fields
to the following
bucket positions:

Practice Exercise 7 2. Change the Chart Type to a Line Chart.


Other Charts Once you create a chart, you can change it by clicking
on any chart desired.
2a. Click the Line Chart icon.

Test it: Try out the other chart types available.


2b. When finished, return back to the
Clustered Column Chart.

Page 12
Chapter 1 - Power BI Process Overview

Practice Exercise 8 4. Create a Pie Chart: The Chart will look


Pie Chart 4a. Click in the white area to similar to the following:
start a new report.
4b. Click on the
Pie Chart icon.
4c. Drag the fields to
the following
bucket positions:

Practice Exercise 9 5. Create a Treemap:


Treemap 5a. Click in the white area to
start a new report.
5b. Click on the
Treemap icon.
5c. Drag the fields to
the following
bucket positions:

Practice Exercise 10 6. Create a Country Map: The Map will look


Map 6a. Click in the white area to similar to the following:
start a new report.
6b. Click on the
Map icon.
6c. Drag the fields to
the following
bucket positions:

Practice Exercise 11 6. Create a Table: The Table will look


Table 6a. Click in the white area to similar to the
start a new report. following:
6b. Click on the
Table icon.
6c. Drag the fields to
the following
bucket positions:

Page 13
Chapter 1 - Power BI Process Overview

Practice Exercise 12 7. Create a Card: The Card will look


Card 7a. Click in the white area to similar to the following:
start a new report.
7b. Click on the
Card icon.
7c. Drag the fields to the
following bucket
positions:

Practice Exercise 13 8. Create a Card: The Card will look


Card 8a. Click in the white area to similar to the following:
start a new report.
8b. Click on the
Card icon.
8c. Drag the fields to the
following bucket positions:

Practice Exercise 14 9. Create a Card: The Card will look


Card 9a. Click in the white area to similar to the following:
start a new report.
9b. Click on the
Card icon.
9c. Drag the fields to
the following
bucket positions:
Practice Exercise 15 10. Rearrange the Tiles to the following layout:
End Result

Page 14
Chapter 1 - Power BI Process Overview

Step 6 - Filtering Report


Concept Explanation / Command String in italic.
1.21 Filters Filters are used to reduce the visible information in
all reports. Filters can be applied to:
1. A specific Visual Report.
2. All Visuals on a page.
3. All Visuals on all pages.

Practice Exercise 16 1. Filter the Clustered Column Chart:


Filters
1a. Filters  Country.
Do not show France data.
2. Filters can also
be applied by
clicking on a
specific chart.
All other tiles
will reflect the
Filter.
2a. Select the
Mexico chart:
Filter other Visuals as
desired.

Page 15
Chapter 1 - Power BI Process Overview

Step 7 - Formatting Report


Concept Explanation / Command String in italic.
1.22 Format The Format well (screenshot to the left) will allow you to
change the text labels, numbers, background, borders, etc. for
the Visual Report.

Practice Exercise 17 1. Format the Colors of the Clustered Column Chart:


Format Chart Select the Clustered Column Chart
Colors, Title,
And Border Format Data Colors
Change the colors of each country:
2. Format the Title bar:
Title 
Font Color: Black
Background Color: Light Blue
3. Format the Border.
Border 
Color: Black
The end result
will look similar
to the following:

Practice Exercise 18 4. Format the text size on the Table:


Format Text Select Country/Gross Sales Table

FormatValues dropdown Text Size: 14

It is important that the changes made are consistent with all reports. For example,
the Light Blue Title created in the previous example should be consistent in all
reports. Tip: Use the Format Painter to copy the format.

Page 16
Chapter 1 - Power BI Process Overview

Step 8 - Publish Report


Concept Explanation / Command String in italic.
1.23 Publish This will Publish the reports to the Power BI Service available on the internet for
others to view.

1.24 Power BI Web The following is the link to the Power BI Web Service. You will need a login
Service account and password to use the service. http://PowerBI.com
When you open the Power BI Web Service, the following will be displayed:

Practice Exercise 19 1. Publish the various


Publish reports:

PublishPublish
to Power BI
2. Login to Power BI Service

3. Success Status

4. Open Published file on Power BI Service: Select the link below.

Or https://powerbi.microsoft.com/en-us/landing/signin/

Page 17
Chapter 1 - Power BI Process Overview

Step 10 - Create A Dashboard


Concept Explanation / Command String in italic.
1.25 Dashboard This is a combination of reports arranged to tell a story about an overall theme.

1.26 Open If you have more than one Dashboard, you


Dashboard can switch between them.

Tip: A star next to a report name indicates it


has been recently saved.

1.27 Publish To
Web
File menu Publish to web.
Practice Exercise 20 1. Expand the My Workspace link:
Dashboard

2. Open the report Financial Sample1.

3. Click in the upper left corner and press


the Push Pin to create a Dashboard.

Page 18
Chapter 1 - Power BI Process Overview

3. Create the Dashboard by pressing the Push Pin located in the upper right
corner of each report.
Pin each tile in the upper right corner:

4. Add all other Tiles to the Dashboard:

5. Click the Share Button in order to share the Dashboard with


others.

Page 19
Chapter 1 - Power BI Process Overview

Student Project A - Create Report With Relationships


Student Project A1
Get Data Open Power BI Desktop Get Data dropdown Excel
C:\Data\PowerBI-2\HotdogSales.xlsxChoose All Sheet Sales.

Edit .
This will open the Query Editor to adjust the data to be loaded into Excel.
Student Project A2 1. Open the QtrSales Table located on the left side of screen .
Query Editor

2. Make changes to the labels:


Locate the Quarter Label
Double Click on the label and change it to Qtr
3. Sort by Qtr:
Locate the Qtr Label Sort the fields

4. Make changes to the labels:


Locate the Date Label
Double Click on the label and change it to Order Date
5. Review the dataType:
Locate the Date Field 
Select the data type icon Change the data type to Date 
The icon will change to the date data type .
6. Change the datatype to Text:
Locate the Year Field Select the data type icon 
Change the data type to Text  The icon will change to the date data type
. Tip: Choose if prompted.
Notice it is now left justified for the Text data type.
7. Adjust the Locations Table if needed:
Open the Locations Table located on the left side of screen

Page 20
Chapter 1 - Power BI Process Overview

8. Adjust the Products Table by using the first row as a header:


Open the Products Table located on the left side of screen

Use the first row as a header:


Home Ribbon Tab Use First Row as Header

9. The end result of the QtrSales Table will look like the following:

10. Close&Apply: Home Ribbon Tab Close & Apply.

Student Project A3 1. Data button (left side of the screen)


DataView Select the QtrSales Table located on the right side of the screen.
2. Create New Column: Modeling Ribbon Tab New Column
Type in the DAX formula to create the New Column:
YearQ = QtrSales[Year] & QtrSales[Qtr]
The DAX formula will look similar to the following:

3. Press the checkbox to finalize the New Column.


4. Review the New Column:

Page 21
Chapter 1 - Power BI Process Overview

Student Project A4 1. Review the Graphical Layout of relationships:


Relationships Click on the Relationship button (Located on the left side of the screen)

2. Manage Relationships:
Home Ribbon Tab Manage Relationships.

Student Project A5
1. Click on the Visual Report Icon located on the left top a portion of the
Create Tiles
screen.
2. Create a Clustered Column Chart from
the QtrSales Table by:
2a. Dragging to a blank
location in the work area.
2b. Add the to the chart.

Tip: The default chart used is a


Clustered Column Chart .

3. Create a Pie Chart:


3a. Click in the white area to
start a new report.
3b Create a Pie Chart using the following:
Product Table:
QtrSales Table:

4. Create a Table Report:


4a. Click in the white area to
start a new report.
4b Create a Table using the following:
Locations Table:
QtrSales Table:

Page 22
Chapter 1 - Power BI Process Overview

5. Create a Treemap Report.


5a. Click in the white area to
start a new report.
5b Create a Treemap using the following:
Product Table:
QtrSales Table:

Student Project A6 Filter the Clustered Bar Chart:


Filters FiltersYear
Do not show 2010 data.

Student Project A7 1. Format the colors of the Clustered Column Chart.


Format Format iconData Colors

Default Color .
To change the color of each bar: Show all On: .
2. Format the Font Color.
TitleFont Color .
3. Format the Border.
Border  .
4. Format the Table Report:
Select the Table FormatTotalsText Size: .

Page 23
Chapter 1 - Power BI Process Overview

Student Project A8 Publish the various Visual Reports:


Publish Home Ribbon Tab Publish
Publish to Power BI
Success Status

Click on the link above in order to see the web preview. Go to PowerBI.com to
create an account: You will need a Login and Password.
Student Project A9 1. Create the Dashboard.
Dashboard
Press the push pin located in the upper
right corner of each report.

Add all reports to the Dashboard: HotDog

Page 24
Chapter 2 - Get Data
In this chapter, we will cover the first step in the process of building a Visual Report. Here, you can
extract information from a data source to be used in Power BI Desktop. Data can be either stored in the
Power BI table or a link can be provided to the data source that will refresh when newly updated data is
needed. The screen below is the Power BI interface (used to create a Visual Report) that is connected to
the data source. Once the data is loaded into Power BI Desktop, you can create reports by clicking on the
report icon or dragging the field to the work area.
Chapter Table of Contents
Section 1 - Power BI Interface
Section 2 - Home Ribbon Tab
Section 1 - Power BI Interface

Center Pane
Left Pane Right Pane

Concept Explanation / Command String in italic.


Practice Exercise 21 1. In Power BI Desktop: File TabOpen
Open C:\Data\PowerBI-2\Visual Reports3.pbixOpen button.
This will open a Power BI file containing the following Visual Reports:

Each Power BI file will open a new Power BI program into memory.
2. To close the above file, you must exit out of Power BI completely.
You must open Power BI again to work on a different file. File Tab Exit.
2.1 Get Data This is the first step in the process to Get Data to be filtered. Get Data supports
many data sources including Excel Spreadsheets.
In Excel: Data Ribbon Tab Get Data.

Page 25
Chapter 2 - Get Data

2.2 Data source You can connect to a variety of sources such as local small
databases, larger server-based databases, or data warehouses.
A data warehouse is a special type of database which is a
storage collection of information and is usually not actively
updated. Data can be extracted from websites such as
government consensus, Facebook data, etc. Some of the
more common Data Sources include Excel, SQL, Access,
etc. Power BI can support many database types.

Tip: To get Facebook data: Get DataOther Services.

2.3 Load This will skip to the Query Editor and Load the
Visual Report to the Power BI Desktop screen.
2.4 Edit This will open the Query Editor to adjust the data
source by filtering the data.
Practice Exercise 22 1. Start Power BI Desktop or a new blank report (File Tab New).
Get Data
Excel Worksheet 2. In Power BI Desktop: Home Ribbon Tab Get Data dropdown
ExcelC:\Data\PowerBI-2\BikeDB1.xlsxOpen.
3. Choose the Customers Table.

4. Load .
This will skip to the Query Editor (filtering) step and Load the data directly to the
Power BI Visual Editor in order to build Visual Reports.

You can now begin creating Visual Reports by dragging Visual Charts and
checking the checkboxes in front of the field names.

Page 26
Chapter 2 - Get Data

2.5 Left Pane The Left Pane displays the following Icons:
Report - This is used to view and create Visual Reports.
Refer to Chapter 3
Data - This is used to view and edit the results of the data source after
the Query Editor changes have been made. Refer to Chapter 8.
Relationships - If several tables are added, the system will attempt to
establish the relationships between them. Refer to Chapter 7.
2.6 Center Pane In the Center Pane is used to place the Visual Reports.

2.7 Right Pane This contains Visual Report icons and the Field List.

Practice Exercise 23
Get Data 1. In Power BI Desktop: Get Data  More… Access Database
Access Database  C:\Data\PowerBI-2\Northwind 2008.accddOpen.
2. Choose the Customers Table.

3. Load
This will skip to the Query Editor (filtering) step and load the data directly to
Power BI Visual Reports.

Page 27
Chapter 2 - Get Data

2.8 Access Error If you receive the following error message when connecting to an Access database:

This indicates that the Access file was created using a Microsoft Office 32-bit
installation and Power BI was installed using a 64-bit installation (or the opposite
case will also produce the error). This mismatch error can be resolved by installing
the Power BI or Access using the same installation.
If you are still receiving the error using the 32-bit installation of Access and
Power BI, then install the following from the Microsoft website: Microsoft
Access Database Engine 2010 Redistributable.
2.9 Undo/Redo The Undo is located in the upper left corner of the screen in the
Ribbon Group Quick Access Toolbar. As you create new Visual Reports the
following will Undo and Redo the steps performed:
Undo - This fixes mistakes. Shortcut: CTRL Z
Redo - This reverses the Undo. Shortcut: CTRL Y
Tip: Each Ctrl Z will Undo multiple steps.
Section 2 - Home Ribbon Tab

Concept Explanation / Command String in italic.


2.10 Clipboard Cut - Used to move selected items. Shortcut: CTRL X
Ribbon Group Copy - Used to Copy selected items. Shortcut: CTRL C
Paste - Pastes the Cut or Copied items. Shortcut: CTRL V
Tip: The Paste button does not have a drop-down arrow to do a
Paste Special.
Tip: The Double-Click Format Painter feature does not work.
2.11 Get Data This is the first step in the process to Get Data desired to create a Dashboard. The
system supports many data sources including an Excel Spreadsheet.
Practice Exercise 24 1. Start Power BI Desktop or a new blank report (File Tab New).
Get Data
Excel Worksheet 2. In Power BI Desktop: Get Data dropdown Excel
C:\Data\PowerBI-2\Financial Sample1.xlsxOpen.
3. Choose the Financial Sheet.

Page 28
Chapter 2 - Get Data

4. Load
This will skip to the Query Editor (filtering) step and Load the data directly to
Power BI Visual Editor to build Visual Reports.

2.12 Recent After you have opened a data source, it will be listed under the
Sources Recent Sources button. This is a shortcut to the previously
accessed data source.
In Power BI: Home Ribbon Tab Recent Sources.
2.13 Enter Data This will create a new blank table and will allow
you to enter new data.

Practice Exercise 25 Create a new table and Enter Data.


Enter Data
1. Create a new blank table. In Power BI: Home Ribbon Tab
Enter Data Enter values 1 through 20Name: Table1 .
Tip: The new Table, called Table1, will be in
the Field List located at right side of the
interface.
2.14 Edit Queries Once you Close & Apply a Query, you can edit it at any time by pressing the
Edit Queries button.

Practice Exercise 26
1. In Power BI: Home Ribbon Tab Edit Queries Dropdown
Edit Queries
Edit Queries.
2. In Query Editor: Home Ribbon Tab Close & Apply.
2.15 Refresh If your data source is connected to a live database or connected through a gateway,
a Refresh will get new data from the data source and Refresh all Visual Reports.
Tip: The Power BI Gateway is a separate product used to connect to a secure data
source.

Page 29
Chapter 2 - Get Data

2.16 Solution This will take you to the App Source Website to add additional Apps to Power
Templates BI Desktop.

2.17 Partner This will take you to the Partners Website to search for consultants in your area
Showcase for advice and consulting.

2.18 New Page This creates a New Page or


duplicates an existing page.
Tip: Additional pages will allow you to isolate or develop a different message
using multiple Visual Reports.
2.19 New Visual This creates a New Blank Visual Report. The report on the
right is a report template that contains no data source. As
soon as you apply a data source field to the template, it will
report on the information.

2.20 TextBox This can be used to create a title for a Dashboard or description in the Work
Area. When you add a TextBox, the following Contextual Text Ribbon Tab
will be displayed:
This will be covered in greater detail in Chapter 3 Section 1.

Page 30
Chapter 2 - Get Data

Practice Exercise 27 When you select the TextBox, the following toolbar popup will appear:
Text Box Home Ribbon Tab TextBoxDraw the TextBox in the work area.

2.21 Image This places an Image in the background of the Visual Report.
Practice Exercise 28 Images can be added to enhance the look of Visual Reports.
Image In Power BI Desktop: Home Ribbon Tab
ImageC:\Data\PowerBI-2\Background.png.

This will be covered in greater detail in Chapter 3 Section 1.

2.22 Shapes Shapes are objects that can be added to a Visual Report. Shapes
will be placed into a new Visual Tile and you can use the
Rectangle Shape around two related Visual Reports. However,
you will need to set the Fill Transparency to 100%.

This will be covered in greater detail in Chapter 3 Section 1.


Practice Exercise 29
Insert Ribbon Tab Shapes Dropdown
Shapes
Choose the desired shape.
To format the Shape, refer to the Format Shape on
the Right pane.
2.23 From Store This allows you to download additional analysis Apps:

2.24 From File This allows you to import additional analysis Apps:

Page 31
Chapter 2 - Get Data

2.25 Manage This will open the Relationship view and display the relationships between two
Relationships different tables. It will be discussed in greater detail in
Chapter 7 - Relationships.

2.26 New Measure


A New Measure is a calculated field used to create a summarized result and is
stored in the Field List located on the right side of the interface.
Tip: This feature will be covered in greater detail in Chapter 6.
2.27 New Column
A New Column will create a new field in the Field List and will also be
added as a Column in the Data tab located on the left side of the screen.
Tip: This feature will be covered in greater detail in Chapter 6.
2.28 Publish This will Publish the reports to the Power BI Service available on the internet for
others to view.

2.29 View Ribbon The View Ribbon Tab will be covered in Chapter 5 Section 4 in greater detail.
Tab
2.30 Format The Format Ribbon Tab Edit Interactions button will be covered in
Ribbon Tab Chapter 4 Section 2 in greater detail.
2.31 Format The Format Ribbon Tab (Bring Forward, Send Backwards, Align, and
Ribbon Tab Distribute features). It will be covered in Chapter 5 Section 3 in greater detail.

Page 32
Chapter 3 - Visual Report
This is probably the most important stage of Power BI. It allows you to build multiple small Visual
Reports that reflect information from a data source. Usually, there is also a theme to the various reports
that displays a common message about the resulting objective. Because you will want the people
reviewing the Visual Reports to understand the data stored in the data source, you can display progress,
growth, or the current state of the information.
Chapter Table of Contents
Section 1 - Operations And Manipulation
Section 2 - Report Types The following are standard Visual Reports available.

Stacked Bar Chart Line and Clustered Column Chart Card


Stacked Column Chart Waterfall Chart Multi-Row Card
Clustered Bar Chart Scatter Chart KPI
Clustered Column Chart Pie Chart Slicer
100% Stacked Bar Chart Donut Chart Table
100% Stacked Column Chart Treemap Matrix
Line Chart Map R Script Visual
Area Chart Filled Map ArcGIS Maps PwrBI
Stacked Area Chart Funnel Import Custom
Gauge Visual
Line and Stacked Column Chart
Section 1 - Operations And Manipulation
Concept Explanation / Command String in italic.
Practice Exercise 30 1. Start Power BI Desktop or a new blank report (File Tab New).
Get Data
Excel Worksheet 2. In Power BI Desktop: Get Data dropdown Excel
C:\Data\PowerBI-2\Financial Sample1.xlsxOpen.
3. Choose the Financial Sheet.

4. Load .
This will skip to the Query Editor (filtering) step and Load the data directly to
Power BI Visual Editor to build Visual Reports.

You can now begin creating Visual Reports by dragging Visual Charts and
pressing the checkboxes in front of the field names.

Page 33
Chapter 3 - Visual Reports

3.1 Visuals, These are terms defining the individual Reports that are generated. This includes
Reports, Tiles Charts, Locations/Maps, Text Tiles, etc. The Visual Reports are used in
combination to create a Dashboard. Visuals are also called Visualizations. The
following are several Visual Reports that define a Dashboard.

3.2 Bucket A Bucket is located in the Visual Report pane and a dashed
line appears around the Bucket if a field can be dropped.
When creating a visual, it is more accurate to drop a field in
the Bucket rather than dropping it in a blank work area.
3.3 Well This is located in the Visual Report pane and contains
several Buckets.
One box is a bucket, but the entire
. area is a well.
3.4 Chart Tiles There are a number of different charts that can
be created. Simply drag the Chart icon to the
work area to create the chart.
3.5 Location/Map There are several Map layouts that can be created. Simply drag
Tiles the Map icon to the work area to create the Map.
3.6 Text Tiles A Text Tile is a text displayed in a small box. As you click on
different charts, the Text Tile will update with new values. Drag
the Text Tile to the work area to see the results.

3.7 Create A There are several ways to create a Visual Report such as 1) drag n drop field to
Report the work area, 2) select a chart type, 3) select the field check box, 4) drag n drop a
field to the bucket, and 5) create a blank Visual Report.
The following Practice Exercise will review these different techniques:
Practice Exercise 31 1. Drag n Drop Field To The Work Area
Ways To Select the desired field on the right and drop it in the blank work area.
Create A Report

2. Select A Chart Type – This will create a dataless report type (such as a chart).
Once created, you can drag the proper field to the dataless report.
2a. Click in the blank work area to make sure nothing is selected.
2b. Click the “Stacked Column Chart.”
2c. Drag the field to the chart placeholder.

Page 34
Chapter 3 - Visual Reports

Tip: The Visual Report will default to a style related to the field Data Type and
Category. To change the defaults, refer to Chapter 6 - Data View for more details.

3. Select Field Check Box - Select the checkbox in front of the field name and it
will use the default chart representing that particular data field.
3a. Click in the blank work area to make sure nothing is selected.
3b. Click on the field located on the right side of the interface.

4. Drag n Drop A Field To The Bucket (Tip: This is the most accurate method).
The Values Bucket is located next to the field list under the charts. Notice the
Values bucket displays a dashed line indicating it is a valid drop bucket.
If there is no dashed line, then you will not be able to drop the field.
4a. Drag the field to the Values bucket.

Tip: You may need to select the Stacked Column Chart icon.
5. Create A Blank Visual Report – This is a button in the Home Ribbon Tab
which will create a new blank dataless Tile.
5a. Click in the blank work area to make sure nothing is selected.
5b. Home Ribbon Tab New Visual.
5c. Drag and Drop the field to the new Visual Report.
3.8 Hide Field If you may have fields that are unusable in a table, you can
Hide them so the list is shorter. If a field is placed in a Visual
Report and Hidden, it will still be displayed in the Report.
Right-Click on any field to Hide it.
Practice Exercise 32 Click the down arrow on the field (right-hand side of the
Hide Field screen)Hide.
Tip: You can also Right-Click on any field.

Page 35
Chapter 3 - Visual Reports

3.9 Unhide Field Restoring a Hidden field requires two steps:


1. View all Hidden fields
2. Unhide the specific desired field.
Practice Exercise 33 There are actually 2 steps to unhide the fields:
Unhide Field 1. Right-Click any fieldView Hidden.
2. Right-Click on the desired hidden field
Turn off the Hide checkbox or choose Unhide All.

3.10 Focus Mode This will maximize the Report Visual for editing purposes.
To minimize the Visual Report, click on button.
3.11 More Options This is located in the upper right corner of the Visual
Report and provides the following options:
1. Sort
More Options
2. Export Data -
This will export the data in the report to a
Comma Delimited File (CSV) file.
3. Show Data -This will view the Visual Report
and the related data.
Choose - This will return the normal
layout.
4. Remove - This Removes the Visual Report.

3.12 Report The Report Handles are located in the corners and middle of the Report
Handles Visual. They can be used to scale the Report Visual larger or smaller.
3.13 ToolTip When you create a chart and you hover the mouse over
the different chart areas, you will see a ToolTip
describing the details of the area selected.
3.14 TextBox This can be used to display a title or label describing the Dashboard layout. When
you select the TextBox, the following toolbar popup will appear.
Home Ribbon Tab Text Box

Tip: The icon will allow you to add a hyperlink to the text.
3.15 Image Images can be added to enhance the Dashboard layout.
Home Ribbon Tab Image

Page 36
Chapter 3 - Visual Reports

3.16 Shapes Shapes can be added to point to or identify specific Visual


Reports. The Rectangle tool can be used to identify or encircle
several related reports. Tip: Format the background to 100%
transparency in order to see the Reports inside the rectangle.

Home Ribbon Tab Shapes.


Tip: You can use the Arrow to point to a specific record.
Practice Exercise 34 Create two Visual ReportsDraw a Rectangle around
Rectangle themSet the transparency to 100%.

3.17 Value When you place a numeric field in the Values Bucket,
Calculation the system will determine a default Calculation Value.
You can change the Calculation Value by choosing the
drop-down arrow of the numeric item located in the
Bucket Area.

3.18 Phone Layout This will display a SmartPhone mobile size screen and will allow you to
rearrange the reports for that device. If you don’t rearrange them on this special
screen, Power BI will arrange them. However, it may not be in the order desired.

In Power BI Desktop: View Ribbon Tab Phone Layout.


3.19 Modeling This will provide the security and determine who will be allowed to preview your
Roles Dashboards. You will create a rule in a DAX expression to filter what each user
will be allowed to see. A static Role will define the filtering rules and a dynamic
Role will require the username to filter. Role membership is usually managed in
the Power BI Service.

Page 37
Chapter 3 - Visual Reports

Section 2 - Report Types

Concept Explanation / Command String in italic.


Practice Exercise 35 1. Start Power BI Desktop or a new blank report (File Tab New).
Get Data
Excel Worksheet 2. In Power BI Desktop: Get Data dropdown Excel
C:\Data\PowerBI-2\Financial Sample1.xlsxOpen.
3. Choose the Financial Sheet.

4. Load .
This will skip to the Query Editor (filtering) step and Load the data directly to
Power BI Visual Editor to build Visual Reports.

You can now begin creating Visual Reports by dragging Visual Charts and
pressing the checkboxes in front of the field names.
3.20 Stacked Bar A Stacked Bar Chart is horizontal and can be used to
Chart see the combined result of multiple fields. You will
need several numeric data fields and a text to create a
simple Stacked Bar Chart.

Page 38
Chapter 3 - Visual Reports

3.21 Stacked A Stacked Column Chart is vertical and can be used


Column Chart to see the combined result of multiple fields. You will
need several numeric data fields and a text category to
create a simple Stacked Column Chart.

Practice Exercise 36 1. Click in the blank area to create a new report.


Stacked 2. Create a new Visual Report by checking the checkbox in front of the
Column Chart following three fields: , , and .
3. Change the chart to a Stacked Column Chart or an Stacked Bar Chart
.
3.22 Clustered Bar This is one of the most commonly used horizontal bar
Chart charts. You will need numeric data and a text category
to create a simple Clustered Bar Chart.
Tip: When you add the to the legend, it
changes the data bar width due to the labels.

3.23 Clustered This is a similar commonly used vertical bar chart.


Column Chart You will need numeric data and a text category to
create a simple Clustered Column Chart.
Tip: When you add the to the legend, it
changes the data bar width due to the labels.
Practice Exercise 37 1. Click in the blank area to create a new report.
Clustered Bar 2. Create a new Visual Report by checking the check
Chart box in front of the following fields:
and .
3. Change the chart to a Clustered Bar Chart or
a Clustered Column Chart.
4. Remove the field and add
field to better understand the data.
3.24 100% Stacked This will display a horizontal 100% Stacked Bar
Bar Chart Chart based on a 100% scale. You can see which stack
used more of a 100% range, and you will need several
numeric data fields and a text category of names to
create a 100% Stacked Bar Chart.

Page 39
Chapter 3 - Visual Reports

3.25 100% Stacked This will display a vertical 100% Stacked Column
Column Chart Chart based on a 100% scale. You can see which stack
used more of a 100% range, and you will need several
numeric data fields and a text category of names to
create a 100% Stacked Column Chart.

Practice Exercise 38 1. Click in the blank area to create a new report.


100% Stacked 2. Create a new Visual Report by checking the check
Column Chart box in front of the following fields:
, , and .
3. Change the chart to a Select the 100% Stacked
Bar Chart or the 100% Stacked Column Chart.
3.26 Line Chart This is used to compare two records side-by-
side, and you will be able to see where they
intersect. Line Charts require one numeric
and one text field in order to be created.
Tip: Several numeric fields will produce
multiple lines.
Practice Exercise 39 1. Click in the blank area to create a new report.
Line Chart 2. Select the Line Chart.
3. Add a and to the Values Bucket.
4. Add the field To the Axis bucket.
5. Test it:
Add the field To the Axis bucket.
Add the field To the Legend bucket.
Add the field To the Values bucket.
3.27 Area Chart This is similar to the Line Chart but fills in
the areas with colors.

Tip: You can convert a Line Chart to an


Area Chart by clicking the Area Chart icon.

3.28 Stacked Area This produces a


Chart similar result to
an Area Chart.

Practice Exercise 40 1. Click in the blank area to create a new report.


Area Chart 2. Select the Area chart icon.
3. Add the and
to the Values Bucket.
4. Add the Field To the Axis bucket.

Page 40
Chapter 3 - Visual Reports

Test it: Add the Field To the Axis bucket.


Add the Field To the Legend bucket.
Add the Field To the Values bucket.
3.29 Line And This is a vertical combo chart that combines both a
Stacked Stacked Bar and a Line Chart. It displays two charts,
Column Chart a Line and Stacked Chart on a different axis.

Tip: You will need a text field and two numeric fields.

3.30 Line And This is a vertical combo chart that


Clustered combines both a Bar and a Line
Column Chart Chart. This Chart displays 2
charts next to each other.

Tip: You will need a text field


and two numeric fields.

Practice Exercise 41 1. Click in the blank area to create a new report.


2. Select the Line and Stacked Column Chart icon.
3. Add a field to the Shared axis bucket.
4. Add the field to the Column values bucket.
5. Add the field to the Line values bucket.
3.31 Waterfall A Waterfall chart shows a
Chart running total of values that are
added or subtracted. It is
useful for understanding how
an initial value (for example,
net income) is affected by a
series of positive and negative
values. The columns are color
coded so you can quickly tell
positive from negative numbers.
Practice Exercise 42 1. Click in the blank area to create a new report.
Waterfall
2. Select the Waterfall Chart icon.
3. Add the field to the Category bucket.
4. Add the field to the Breakdown bucket.
5. Add the field to the Y-Axis bucket.

Page 41
Chapter 3 - Visual Reports

3.32 Scatter Chart This compares two sets of


numeric data based on a text
field. In this example, we will
compare the amount of profit
generated based on the discounts
applied. It appears that Canada
received a high number of
discounts and generated a high-
profit margin. Germany received
the lowest discounts, yet it Canada
generated high profits. Germany
Practice Exercise 43 1. Click in the blank area to create a new report.
Scatter Chart
2. Select the Scatter Chart icon.
3. Add a field to the Details bucket.
4. Add a field to the Legend bucket.
5. Add a field to the X-Axis bucket.
6. Add a field to the Y-Axis bucket.
7. Add the field to the Size bucket.
3.33 Pie Chart This shows the relationship of parts to
the total values. The Pie Chart and
Treemap show similar results.

Tip: You will need a text field and one


numeric field.

Practice Exercise 44 1. Click in the blank area to create a new report.


Pie Chart 2. Create a new Visual Report by checking the checkbox in front of the
following fields: and .
3. Change the chart to a Pie Chart .
3.34 Donut Chart This is similar to Pie Charts. Donut
Charts show the relationship of parts
to total values.

Tip: You will need a text field and one


numeric field.

Page 42
Chapter 3 - Visual Reports

3.35 Treemap This provides a hierarchical view of


your data and makes it easy to see
consistent patterns. The size of the
rectangles depends on the size of the
data compared to the total values.
Therefore, the larger the box, the
larger the value.
Practice Exercise 45 1. Click in the blank area to create a new report.
Treemap
2. Select the Pie Chart icon.
3. Add a field to the Legend bucket.
4. Add the field to the Details bucket.
5. Add the field to the Values bucket.
6. Select the Donut Chart, then select the Treemap.
3.36 Map This a Map of the world plotting
the location record or a numeric
value in that location. You must be
connected to the internet in order
to extract the Map locations from
Bing maps. Not all countries are
available, only the most common
ones.
Location Field -
You could add
City, Region, Size - Adding a Numeric Value will increase
and Country to plot dots.
increase accuracy. Zoom in - If you have a roller on your
Legend - Color Codes locations. mouse, it can be used to zoom in/out.
Latitude/Longitude - If these Scroll Legend - If the legend doesn’t fit in
parameters are available in your the area provided, you can scroll using the
database, they will provide a arrow on the right and left sides:
more accurate location.
3.37 Filled Map This will fill in the country or region rather than put a dot in the
location.
Practice Exercise 46 1. Click in the blank area to create a new report.
Filled Map 2. Select the Map icon.
3. Add a field to the Location bucket.
4. Add the field to the Legend bucket.
5. Add the field to the Size bucket.
6. Select the Filled Map and add the field to
the Legend.

Page 43
Chapter 3 - Visual Reports

3.38 Funnel These show values across multiple stages in a


process. Typically, the values decrease
gradually allowing the bars to resemble a
funnel.

Tip: You will need a text field and one


numeric field.

Practice Exercise 47 1. Click in the blank area to create a new report.


Funnel 2. Select the Funnel icon.
3. Add a field to the Group bucket.
4. Add the field to the Values bucket.

Test it:
Add the field to the Color Saturation bucket.
3.39 Gauge This is useful when you want to show progress
towards a particular goal. It can show a single
metric or revenue over time.
Practice Exercise 48 This will display the range of Sale Prices and
Gauge determine the average Price range.
1. Click in the blank area to create a new report.
2. Select the Gauge Chart.
3. Add field to the Values bucket and
change the dropdown to Count of Product.
4. Add field to the Minimum Value
bucket and change the drop-down to Min of Sal
Price.
5. Add field to the Maximum Value
bucket and change the drop-down to Max of
Sale Price.
6. Add field to the Target Value
bucket and change the drop-down to Average
of Sale Price.
3.40 Card This shows a numeric representation in a text box.
The units displayed can be changed and the Card
type can be Sum, Count, etc.
Format buttonDisplayDisplay Units: Millions
3.41 Card The default summarization of numeric fields is
Summaries usually Sum and text fields are usually Count. If
you need to change this, choose the drop-down
arrow in the Fields bucket.
Tip: Each field has a defined default
summarization. This can be adjusted by
referring to: Chapter 6 - Data View, Default
Summarization.

Page 44
Chapter 3 - Visual Reports

Practice Exercise 49 1. Click in the blank area to create a new report.


Card 2. Drag the field to the work area from
the Field List.
3. Select the Card icon.
4. Make sure the values are using the Sum Function:
Press the drop-down arrow next to the
in the Fields bucketSum.

5. Format the card to Currency,


(no decimal points), and increase the size
of the text.

Practice Exercise 50 1. Click in the blank area to create a new


Card report.
Summarization 2. Select the Card icon.
3. Drag the field to the New Card
from the Field List.
4. Change the field summarization to
Count (Distinct)
3.42 Card This can be used to display the results of a Measure. A text string can be
Measures combined with a numeric number to be displayed on the Card. The Measure field
can be placed on the Card. Here are some examples of Measures using DAX
Formulas: Tip: DAX Formulas will be discussed in Chapter 6 Section 1.

3.43 Multi-Row This will display 2 or more sets of data in a


single Card. It can be any combination of data
Card types.
Practice Exercise 51 1. Click in the blank area to
create a new report.
2. Choose the Multi-Row
CardPlace the
and fields in the
Fields bucket.

Page 45
Chapter 3 - Visual Reports

3.44 KPI This is a summarized single number


placed in a Card style tile. It also
displays a chart of progress towards the
measured goal.

Practice Exercise 52 1. Click in the blank area to create a new report.


KPI 2. Select the KPI icon.
3. Add a field to the Indicator bucket.
4. Add the field to the Trend Axis
bucket.
Tip: To see if the months are in the
proper order (Jan through Dec),
Select the more options button 
Show Data.
3.45 Date Slicer A Date Slicer will allow you to adjust the date to see results in other reports such
as a Card or Visual Report. You also need to identify how the data is read either
Between, Before, After, List, Dropdown, or Relative. This dropdown will
change depending on the data type used.
Dropdown

Between - This displays all data Between the first


Date indicated and the Date indicated on the Slider.

Before - This displays all data Before the date indicated on the Slider.
After - This displays all data after the Date indicated on the Slider.
List - This will insert a checkbox in front of a List of
labels to allow you to filter the List on the Report
Visual. Once you check one of the checkboxes, you
can Clear the Filter by pressing the Icon.
Dropdown - This will list the data checked in the
Dropdown list.

Page 46
Chapter 3 - Visual Reports

Relative - This lists the data indicated in the


Relative option dropdown list.

Less Than or Equal To - This will extract the


data that is Less Than or Equal To the Slider
result.

Greater Than or Equal To - This will extract


the data that is Greater Than or Equal To the
Slider result.

Practice Exercise 53 1. Click in the blank area to create a new report.


Date Slicer
2. Select the Slicer icon.
3. Add a field to the Field bucket.
4. Choose the drop-down arrow in the upper right corner
under the … and test the different options.

3.46 Slicer Defaults In order to get the Slider features to work in Power BI, you must change the
default setting to allow the Slider to operate:
1. File TabOptions and settingsOptionsPreview Features

2. You will be asked to restart Power BI and will receive the following
message:

3. After the restart, the options will expand to 5 possibilities:

Tip: In future versions, you will be able to Select all values and then turn off
specific values that you don’t need.
Practice Exercise 54 1. Click in the blank area to create a new report.
Number 2. Select the Slicer icon.
Slicer
3. Add a field to the Field bucket.
4. Choose the drop-down arrow in the upper right corner under the …
5. Test out all the options Between, Less than or equal to, Greater than
or equal to, List, and Dropdown.
Tip: Don’t forget to change the settings: File TabOptions and
settingsOptionsPreview Features

Page 47
Chapter 3 - Visual Reports

3.47 Table This will display a list of data in a Table layout.


Arrow - This is located under the field label and
will sort the Table.
Focus Mode - This will maximize the Report
Visual. More Options button (below)
This Exports to a Comma Delimited File.
This displays the data in a text Table.
This Removes the Visual Report.
3.48 Table Sometimes the numeric value is not summarized,
Summaries because it defaulted to Don’t Summarize. To
summarize the values and group by name, choose the
drop-down arrow in the Fields bucket and choose Sum.
Tip: Each field has a defined default summarization.
This can be adjusted by referring to:
Chapter 6 - Data View, Default Summarization.
Practice Exercise 55 1. Click in the blank area to create a new report.
Table 2. Select the Table icon.
3. Add the field to the Values bucket.
4. Add the field to the Values bucket.
5. Collapse the size of the Visual Report and
continue to display the Totals row:

Click and drag the handle and move it up.

3.49 Matrix This is similar to a PivotTable layout containing a row field,


column field, and a cross-section which is a sum numeric value.
When you add several fields to the row bucket, it will indent.
When you click any value in the Matrix, it operates similarly to a
drill down. All other Reports will reflect the selected item.

Practice Exercise 56 1. Click in the blank area to create a new report.


Matrix 2. Select the following fields from the Field List:
, , and .
3. Arrange the fields in the proper bucket located on the right side of the screen.
4. Change the Report Visual type to Matrix if necessary:
Design Ribbon TabTable drop-downMatrix.

Page 48
Chapter 3 - Visual Reports

3.50 R Script R is a programming Visual Report tool


Visual used by scientists to do an analysis of data.
The R Script icon integrates some of the
Visual Report in R with Power BI. You
must have the R Compiler installed on your
computer.
1. First, enter the program script in the
Power BI R Script Editor.
2. When you run it, Power BI will send the
code to the R Compiler, then it will
display the Visual Report in a Power BI.
3. The following is an example of some of
the results of the program:
3.51 ArcGIS Maps This is used to define heat Maps which colors areas of the Map red with higher
For Power BI importance.

3.52 Import A This feature provides additional Visual Reports created by people in the industry.
Custom Visual Click on the 3 dots  Import from store(Add the desired visual)

You must reimport to each file (it does not become a system stored image)
Practice Exercise 57 1. Click on the 3 dots  Import from store
Custom Visual (add the Word Cloud visual):

2. Click on the Word Cloud visual.


3. Add the field in the
Category bucket.

Page 49
Chapter 4 - Filter Report
All visuals can be Filtered to reduce the information displayed in a Visual
Report. The Filter is located under the Visual Report parameters in the Visual
Report well. This Filtering will not eliminate the data from the Data Table,
but will change the number of fields displayed in a Visual Report. As can be
seen on the right, Filtering can be applied to the Visual level (individual
report), Page level, or Report level (all pages). Tip: Filtering can be done at
the Query level, but the information will not be available for reporting.
Chapter Contents
Section 1 - Chart Filters
Section 2 - Format Contextual Ribbon Tab
Section 3 - Data / Drill Contextual Ribbon Tab

Section 1 - Chart Filters


Concept Explanation / Command String in italic.
4.1 Filter All of the information in this chapter refers to modifying
Edit View Filters in the Edit View or using the Power BI Desktop
product. Once the Filter is applied in the Edit View, it
will remain with the report and can’t be changed when
reading or previewing the dashboard in the Web Browser.
There are three Filtering options:
1. Visual Level Filters - This applies to a single visual or
the chart on the page.
2. Page Level Filters - This applies to all the visuals on
the single viewable page.
3. Report Level Filters - This applies to all pages in the report (refer to the bottom
tab on the bottom of the screen to add additional pages).
Tip: Another way to change Filters is in the Reading View which is used by the
end user to preview a finished report in a web browser. The Reading View
will allow the reviewer to interact and apply additional Filters, but the changes
made in the Reading View will not be saved with the report.

Page 51
Chapter 4 - Filter Report

Practice Exercise 58 1. Start Power BI Desktop or a new blank report (File Tab New).
Open The
Datasource 2. In Power BI Desktop: Get Data Excel
BikeDB1.xlsxChoose all 4 TablesLoad.

3. Verify Relationships: Select the Relationships Button


(located on the left side of the screen).

4. Select the Reports icon (located on the


left side of the interface)Select the
Stacked Column Chart Add fields:
Axis: Customers/ Field
Legend: Customers/ Field
Value: Customers/
Field
4. Filtering: Choose the drop-down arrow in the Country

Choose Basic Filtering dropdown Choose the first 5 of the


Countries checkbox: Argentina, Aruba,
Australia, Austria, and the Bahamas.
4.2 Basic The Basic Filter can remove specific records by checking
Filtering a checkbox. Most Visual Reports provide Basic Filtering
and the following are a few options available:
Select All - This is a toggle to select all or
unselect all. You could use it as a negative selection by
selecting all and then turn off all undesired records.
Records - Click the on the items you want to include in
the report.

Page 52
Chapter 4 - Filter Report

Practice Exercise 59 Continue from the previous practice exercise


Basic 1. Select the Country drop-down in the filtering bucket
Filtering to see the Basic Filtering options.

2. Click to turn on/off the selection


of all records.
3. Click to Verify if there are any blank
records in the field.
4. Select Argentina, Aruba,
Australia, Austria, and Bahamas.
The final chart will look similar to the following:

4.3 Advanced The Advanced Filtering capability will allow you to place
Filtering criteria in the Filter bucket to display information on a
conditional basis. The following criteria are available:
Contains -The text you are searching is located anywhere
in the record.
Does Not Contain - This is a reverse result of Contains.
Starts With - The text must start at the beginning of the
string.
Does Not Start With - This is a reverse result of Starts With.
Is - The entire text string must be found in the field.
Is Not - This is a reverse result from Is.
Is Blank - This looks for Blank records.
Is Not Blank - This is a reverse result from Is Blank.

Page 53
Chapter 4 - Filter Report

Practice Exercise 60 Continue from the previous practice exercise.


Advanced 1. Visual Filters Well: Add the Field
Filtering to the Visual Level Filters bucket.
2. Choose the Advanced Criteria.
3. Choose the criteria Contains.
4. Enter the words land.
5. Apply Filter.
6. The end result:

4.4 TopN Filter This will list the summary records within a group. It is sometimes used to display
the Top, or the Top 5 values.

Practice Exercise 61 Continue from the previous practice exercise.


Top N 1. Choose the criteria TopN.
2. Show items: TopEnter 5.
3. By value: Apply Filter.
4. The end result:

4.5 Visual Level This applies to a single Visual Report or chart on a


Filters report page. It will allow Basic Filtering, Advanced
Filtering, and TopN Filtering.

Page 54
Chapter 4 - Filter Report

4.6 Page Level This applies to all Visual Reports and charts on the
Filters physical page. It Filters every Visual Report when you
apply a Page Level Filter. It supports Basic and
Advanced Filtering techniques.
The result will affect the visuals on one page only:

Practice Exercise 62 Continue from previous Practice Exercise.


Page Level 1. Create Contact visuals: Drag the
Filters to a blank location in the work area.
2. Filters Well: Add the Field to the
Page level Filters bucket in either report.
Tip: Notice that the Field affects
both reports.
3. Click the option and
reselect the options above.
The result:

4.7 Report Level This applies to all pages of the report. If you refer to the
Filters lower portion of the interface, it will allow you to add
additional pages. This will affect all pages. It supports
Basic and Advanced Filtering techniques.
The result will affect all visuals on all pages:

Practice Exercise 63 Continue from the previous practice exercise.


Basic Filtering 1. Create an additional Visual on Page 2:
2. Report Level Filters: Select the
dropdown.
3. Check the checkbox.

Page 55
Chapter 4 - Filter Report

Practice Exercise 64 Continue from the previous


Map practice exercise.
1. Go to Page 2.
2. Select the Map iconAdd
the fields:
Location:
Legend:
Size:
Sum of Last Year’s Sales
3. Review the map to the right
that shows the entire map is
populated.

4. Add the to the Report Level


Filters Basic FilteringCheck .
5. The end result will affect all pages
Page 2 Result:

Page 1 Result:

Test it: Test the following Filters: Make several changes to the Visual, Page, and
Report Level Filters. As a review: Visual Level Filters affect the Visual Report
only, Page Level Filters affect all Visual Reports on a single page and Report
Level Filters will affect Visual Reports on all pages.

Page 56
Chapter 4 - Filter Report

4.8 Data When you create a Map based on a city, there could be a conflict. For instance, the
Categories Map doesn’t know which country the city of San Jose is tied to: Costa Rica or the
USA. The actual record in the database shows the following:

The record plots in San Jose, CA. however, it should be plotted in San Jose, Costa
Rica.
The records show up in
San Jose, Ca USA.
The record should be in
San Jose, Costa Rica.

Using the Data Categories Filter, you can tie to a country without adding the
Field to the Location well. To differentiate between two locations:
Select the on the right side in the field list
(This is an extremely important step)Modeling Ribbon TabData Category

Page 57
Chapter 4 - Filter Report

Section 2 - Format Contextual Ribbon Tab


The primary purpose of the Format Contextual Ribbon Tab is to reposition all Visual Reports.
In order for this ribbon to appear, you must select a Visual Report.

Concept Explanation / Command String in italic.


Practice Exercise 65 1. In Power BI Desktop: File TabOpen
Open C:\Data\PowerBI-2\Visual Reports3.pbixOpen button.
This will open a Power BI file containing the following Visual Reports:

4.9 Edit
Interactions In order to see the Interaction icons , you must press the Edit
Interactions button in the Format Ribbon Tab. Then, select a Visual Report and
the following symbols will appear on the top of the other reports on
the page. In order to test the features below, select the tall bar in the bar chart on
the left and change by selecting the Filter or Highlight chart on the right.
Tip: This is sometimes called Visual Hierarchy.
Practice Exercise 66 Continue from the previous practice
Edit exercise.
Interactions Test the interactions between charts:
1. Select the Edit Interactions Button:
Format Ribbon TabEdit Interactions.
2. Display the two charts side by side.
3. Select the tall bar on the first chart.
4. Select one of the 3 icons on the second chart.

Page 58
Chapter 4 - Filter Report

4.10 Edit Selected Filter


Interactions
Filter
When the Filter icon is selected , it will
adjust the chart or Filter the Visual
Report to display all of the selected bars.

Unselected Filter
When the Filter icon is unselected , it
will not be affected by changes. To
unselect, click either Highlight or
None.
4.11 Edit Selected Highlight - When the
Interactions
Highlight Filter icon is selected , it means the
selected Visual Report will Highlight
the related record and all other records
will be dimmed out.

Unselected Highlight - This means


the other Visual Reports will not be
Highlighted. To unselect, click either
Filter or None.

4.12 Edit
Clear - This will remove all Filters
Interactions
and Highlights from the Visual Reports.
None

4.13 Bring This command will pull the image on the bottom Forward.
Forward Refer to Chapter 5 Section 3 for details.
4.14 Send This command will push the image on top under another image.
Backwards Refer to Chapter 5 Section 3 for details.
4.15 Align This will line up the Visual Reports to be Aligned evenly.
Refer to Chapter 5 Section 3 for details.
4.16 Distribute This will Distribute the spacing evenly between Visual Reports.
Refer to Chapter 5 Section 3 for details.

Page 59
Chapter 4 - Filter Report

Section 3 - Data / Drill Contextual Ribbon Tab


The purpose of this ribbon is to handle hierarchal Visual Reports. These can be created by placing
several fields in one bucket. In order for this ribbon to appear, you must select a Visual Report.

Concept Explanation / Command String in italic.


Practice Exercise 67 1. In Power BI Desktop: File TabOpen
Open C:\Data\PowerBI-2\Visual Reports3.pbixOpen button.
This will open a Power BI file containing the following Visual Reports:

4.17 See Data When you select a Visual Report, the See Data button will be activated. It will
display the data under the chart layout. The following is an example:

The data is listed here.

Tip: The See Data command and Right-Click Show Data have the same
capability. The See Data terminology was also used in Excel PowerView.
Practice Exercise 68 Select the Line and Clustered Column Chart (above)Format Ribbon Tab
See Data(View the Chart and the datasheet)Click .
4.18 Show Next This expands or Shows the Next Level down in a hierarchal Matrix Report.
Level Tip: This icon is also located on the top edge of the Report.

4.19 Expand Next This Expands the Next Level to show more detail of a hierarchal Matrix
Level Report. Tip: This icon is also located on the top edge of the Report.

Page 60
Chapter 4 - Filter Report

4.20 Drill Up This Drills Up to the next level of a hierarchal Matrix Report.
Tip: This icon is also located on the top edge of the Report.

4.21 Drill Down This Drills Down to the next level of a hierarchal Matrix Report.
Tip: This icon is also located on the top edge of the Report.

Practice Exercise 69 Create a hierarchal Matrix Report.


Drill Down 1. Click on a blank area of the work area to unselect all Visual Reports.
2. Click on the Matrix Icon to add the template.
3. Drag the following fields to the Row bucket:

4. Select a in the report.

5. Click the drill-down method:


Show Next Level
Expand Next Level
Drill Up
Drill Down options.

Click Drill-down Click Drill-down


Test it: Test all the drill-down techniques using the Matrix example.
4.22 Drill Through This allows the main chart (Page1) to connect to detailed information located on a
different page. The Drill Through action will be activated as soon as the Drill
Through properties is set on a secondary page.
Tip: The Drill Through button in the Data/Drill Ribbon Tab does not need to be
checked in order for this functionality to work.
Practice Exercise 70 1. Create a Pie Chart on Page1 using
Drill Through and fields.

2. Create a second page called Details: Click on the


 Right-Click Rename PageDetails.
3. Create a Matrix Report on the Details page using
and fields.

Page 61
Chapter 4 - Filter Report

4. On the Details page, add the and


fields to the Page Level Drill
Through.

5. Go back to Page1
and Right-Click on Right-Click
any data pie in the
Pie Chart Details Page
Drillthrough
Details.

4.23 Customize
The back button that Power BI creates is not very bright.
Buttons
Therefore, you can create a new button if you choose.
Practice Exercise 71 Insert a new back button image. Continue from the previous example.
Custom 1. Go to the Details Page.
Button 2. Remove the old button: Use the Left Mouse button on
the More Options . . . . Remove.
3. Insert the new button: Home Ribbon TabImage
Black Back button.gifOpen.
4. Select Image and display the format the link properties to back.
Format Properties: LinkPage1.
Tip: This feature may not be available.

Page 62
Chapter 4 - Filter Report

4.24 See Records This will allow you to See the data Records of a
specific item.
Method 1 - Right-Click on any a record in the Right-Click
chartChoose the See Records.
Method 2 - Select the desired chartTurn on
the See Records Icon in the Data/Drill
Ribbon TabDouble click on any item to see
a detailed data list (see below).
Practice Exercise 72 1. Right-Click on any record in a chart.
See Records 2. Choose See Records.
3. The following information will be displayed:

4.25 Group This will group several records together.


Practice Exercise 73 1. Create a Bar Chart or use an existing Bar Chart.
Group

2. Hold the Ctrl Key down and select several bars.

Click the Group button: Data/Drill Ribbon


Group Group button.

The chart will then, be divided into 2 groups.

Page 63
Chapter 4 - Filter Report

Page 64
Chapter 5 - Format Report
In this chapter, you will learn to format Visual Reports and other report elements. Keep in mind that
different report types may provide different formatting options. After you add a report, look for the
Format tool to review the options available. We will look at the most common ways to Format a
Visual Report and review other formatting options available. Also, not all Visual Reports contain the
same Formatting options.
Chapter Contents
Section 1 - Chart Formatting
Section 2 - Page Formatting
Section 3 - Format Contextual Ribbon Tab
Section 4 - View Ribbon Tab
Section 5 - Special Formatting Topics
Section 1 - Chart Formatting
Chart Formatting is probably the most commonly used Formatting feature. We will start by creating a
basic chart and that demonstrate all of the Formatting capabilities.
Concept Explanation / Command String in italic.
Practice Exercise 74 1. Start Power BI Desktop or a new blank report (File Tab New).
BikeDB1 2. In Power BI Desktop: Home Ribbon Tab
Get Data dropdown Excel
C:\Data\PowerBI-2\BikeDB1.xlsxOpen.
3. Choose all Tables.
4. Load .
This will skip to the Query Editor (filtering) step and
Load the data directly to the Power BI Visual Editor
in order to build Visual Reports.

Page 65
Chapter 5 - Format Report

Practice Exercise 75 1. Select the Stacked Column Chart


Filtering Add Fields: Axis: Region, Legend:
Region, Value: Last Year’s Sales.
2. Basic Filtering:
Choose the first 5 of the Region
Fields:
Abu Dhabi
AL
Alsace
Ankara
Aquitaine.
This is the Icon used to format the Visual Reports. It is located in the Well /
5.1 Format Properties of the Visual Report.
5.2 Revert To This is located at the bottom of each format option. When it is
Default colored light orange, clicking on it will Revert To the Default
setting. When it is white, no options have been selected.

Revert To Default
5.3 Error Message When you see this message, it means that one of the values in the bucket is in
violation and will revert to the default value.
5.4 General (Preview) Responsive - This feature will allow your Visual Reports to be
responsive for mobile devices, which means that reports will adjust as necessary to
fit a smaller handheld screen. However, only turn this feature on if you know for a
surety that readers will be using their mobile device to review your Visual Report
Tip: Be sure to test this feature with
several reports using different devices.
The following options are available:
X Position -This is the pixel location of
the title.
Y Position - This is the pixel location of
the title.
Width - This is measured in pixels.
Height - This is measured in pixels.
Alt Text - This will display a message
when displayed in a web browser

5.5 Legend The Legend is usually located on the top of the


report.
Position - This positions the legend on the
Top, Bottom, Right, Top Center, Bottom
Center, Left Center, or Right Center.
Title - This turns on/off the Title for the
legend.
Legend Name - Here, enter a new name.
Color - This is the color of the text in legend.
Font Family - Font Type
Text Size - Size of the font.

Page 66
Chapter 5 - Format Report

5.6 X-Axis The X-Axis bucket is located on the bottom


labels of the report. You can make the following
adjustments:
Color - Use the Color Drop-down arrow.
Text Size - Type in or use the slider.
Font Family - Use the drop-down arrow.
Minimum Category Width-
Minimum Width for each bar displayed.
Maximum Size - This is the % of the chart
allowed to be displayed on the X-Axis.
Inter Padding - The percentage of the width
between charts.
Concatenate Labels - If you have hierarchies it
will consolidate then for display purposes.
Title - Turns on/off the X-Axis title box.
5.7 Y-Axis The Y-Axis is located on the left side of the
report. You can make the following
adjustments:

Position - Positions Reports Left or Right.


Scale Type - Only Linear option is available.
Start - This sets the Starting range of the
Y-Axis location and defaults to Auto or 0.
End - This sets the Ending range in the
Y-Axis and defaults to the maximum value.
Color - The Color Drop-down arrow.
Text Size - Type in or use the slider.
Font Family - Use the drop-down arrow.
Display Units - This will limit the max value.
Value Decimal Places - This sets the
number of Decimal Places for the Values.
Title - Title for Y-Axis
Gridlines - This adds Gridlines to the Y-Axis.
Color - This changes the Color of the gridlines.
Stroke Width - Border Width
Line Style - This changes the Style of the
gridlines to dashed, dotted, or solid.

5.8 Data Colors One of the most common things to


change on a Visual Report is the
color. This will allow you to change
the Bar Chart colors of each
country individually. Change each
country by selecting the drop-down
arrow.

Custom Colors - Change the color


to the hexadecimal number. Choose a Custom color:

Page 67
Chapter 5 - Format Report

5.9 Data Labels These are the labels located in the Chart Bar
showing the value of the bar. You can make the
following adjustments:
Color - This changes the Color of the data
labels.
Display Units - This changes the Units to None,
Thousands, Millions, Billions, or Trillions,
Value Decimal Places - This sets the number of
Decimal places for the values.
Orientation - This sets the Orientation
to Horizontal or Vertical.
Position - This sets the Position to
Inside End, Center, or Base.
Text Size - Size of the Text
Font Family - Font type
5.10 Plot Area This is the area behind the bar charts. You can make
the following adjustments:
Transparency - Measured in percentage %.
Add Image - Add Image from a file.

5.11 Title This is usually located on the top portion of the chart.

Title Text - This changes the Title Text.


Font Color - This changes the text Color.
Background Color - This chooses the drop-down
arrow.
Alignment - This changes to Left, Center or Right
Alignment.
Text Size - This changes the Size of the Text.
Font Family - This changes the Font type.

5.12 Background This is the Background of the Visual Report.


Color - Background Color.
Transparency - This changes the background color.

5.13 Lock Aspect This will force the report to be symmetrical. When you
move the X-Axis, the Y-Axis will move evenly.

5.14 Border This is the outside portion of the report.


Color - Border Color.

Practice Exercise 76 Test the formatting features above on the chart created from the previous practice
exercise.

Page 68
Chapter 5 - Format Report

Section 2 - Page Formatting


Practice Exercise 77 Continue from the previous practice exercise.
Select the white workspace to make sure nothing is selected Format
Page Information
5.15 Page Name - The displayed name.
Information Q&A - This will make it easier for the reviewers to
ask questions usually at the Power BI Service level
Common answers will be provided such as total,
sum, amount, number, quantity, count, average,
most, least, fewest, largest, smallest, highest,
biggest, maximum, max, greatest, lowest, littlest, minimum, or min.
5.16 Page Size This will change to the physical site work area to
display Visual Reports. The default layout is 16:9.
Type - The possible sizes are 16:9, 4:3, Cortana,
Letter, Tooltip, and Custom.

Select the white workspace to make sure nothing is


selected Format Page size.

5.17 Page This is the background of the white area


Background behind the reports.
Transparency - Measured in percentage
Image - Adds an image
Select the white workspace to make sure
nothing is selected Format Page
Background.

Practice Exercise 78 Test the Page Formatting feature using the previous practice exercise.

Page 69
Chapter 5 - Format Report

Section 3 - Format Contextual Ribbon Tab


The primary purpose of the Format Contextual Ribbon Tab is to reposition all the Visual Reports.
In order for this ribbon to appear, you must select a Visual Report.

Concept Explanation / Command String in italic.


Practice Exercise 79 1. In Power BI Desktop: File TabOpen
Open C:\Data\PowerBI-2\Visual Reports3.pbixOpen button.
This will open a Power BI file containing the following Visual Reports:

5.18 Edit When you select a Visual Report, the Refer to Chapter 4 Section 2 for
Interactions following symbols will appear on the top details.
of other reports on the page:
5.19 Bring When you overlay charts, shapes, or
Forward graphic pictures on top of each other,
this command will pull the image on the

bottom Forward.
5.20 Send This command will push the image on
Backwards

top to the bottom.


Practice Exercise 80 Move to overlay several reportsFormat Ribbon TabSend Backwards or
Arrange Bring Forward.

Page 70
Chapter 5 - Format Report

5.21 Align This will line up the Visual Reports to


be Aligned straight.
Before

After

Practice Exercise 81 Move several reports so they are misalignedSelect multiple reports by using
Alignment the Ctrl KeyFormat Ribbon TabAlignAlign to Top.
5.22 Distribute This will Distribute the spacing
between Visual Reports evenly.
Before

After

Practice Exercise 82 Spread out the reports so they have a different distance between themSelect
Distribute multiple reports by using the Ctrl KeyFormat Ribbon Tab
DistributeDistribute horizontally.

Page 71
Chapter 5 - Format Report

Section 4 - View Ribbon Tab


The primary function of the View Ribbon Tab is to change the View Layout, Show Gridlines, and
Snap Objects to Grid.

Concept Explanation / Command String in italic.


Practice Exercise 83 1. In Power BI Desktop: File TabOpen
Open C:\Data\PowerBI-2\Visual Reports3.pbixOpen button.
This will open a Power BI file containing the following Visual Reports:

5.23 Phone Layout This will display the Report Visuals on an iPhone size screen.
You will need to drag and drop the Visual Reports to the Phone
Layout in the order desired. The end result looks similar to the
layout to the right.
Drag n Drop the Report Visuals to the left screen.

Drag n Drop
Practice Exercise 84 View Ribbon TabPhone LayoutDrag n Drop the Visual
Reports as desired.
5.24 Page View This will display the Report Visuals on a computer screen Page
Layout. There are three options: Fit To Page, Fit To Width, or
Actual Size.

Practice Exercise 85 View Ribbon TabPage Size


(Change the size to Fit to Page, Fit to Window, and Actual Size).
5.25 Show This will add dots or Grid points in order to align objects.
Gridlines

Page 72
Chapter 5 - Format Report

5.26 Snap Objects This will keep the Visual Reports snapping the Gridline points.
To Grid
Practice Exercise 86 View Ribbon Tab Show Gridlines.
View Ribbon Tab Snap Objects To Grid.
Notice how the objects line up better with Snap Objects To Grid.
Section 5 - Special Formatting Topics
Concept Explanation / Command String in italic.
Practice Exercise 87 1. In Power BI Desktop: File TabOpen
Open C:\Data\PowerBI-2\Visual Reports3.pbixOpen button.
This will open a Power BI file containing the following Visual Reports:

5.27 Date Type This will allow you to change the Data Type that
supports Date/Time, Date only and Time only.
Select Date Field  Modeling
Ribbon TabFormat Date Dropdown (Choose a
different date type).

5.28 Date Style This will change the Date Style to the different
formats available.
Select the Date Field 
Modeling Ribbon TabFormatting dropdown

Practice Exercise 88 1. Select Date Field in the Field List .


2. Modeling Ribbon Tab Drop-down
Date .
3. Modeling Ribbon TabFormatting dropdown
Date Time Choose Date Style .

Page 73
Chapter 5 - Format Report

5.29 Duplicate If you want to format a report but you do not know how it will look, you can
Report simply Copy and Paste, then make the changes. If you change a format option in
the copied version, you will be able to refer to the original for reference.
Select reportHome Ribbon TabCopyPaste.
Or Use the Ctrl C and Ctrl V keyboard combinations.
5.30 Format This is a commonly supported tool. Once you make a change to one report, that
Painter change can be copied to all Reports. However, if you are using the Format
Painter of different types of Reports, specific format options may not be available
of the destination Report.
Practice Exercise 89 Continue from the previous practice exercise.
Format Painter 1. Select a chart and format it by adding a Background: Select Chart
Format iconTurn Background On 
Make the following adjustments:

2. Select the Chart with the Background appliedHome Ribbon Tab


Format Painter.
3. Select the Chart with no Background (you can only format once).

Select Format Painter Apply the Format Painter

Test it: Format the title and other elements and apply the formatting to the other
Charts.

Page 74
Chapter 5 - Format Report

5.31 Conditional When is turned off, it will highlight the background based on a
Format scale where one solid color is the lowest, and a different color is the highest. The
Background
checkbox will give you a lowest, center and a highest solid color.
Text
Also, you can format null values to be no color (treat it as a zero value), change it
to a specific color, or don’t format at all. All colors in between will fade up or
down depending on the number value.
No Color, Specific Color, or Don’t Format It.

Also, you can specify a specific value.

This is the color scale from lowest to highest.

Tip: If you want to color code in one direction only, then format one side to white.
Practice Exercise 90 Display Null values.
View Null Values 1. Data View (Located on the left side if interface)
Enter DataClick * to add another field
Enter the following.
2. Press Load when complete:
3. Switch back to the Visual View and create the Visual Report.
Click on a blank area of the work areaAdd a Table Visual
Add columns Column1 and Column2 to the Table visual.
4. In order to see TestNull record, you must switch to Don’t Summarize:
Select the down arrow on Column2 
View the end result. End Result
5. Switch back to Sum in order to apply Conditional
Formatting: Select the down arrow on Column2
 Sum .

Page 75
Chapter 5 - Format Report

Practice Exercise 91 Conditional Format the background of Column2.


1. Data View (Located on the left side if interface)
Enter DataClick * to add another field
Enter the following.
2. Press Load when complete:
3. Switch back to the Visual View and create the
Visual Report: Click on a blank area of the work area
Add a Table Visual Add columns Column1
and Column2 to the Table visual in the Values bucket.
4. Conditional Format: Select the down arrow on Column2 End Result

 
Enter the following below:

Test it: Do the following:


1. Check the Diverging checkbox.
2. Format Blank ValuesSpecific Color, As Zero, Don’t Format.
Tip: In order to see the blank values (TestNull) you must change the
Summarization type to Don’t Summarize:
Select the down arrow on Column2 
View the end result.
5.32 Conditional This will remove the conditional format removing All,
Format Background color scales, Font scales, or Data bars.
Remove
Practice Exercise 92 Continue from the previous practice exercise.
Select the downarrow on Column2

5.33 Conditional The option will allow you to color a range between the minimum
Format and maximum value. If you don’t want a range and want everything greater than a
Logic Condition specific value, then specify a very large number for the top maximum amount.

Page 76
Chapter 5 - Format Report

Practice Exercise 93 Continue from the previous practice exercise.


Conditional 1. Select the down arrow on
Formatting
Column2  .
Logic Condition
2. Conditional Format: Select the down arrow on Column2
End Result
 
Enter the following:

5.34 Conditional The same procedures can be followed in the previous exercises, but use the option
Format Font Color Scales. The end result is displayed using the Color Scale Rules:
Font Color
Scales The numbers are
formatted based on the
Color Scale.

5.35 Conditional Data Bars will be added to the numbers that fall within
Format the specific range. The larger bar will indicate the larger
Data Bars values.

Practice Exercise 94 Continue from the previous practice exercise.


Conditional 1. Select the downarrow on
Formatting
Column2  .
2. Select the down arrow on
Column2  
Enter the following:
End Result

5.36 Conditional To Format Bar Charts, you must use the Color Saturation
Format Bar bucket and then change the format in the Data Colors Format
Charts bucket.

Page 77
Chapter 5 - Format Report

Practice Exercise 95 1. In Power BI Desktop: File TabOpen


Conditional C:\Data\PowerBI-2\Visual Reports3.pbixOpen button.
Format 2. Create a Stacked Column Chart:
Data Bars Click on a blank area of the work area
Add a Stacked Column Chart to the work area.
3. Add the following fields to the Well:

Axis:
Value:
Color Saturation:

4. Click on the Format IconExpand the Data Colors


Turn off DivergingEnter the following values:
5. The end result will look similar to the following:

5.37 Conditional Multiple Rules can be created by choosing the and pressing the
Format
button.
Multiple Rules

Page 78
Chapter 5 - Format Report

Practice Exercise 96
Multiple Rules 1. Data View (Located on the left side if interface)
Enter Data Click * to add another field 
Enter the following.
2. Press Load when complete: .
3. Switch back to the Visual View and create the Visual Report:
Click on a blank area of the work area Add a Table Visual
Add columns Column1 and Column2 to the Table visual in the Values bucket.
4. Conditional Format: Select the down arrow on Column2
  
Click , then enter the following:

The end result will format multiple areas:

Page 79
Chapter 6 - Data View
This tab will allow you to view the data extracted and make changes where needed. You will be able to
create a New Column (new field) using DAX formulas, change the data type, and adjust the layout of the
data source. This Data View will allow you to display the records in a Table layout in order to better
understand the information.
Section 1 - Modeling Ribbon Tab

Concept Explanation / Command String in italic.


Practice Exercise 97 1. In Power BI Desktop: File TabOpen
Open C:\Data\PowerBI-2\Visual Reports3.pbixOpen button.
This will open a Power BI file containing the following Visual Reports.

Each Power BI file will open a new instance or Power BI program into memory.
2. To close the above file, you must exit out of Power BI completely.
File Tab Exit.
6.1 Manage This will open the Relationship View and display the tables to be related. You
Relationships will be able to view Defined, add New, Autodetect, Edit or Delete Relationships.
Modeling Ribbon Tab Manage Relationships.
Tip: This will be discussed in greater detail in Chapter 7 - Relationships.
6.2 New Measure
A New Measure is a calculated summarization of a field located in the Field
List (on the right side of the interface). This field does not get added to the
Data View as a New Column, but it can be used to create a Visual Report or used
in another Measure.
Tip: DAX (Data Analysis Expressions) formulas are the programming language
used to define Measures. The following are some examples of DAX formulas:

Tip: Measure results can be placed in a Visual Report called Card.

Page 81
Chapter 6 - Data View

Practice Exercise 98 In Data View: Home Ribbon Tab New MeasureEnter the
New Measure following:

Press .
Tip: The Measure is located in the Field List located on the right side of the
interface and it can be used to create a new Visual Report. Drag the Measure to
the work area to create a Visual Report.
Practice Exercise 99 Create a Measure in the Power BI interface:
New Measure 1. In Data View: Modeling Ribbon Tab New Measure.
2. Type in the following:
Press .
3. Switch to the Report View.
4. Click in a blank area in the work area to unselect any Visual Report.
5. Place the Measure in a Card Visual Report.
Click the Card VisualDrag n Drop the
Sum Gross Sales Measure to the Card Visual.
6. The end result should look similar to the following:
6.3 New Column
This will create a New Column in the Data View layout and will be used
to combine several fields into one New Column. It will create a calculation of
several numeric fields, or perform a mathematical operation of a field. The New
Column will be added to the Field List and will appear as a New Column in
the Data View . The following are a few examples of New Columns:

Practice Exercise 100 1. In Data View: Modeling Ribbon Tab New ColumnEnter the
New Column
following: Press .
2. Review the New Column in the Field List located on the left side of the screen
and the Data Tab located on the right side of the screen.
6.4 New Table This will allow you to create a New Table and reference another existing Table.
The advantage of a reference Table (as opposed to copying / duplicating the
Table) is the data in both Tables will remain the same.
Practice Exercise 101 In Data View: Modeling Ribbon Tab New Table iconenter the
New Table
following: Press .
Review the table in the field list located on the right side of the screen.
6.5 Sort By Column If the data in the chart is not sorted
properly, this feature will allow
you to sort the chart based on the
sort options available. Once you
create the Chart select the more
options in the upper right corner
and choose Sort By option.

Tip: Notice the chart is not sorted in month order

Page 82
Chapter - BI

Practice Exercise 102 1. Click in the blank area to create


Sort Multiple a new report.
Columns 2. Create a new Visual Report:
Axis:
Value:
3. Change the chart to a
Stacked Column Chart . The results

4. change the order of the chart based 5. the chart will be sorted by the
on the highest Gross Sales per month. sum of the top Gross Sales.
Click on More option
Sort By Gross Sales.

6.6 Data Type This will change the Data Type if it was improperly
imported into Power BI. Tip: By default, text fields are
left justified and numbers are right justified. This is a way
to visually identify if the Data Type is correct.
Practice Exercise 103 1. In Data View: Select Financial Table.
Data Type 2. Select the Year columnModeling Ribbon Tab
Data Type dropdownText: .
Notice the Year field is now left justified as a text data
type.
3. Select the Year columnModeling Ribbon Tab
Data Type drop-downWhole Number:
Yes.
6.7 Format The Format tools can be
applied to the Visual
Reports depending on items
selected.
Format Drop-Down Arrow - This allows you to change the
data type to General, Currency, DateTime, Percentage, Text,
etc.
You can also change the data type using the buttons below:
- Currency Format drop-down arrow options:
Currency General - This will only display a Currency
the symbol with decimal points.
$ English (United States) - This will always display a
Currency symbol with two decimal points.

Page 83
Chapter 6 - Data View

- This changes the field to Percent Format.


- This adds Commas to the number in the field.
- Add / Remove Decimals from the field.
6.8 Home Table This is a way to assign a Measure to an empty table. The name of these empty
tables can be descriptive such as Engineering Analysis, etc. This is a way to group
or assign Measures to an independent table other than the main one. Therefore,
you can associate several Measures to a single Home Table.
6.9 Data Category This allows you to specify the Data Category for a
column so Power BI will recognize how it should treat the
values when creating a Visual Report. When data is
imported, not only does it get the data itself, but it also
receives information such as table and column names. A
default assumption is usually set to Uncategorized. One
common problem is defining geography. When it is not
properly categorized, it may not recognize the field while
creating a map. For example, fields such as AR could be
interpreted as Arkansas or Argentina, or CA could be
interpreted as California or Canada. If improperly
categorized, it may generate the wrong map.
To define the Data Category: Data View (located on
the left side of the screenModeling Ribbon TabData
Category drop-down.
6.10 Default By default, Power BI detects numeric columns and sets the Summarization
Summarization property to Sum or Count. Some numeric fields should be set to “Don’t
Summarize” such as DepartmentNumber or YearNumber, because there is no
need to Summarize them. When you create a Visual Report, it may produce
incorrect results if it is set to Sum or Count. This can be changed in the
properties of the field placed in the bucket, or in this setting which will correct
future issues when the field in question is used.
Practice Exercise 104 1. In Data View (located on the left side of the screen): Select the Sales
Default field Modeling Ribbon Tab Default Summarization: Don’t Summarize.
Summarization
2. Create a Visual Report. In Report View:
Drag the Sales field to the blank work area.
Notice it did not place the sales field in the
values bucket because of the Default
Summarization was set to “Don’t Summarize.”
3. In Data View (located on the left side of the screen): Select the Sales
field Modeling Ribbon Tab Default Summarization: Sum.
Dropdown
4. Create a Visual Report. In Report View:
Drag the Sales field to the blank work area.
Notice the sales field was placed in the Values
bucket using the Sum value.

Page 84
Chapter - BI

6.11 Manage Power BI uses a Role-Based security model, which means you are defining a
Roles Role and then assigning users to that Role. Within that Role, you can restrict
users from seeing all rows within a table, or just specific rows.

For example, if I want my Boston team to see only their data, then I would create
a Role that uses a DAX filter on the table that defines the Boston region. This will
also filter any other table in your model to only display the Boston team, so long
as your data model has relationships defined between these tables.
1. In Data View: Modeling Ribbon Tab Manage Roles.
2. CreateRoles: Country
3. Tables: Financial . . .  Add Filter[Country].
4. Change the word Value to a country: [Country] = “Canada”

5. Check the to verify its formatSave.


Next Step - The next step is to assign users to the roles, which must be done
from the Power BI Service.
6.12 View As Roles This will allow you to View the Roles that have been established.

6.13 New Group In Power BI, you can Group data points to help you more clearly view, analyze,
and explore data and trends in your visuals. For example, you might want to place
three categories of products in one larger category (one group).
Practice Exercise 105 Here, we will create two groups: Europe and Northern America.
New Group 1. In Data View: Select the field
2. Modeling Ribbon Tab New Group:

Europe
Ctrl SelectGroup Button.

Page 85
Chapter 6 - Data View

2. Select Germany and France  


Rename Group name to Europe.
3. Select Canada, Mexico and the United States
of America 
Rename Group to North America.
4. Complete the Group: OK

5. In Data View: Review the new field called


Country (groups).

6. In Report View: Create a new Visual


Report using the following fields
 
Change the chart type to Pie Chart .

6.14 Edit Groups Once a Group has been created, it can be


edited by Right-Clicking on the Group field
located in the Details bucket. Rename

Practice Exercise 106 1. In Data View: Select the field Modeling Ribbon Tab
Edit Group New Group Group values: Select Montana and Carretera values using
the Ctrl Key Ok.
2. Modeling Ribbon Tab Edit Group:

Page 86
Chapter - BI

3. Rename Group - Double-Clicking on the Group title in the Name box


Type the new name: Product Group.
4. Create New Group - This will allow you to create a New Group from the
Ungrouped values (left side of the dialog box). Select the Ungrouped values
by using the Ctrl to select several items and then press the Group
button.

Select

Group

5. Remove A Group - Select a Group from the Groups and Members and
press the Ungroup button.

Select

Ungroup

6. Add to Group - This will allow you to add an Ungrouped item to an existing
Group. Select the Ungrouped value Select the existing Group
(Groups and Members)Click the Group button.
Select

Group
Select
7. Remove Item - To Remove an Item from a Group: Select it from the Groups
and Members box and then click Ungroup. You can also select whether
Ungrouped categories should be placed into the Other Groups, or if they
should remain Ungrouped.

Rename

Page 87
Chapter 7 – Relationships
If you load multiple tables, you may need to relate them so fields can be added to the Data Tables stored
in Power BI. In order to relate the tables, you must have a related field that ties the tables together. If not
available, you will need to create a field in the Data Tab in order to relate them.
Chapter Contents
Section 1 - Relationships
Section 2 - Modeling Ribbon Tab
Section 1 - Relationships

Concept Explanation / Command String in italic.


7.1 Relationship Tables can be related in order to tie related records together. This allows you to
Button create a Visual Report from fields in different tables that have a common tie. For
example, you can place the Customer Name field in a Visual Report along with
the Order Amount field that is physically stored in a separate table. The end result
will be that you will see the total Order Amount for each customer.
Click on the Relationship button (Located on the left side of the screen)
This is a graphical representation of the related tables.

Tip: A * indicates a Many Relationship.


Tip: A 1 indicates One Relationship.

Page 89
Chapter 7 - Relationships

Practice Exercise 107


Open The 1. In Power BI Desktop: Get Data
Data Source ExcelHotDogSales.xlsx
Select all 3 Tables Load.
2. To verify Relationships: Select the
Relationships button (located on the left
side of the screen).

3. If the Product Table is incorrect, do the following:


Edit the Query: Home Ribbon Tab Edit Queries dropdown
Edit QueriesSelect the Product TableHome Ribbon Tab
Use first row as header Close & Apply
(The link will be created automatically).
4. Go to the Relationships View.

7.2 Auto- If the field names and data types are the same, the system will relate the tables
Relationships Automatically.
Practice Exercise 108
1. Relationships Button.
Relationships
2. Delete the links between each table by Right-Clicking .

3. Home Ribbon Tab Manage Relationships

Page 90
Chapter - BI

7.3 Manage This will open the Relationship view and display the tables to be related. You
Relationships will be able to view Defined, add New, Autodetect, Edit or Delete
Relationships.
Modeling Ribbon Tab Manage Relationships

This will be discussed in greater detail in Chapter 5 Relationships.


Section 2 - Modeling Ribbon Tab

Concept Explanation / Command String in italic.


This can be used to create additional related words for table, column, or measure
7.4 Synonyms names. It can be useful when an end user is searching for a specific name and is
not aware of the actual name. These are alternate methods for making it easy to
find specific information.
This will establish the Language used.
7.5 Language
7.6 Manage Roles Refer to Chapter 6 - Data View for more details on Manage Roles.

7.7 View As Roles Refer to Chapter 6 - Data View for more details on Manage Roles.

Page 91
Chapter 8 - Query Editor
The Query Editor interface will allow users to link to data sources such as Excel, CSV, XML, Text,
SQL Server, Access, Oracle, MySQL, SharePoint List, Active Directory, websites across the
enterprise and Facebook. Once the data source is linked to the Query Editor interface, you can reduce
the amount of data to be used in Reports or add/remove fields. Also, there are many customized
techniques used to adjust data including adjusting columns(fields), rows (records), split columns,
combine columns, replace information, transpose the entire table, change the data type, and sort
columns. This data source in the Query Editor is used to filter, transform, or shape information. Each
Query adjustment is saved by name and can easily be removed in the Applied Steps Query Settings.
You can return back to the Query Editor at any time to make additional adjustments as necessary.
When finished, the resulting data can be saved to Power BI, or if you are connected directly to a
database data source, the results can be previewed in Data View.

Chapter Table of Contents


Section 1 - Query Editor Interface
Section 2 - Home Ribbon Tab
Section 3 - Transform Ribbon Tab
Section 4 - Add Column Ribbon Tab
Section 5 - View Ribbon Tab

Page 93
Chapter 8 - Query Editor

Section 1 - Query Editor Interface


The screen above is the Query Editor interface used to manipulate the data source. At this point, you can
filter or eliminate undesired records. If you pull data from an information website (such as government
census data), you will need to reduce the amount of information coming into Power BI. The goal of this
step is to place the desired data in a Power BI Data Query necessary for creating reports.

Concept Explanation / Command String in italic.


Practice Exercise 109 1. In Power BI Desktop: File TabOpen
Open C:\Data\PowerBI-2\Visual Reports3.pbixOpen button.
2. Home Ribbon Tab Edit Queries Drop-Down Edit Queries
This will open a Power BI Query Editor:

To Exit the Query Editor press Close & Apply.


8.1 Left Pane The Left Pane displays the number of active queries, as well
as the name of the Query. When you select a Query from the
Left Pane, its data will be displayed in the Center Pane.
Tip: This is usually the original data source Table name. However, it is called the
Query because when it is filtered, it becomes a subset of the original Table. This
chapter will refer to the Table name as a Table, Query, or Table/Query
interchangeably.
8.2 Center Pane In the Center Pane, the data or result of the selected Query is displayed. This is
where filtering is accomplished. Filters can be applied to Fields/Columns and
becomes a subset of the original Table.

Tip: Power BI refers to the output of the Query Editor as a Data Table, but can
also be called a filter, transformed data, or shape data. Also, the word Query and
Table are used interchangeably in this document.
8.3 Properties The properties are located on the right side of
the interface.

Page 94
Chapter 8 - Query Editor

8.4 Applied Steps Whenever you add a Query step or filter in


Query Editor, it is inserted into the sequence of
steps located in the Query Settings/Applied
Steps. Usually, steps are added at the end of the
sequence, but if you add a step anywhere other
than at the end of the flow, you should verify that all the subsequent steps function
properly. The following is an example of the Applied Steps located on the right
side of the screen. For example, if you remove a column in the Query Editor, the
filter setting will be stored in the Applied Settings area. If a filter needs to be
removed from the Query Setting Pane, simply delete the filter desired.
Practice Exercise 110 Remove the Applied Step of Filtered Rows:
1. Create a Filtered Rows filter:
Click the down arrow in the Segment field 
Uncheck Select All Check Government Ok.
2. To remove the Applied Steps, press the in the following:

3. To Exit the Query Editor press Close & Apply.


Section 2 - Home Ribbon Tab
The Home Ribbon Tab provides the most commonly used features:

Concept Explanation / Command String in italic.


Practice Exercise 111
1. Start Power BI Desktop or a new blank report (File Tab New).
Get Data
Excel Worksheet 2. In Power BI Desktop: Get Data dropdown Excel
C:\Data\PowerBI-2\Financial Sample1.xlsxOpen.
3. Choose the Financial Sheet.

4. Edit
This will open the Query Editor.

Page 95
Chapter 8 - Query Editor

8.5 Close & Apply When finished manipulating the Query, choose the
“Close and Apply” button. The filtering defined in the
Query will be Applied to the Data Table in Power BI to
be used for a Visual Report. You can change the filter in
the Query and reapply it to the Data Table.
Practice Exercise 112 1. If the Query Editor is open, Press Close & Apply.
Close & Apply 2. If you are at the Power BI interface in Power BI: Home Ribbon Tab
Edit Queries dropdown  Edit Queries.
8.6 New Source You can connect to a variety of Sources such as local, small databases, larger
server-based databases, and data warehouses. A data warehouse is a special type
of database that has a storage collection of information that has not usually
actively updated. Also, data can be extracted from websites such as a government
census, Facebook data, etc. Some of the more common Data Sources include
Excel, SQL, Access, etc. Tip: To get Facebook data:
1. In Query Editor: Home Ribbon Tab
New SourceMore . . .  Access Database 
C:\Data\PowerBI-2\Northwind 2008.accddOpen.
2. Choose the Customers Table.

3. Load
This will skip to the Query Editor (filtering) step and load the data directly to
Power BI Visual Reports.
Tip: The other way to load a file is: In Power BI Desktop: Get Data 
More… Access Database 
C:\Data\PowerBI-2\Northwind 2008.accddOpen
Choose the Customers TableLoad .
8.7 Recent Sources After you have opened a data source, the data source name will
be listed under the Recent Sources button. This is a shortcut to
the previously accessed data source.
Home Ribbon Tab Recent Sources.

Page 96
Chapter 8 - Query Editor

8.8 Enter Data This will create a new blank Table and will allow
you to enter new data.

Practice Exercise 113 Create a new Table and Enter Data.


Enter Data 1. Create a new blank Table. In Query Editor: Home Ribbon
Tab Enter Data Enter values 1 through 20
Name: Table1Ok.
Tip: The new Query, called Table1, will be located on the left
side of the interface.
8.9 Data Source This will allow you to change the physical location of the Data Source to a
Settings different Source location containing similar data records. This can be used to
point to a previous backup or to a newer Data Source of information, Once the
Data Source is defined, a Visual Report can display this new information. Also,
you can change the permissions to None, Public, Organizational, or Private
rights to restrict access when defining multiple Data Sources.
In Query Editor: Home Ribbon Tab Data Source Settings or
In Query Editor: File Tab Options and SettingsData Source Settings.

The three options above will be reviewed below:


8.10 Change Data Source Settings Change Source - This will allow you
Source to change the location of the source or a different source that contains a similar
structure. It may be a backup or historical data source.
Practice Exercise 114 1. Select the Financial Table.
Change Source 2. In Query Editor: Home Ribbon Tab
Data Source Settings 
Change Source .
3. Browse to find the new data source:

4. OKClose.

Page 97
Chapter 8 - Query Editor

5. The data source will look the same, but there may be more
or less records available.

8.11 Permissions Data Source Settings Edit Permissions - This will allow
you to edit or change Privacy Levels that can be used to block or isolate different
Data Sources from each other. This may reduce functionality and impact
performance.
Private - Use this if your Data Source
contains sensitive or confidential
information. The visibility of the Data
Source may be restricted to authorized
users and is isolated from other Data
Sources. An example could be if you
were connecting to a specific Facebook
account or to a Data Source containing
employee payroll information.

Organizational - Use this Data Source to limit visibility to a trusted group


of people. An example could be if you were accessing a file located on
an intranet SharePoint site with permissions enabled for a trusted group.
Public - This Data Source gives everyone visibility to the data contained in the
Data Source. Only files on internet Data Sources or workbooks data can be
marked Public.
None - This is the default setting if the privacy levels are not needed.
Clear Permissions - This will remove all permission settings
back to None.

Global permissions - This will allow you to change the


Data Source to a different internet based Data Source such as Facebook.

Page 98
Chapter 8 - Query Editor

8.12 Manage This could be used in conjunction with an SQL Query to


Parameters provide an answer to the SQL statement when a record or
group of records is needed. It can also be used to provide a
value to be used in a filter.
Manage Parameters - This is where you would
adjust the properties of a previously created
Parameter.
Edit Parameters - This provides a method to adjust
the Parameter data value.
New Parameter - This is where you would
add a new Parameter to your queries.

Tip: In order to remove the Parameter definition, you


must remove the Filter from the Query (see step 11 and
12 below) and then you will be able to delete the defined
parameter (see Home Ribbon Tab Manage Parameters
dropdown
Manage Parameters).
Practice Exercise 115 1. In Query Editor: Select Financial Table.
Manage
Parameters 2. Home Ribbon Tab Manage Parameters 
New Parameter:
3. Enter the following information, then press OK.
4. Apply a filter to the Discount Brand Field 
Filter DropdownText FiltersEquals.

5. Apply the Parameter to the filter: Choose the Parameter


option in the drop-down. See the Filter screen below:

Choose Parameter

Ok
6. Refresh:Home Ribbon Tab Refresh Preview dropdown Refresh All.

Page 99
Chapter 8 - Query Editor

7. The final result will look similar to the following:

8. Test it: In Query Editor: Home Ribbon Tab


Manage ParametersEdit Parameter
(Change the parameter value to Medium):Ok.

9. To Manage or change the default parameter: In Query


Editor: Home Ribbon TabManage Parameter
Dropdown Manage Parameter
(Change the Current Value to High):
10. Refresh:Home Ribbon Tab Refresh Preview dropdown Refresh
All.

Tip: You can also modify the parameter


directly: Select the Brand Type Query on the
left side of the interface.

11. Delete the Parameter: In Query Editor: Select the Filter drop-down
in the Discount Brand Field Clear Filter .
12. Home Ribbon TabManage Parameter drop-downManage Parameter

Press the to delete the Brand Type:


Ok.
13. Refresh: Home Ribbon Tab Refresh Preview dropdown
Refresh All. Tip: If it doesn’t Refresh, try Refresh again.
8.13 Data Source Another use of Parameters is to change the Data Source Settings in dashboards
Setting and reports. These parameters are more flexible than the Filter capacity because it
Parameter is easy to change in Power BI. Tip: As of now, Parameters can only be added to
your data model queries in the Power BI Desktop and this functionality is NOT
available when using Power BI online (It may be available in future versions).

Page 100
Chapter 8 - Query Editor

Practice Exercise 116 1. In Query Editor: Select Financial Table.


Manage
Parameters 2. Home Ribbon Tab Manage Parameters 
New Parameter:
3. Enter the following information, then press OK.
4. Apply a filter to the Data Source Settings:
Home Ribbon TabData Source Settings

Choose Parameter

OKClose.

5. To change the Data Source:


Select the Change Data Source ParameterCurrent Value Drop-down:
C:\Data\PowerBI\Financial Sample2.xlsx.

6. To verify to see if it works: Home Ribbon TabData Source Settings

8.14 Refresh If your data source is connected to a live database or


Preview connected through a gateway, a Refresh will get new data
from the data source.
Refresh Preview - This will only Refresh the
information you have displayed on the screen.
Refresh All - All Queries located on the left side will be Refreshed.
Cancel Refresh - This will allow you to Cancel a Refresh if it is taking a long
time to finish. It may be hung or frozen.
8.15 Properties This will allow you to rename the displayed Query Name
to a new name.
Name: (Provide the Query Name).
Description: (Provide the Query Description).

Uncheck this if you want to exclude this Query


Name from being applied to the Visual Report.

Uncheck this if you want to exclude a Query


Name from the Refresh. This may be helpful if the
data source is extremely large.
Tip: The checkboxes are usually checked by default.

Page 101
Chapter 8 - Query Editor

Practice Exercise 117 Rename the Financial Table to MyFinancials1.


Properties 1. Select the Financial TableHome Ribbon Tab
PropertiesName: MyFinancials1Ok.
2. Rename the Table back to Financial.
Tip: The Table name can be renamed using the
Query Editor: Home Ribbon TabProperties button or
in the Query Settings located on the right side of the interface.
8.16 Advanced The Advanced Editor is where filtering steps are stored in a text layout. This
Editor feature will allow you to view or modify information. These steps are created in
the Query Formula Language, often referred to as the M Program Language.

8.17 Manage This will allow you to manipulate the selected Query located on
the left side of the Query Editor screen.
Delete - This will Delete the selected Query.
Duplicate - This makes a copy of the selected Query.
Reference - This creates a new Query that References the selected Query.
Practice Exercise 118 1. In Query Editor: Select Financial Table.
Manage 2. Duplicate Query Name: Select a Query name located on the left side of the
screenHome Ribbon TabManageDuplicate.
3. Delete Query Name: Select the Duplicated Query name located on the left
side of the screenHome Ribbon TabManageDelete.
Tip: You can also Right-Click on the Duplicate NameDelete.
8.18 Choose This will allow you to add or remove a Column by
Columns checking or unchecking the checkboxes next to a
specific field. When you uncheck a field and you
choose “Close and Apply,” the columns will not be
available in the Excel Data Table. The records removed
in the Query Editor are still available and can be added
back in the Query Editor if desired.
Choose Columns Dropdown

Go To Column - This will find a column located in large tables.


Tip: The Go To Column is also available in the View Ribbon Tab.
Practice Exercise 119 1. In Query Editor: Select Financial Table.
Go To Column
2. To move to a specific column: Home Ribbon Tab Choose Columns
drowdown Go To Column (Select a desired column)Ok.
3. To add/remove columns: Home Ribbon Tab Choose Columns
drowdown Choose Columns
Check and uncheck the desired columnsOk.
4. Select all columns: Home Ribbon Tab Choose Columns dropdown
Choose Columns Select All ColumnsOk.

Page 102
Chapter 8 - Query Editor

8.19 Remove Remove Columns - This Removes un-wanted


Columns selected Columns. A Remove Columns filter
will be applied to the Query in the Applied
Steps. Tip: You can also right-
Remove Other Columns - This will keep the click on a column and
selected Columns and dispose of the Other choose Remove Column.
Columns.
Tip: If the column is used to reference another Query, you might receive an error
message that will be unable to Remove it.
Practice Exercise 120 1. In Query Editor: Select Financial Table.
Remove Columns 2. Select the desired column(s) to be removed using the Ctrl and Select Keys.

3. In Query Editor: Home Ribbon Tab Remove Columns drop-down


Remove Columns.
4. Restore Removed Columns: On the Right side of the Query Editor
Click the in the Applied Step .
5. Select the desired column(s) you want to keep using the Ctrl and Select Keys.

6. In Query Editor: Home Ribbon Tab Remove Columns dropdown


Remove Other Columns.
7. Restore Removed Columns: On the Right side of the Query Editor
Click the in the Applied Step:
8.20 Keep Rows This will Keep only the specified Rows or records and
other rows in the Query will not be displayed. A Keep
Rows filter is applied to the Query in the Applied
Steps.
Keep Top Rows - This will prompt for the number of
Rows to start from row 1.
Keep Bottom Rows - This will prompt for the number of Rows to start
from the row on the Bottom of the Query.
Keep Range of Rows - This will prompt for the range of Rows you want to
appear in the Query.
Keep Duplicates - This will Keep Duplicates and remove all other Rows.
Keep Errors - This will Keep only Rows with errors so you can review them.
Practice Exercise 121 1. In Query Editor: Select Financial Query.
Remove Top Rows 2. To keep a range of Rows: Home Ribbon Tab

Keep Rows Drowdown Keep Top RowsNumber of rows: 3


Only 3 rows will be displayed:

3. To restore the Rows after they have been removed: On the Right side of the
Query Editor Click the in the .

Page 103
Chapter 8 - Query Editor

8.21 Remove Rows This will Remove Rows or records chosen from the
options available. A Remove Rows filter will be
applied to the Query in the Applied Steps.
Remove Top Rows - This will prompt for the
number of Rows to Remove starting from row 1.
Remove Bottom Rows - This will prompt for the
number of Rows to Remove starting from the
last record in the data Query.
Remove Alternate Rows - To define your
Alternate Rows to Remove in a pattern, enter the first Row to Remove,
Number of Rows to Remove, and Number of Rows to Keep.
(See Practice Exercise below).
Remove Duplicates - This will Remove all Duplicates.
Remove Blank Rows - This will Remove only Blank Rows.
Remove Errors - This will only Remove Rows that contain Errors.
Practice Exercise 122 Create a new Table and Remove Alternate Rows:
Remove Alternate
1. Create a new blank Table: Home Ribbon Tab Enter
Rows
Data Enter values 1 through 20Name: Table1Ok.
2. Select Table1Home Ribbon Tab Remove Rows
Remove Alternate RowsEnter the following:
Result

Ok.

3. Delete the filter on the right side of the screen by Clicking the next to
.
4. Type other Parameters to test out this feature such as 5 2 1 or 5 2 2 in the
Remove Alternate Rows dialog box.
5. Use the same Query to test out Remove Top Rows and Remove
Bottom Rows.
8.22 Sort This will Sort the selected column. Tip: This can also be applied by selecting the
down arrow located in the column heading.
8.23 Split Column This will Split a Column into two columns based on a
delimitator character or a specific number of
characters. A delimitator is a common identifier
character in the middle of the field.

Page 104
Chapter 8 - Query Editor

Practice Exercise 123 1. In Query Editor: Select Financial Table.


Split Column 2. Select two columns using the shift or Ctrl keys.

3. Merge two colimns: Transform Ribbon Tab Merge Columns.

Ok.
4. Split Columns: Select the Merged columnHome Ribbon Tab

Split ColumnBy Delimiter.

Ok.
5. The end result will look similar to the following:

6. Rename the columns to the proper name: Double click on the column
label(Enter the following names).

Page 105
Chapter 8 - Query Editor

8.24 By Group This will Group or summarize all the related records in a column and apply a
math operation such as counting, summing, etc. Select the column to be grouped,
provide the New Column Name and the Operation to be performed such as
Sum, Count, etc. You might also want to make a copy of the Query.
Home Ribbon Tab Manage Duplicate.
if you plan to keep the results to use to develop a Visual Report.
The following is the end result of the Group By Command:

Tip: This is also located in Transform Ribbon TabGroup By.


Practice Exercise 124 1. In Query Editor: Select Financial Table.
Group By 2. Home Ribbon TabManage Dropdown Duplicate.
3. Open the duplicated QuerySelect the Discount Brand Field
Home Ribbon TabGroup By.

Ok
4. The result will group and count all the records in the field.

Page 106
Chapter 8 - Query Editor

8.25 Data Type This will change the Data Type


if it was improperly imported
into Excel. Tip: Once you learn
the Data Type symbols, you can
change the Data Type by
selecting the left side of the
column name. See Below:

Tip: By default, text fields are left justified


and numbers are right justified. This is a way
to visually identify if the Data Type is
correct.

Tip: This feature is also located at Transform Ribbon TabData Type.


Practice Exercise 125 1. In Query Editor: Select Financial Query.
Data Type 2. Select the Year columnHome Ribbon Tab
Data Type dropdownText: .
Tip: Notice the data in the column is now left justified indicating that it is
formatted as a Text Data Type.
Tip: Select the icon in the Year columnChange it to Text.
8.26 Use First Row If the Get Data step did not recognize the labels,
As Headers then the Query Editor will allow you to define
the First Row As the Header Label.
Tip: This feature is also located at: Transform Ribbon TabUse First Row As
Headers.
Practice Exercise 126
Use First Row As 1. In Query Editor: Home Ribbon Tab New Source Excel
Headers C:\Data\PowerBI-2\HotDogSales.xlsxOpen.
2. Choose the Product Table.

 .
3. Home Ribbon Tab 
.
8.27 Replace Value This is a way to clean up or Find and Replace Values with a different Value. A
Value is any item located anywhere in the entire Table.
Tip: This feature is also located at Transform Ribbon TabReplace Value.

Page 107
Chapter 8 - Query Editor

Practice Exercise 127 1. In Query Editor: Select Financial Table.


Replace Values 2. Select the Segment ColumnHome Ribbon Tab
Replace ValuesEnter the following parameters and press Ok.

Ok.
8.28 Merge Queries This will Merge different columns from different
data sources, replace duplicate Customer ID’s and
place them into a single Query. You will
need to use the Get Data command to bring the different data sources into the
Query Editor. The primary data source will be considered first and any new
record will be added. For example, Table1 contains product information and
Table2 contains order information. The Merge Query will create a single Query
containing the order information and the product description added to the
Combined Query.
Tip: The files must have a similar structure. Additional changes to the Query
need to be made in the formula editor using M Code.
Join Kind: Full Outer Join - This will Merge data from two tables into one
table.
No duplicate records will be Merged.
Join Kind: Inter - This will Merge only records that match in both tables.
Practice Exercise 128 Customer100 Table has 100 records.
Merge Customer10 Table has the first 10 records
of Customer100. Therefore, the first 10
records are duplicate records.
1. In Query Editor: Home Ribbon Tab
New Source Excel
MergeQuery.xlsxSelect:

Ok.
2. In Query Editor: Home Ribbon Tab
Merge Queries dropdown
Merge Queries As New
Enter the Merge parameters:
Choose Join Kind:
Full Outer(all rows from both)
Select OK.

Test it: Merge the two tables again and choose the Join Kind: Inter.
The results will only Merge records that match.

Page 108
Chapter 8 - Query Editor

8.29 Append This will allow you to Append two


Queries Queries, located on the left side of the
interface, into one Query. When you
Append two data sources into one, the
primary data source will be considered
first and any new record will be added.
Practice Exercise 129 Continue from previous Practice Exercise.
Append 1. In Query Editor: Home Ribbon Tab
Append Queries dropdown
Append Queries As New
2. Review the Appended result.

OK

8.30 Combine Files Merge different columns from different files and place them into a single Table.
For example, Table1 could include product information and Table2 could include
order information. The Combine Files will create a single Table containing the
order information and the product description added to the combined Table. The
files must have a similar structure. Therefore, you will need to import all files into
Power BI possibly make changes to the M Code.
Practice Exercise 130 1. In Windows: Create a new folder called CombineFiles:
Combine Files C:\Data\PowerBI-2\CombineFiles
2. In Windows: Copy file “Financial Sample1.xlsx” and
“Financial Sample2.xlsx” to the folder C:\Data\PowerBI-2\CombineFiles
3. In Power BI: Home Ribbon Tab Get DataMore. . .Folder

 .
4. Enter the folder path: Browse

5. Inspect the tables to be merged:

Page 109
Chapter 8 - Query Editor

6. Combine and Edit:

Choose  
Select the Financial table

7. Press to complete the


Combine Query
8. The final result will combine both files and add a new field to identify the
source file. Also, the Combined Query will be created in a new Power BI
Desktop.

Page 110
Chapter 8 - Query Editor

Section 3 - Transform Ribbon Tab


The Transform Ribbon Tab changes or transforms data such as adding or removing columns, changing
data types, splitting columns, or other data-driven tasks. The term Transform Data has to do with
changing, filtering, adjusting, and shaping the Data Table to a new form or layout. The following is
the Transform Ribbon Tab:

Concept Explanation / Command String in italic.


Practice Exercise 131 1. Start Power BI Desktop or a new blank report (File Tab New).
Get Data
Excel Worksheet 2. In Power BI Desktop: Get Data drop-down Excel
C:\Data\PowerBI-2\Financial Sample1.xlsxOpen.
3. Choose the Financial Sheet.

4. Edit
This will open the Query Editor.

8.31 Group By This will Group or summarize all related


records in a column and apply a math
operation either counting, summing, etc.

Page 111
Chapter 8 - Query Editor

Practice Exercise 132 In Query Editor: Home Ribbon Tab Group By
Group By 2. To remove the
Applied Steps,
press the in the
following:
.

8.32 Use First Row This will apply the First Row of the Data Table to the table titles. Refer to:
As Headers Home Ribbon Tab Use First Row As Headers for a detailed explanation.

This switches all the columns to rows, and rows to columns.


8.33 Transpose
Practice Exercise 133
1. In Query Editor: Home Ribbon Tab Enter Data
Transpose
Enter values 1 through 20Name: Table1Ok.
2. Select Query called Table1.
3. Transform Ribbon Tab Transpose Transpose.
4. Choose Transpose Ribbon TabTranspose to reverse the action
8.34 Reverse Rows This will switch the table’s rows (record). The first row will be displayed on the
last row (record) and the last row will be displayed on the top row.
Practice Exercise 134 1. Use Table1 from the previous exercise.
Reverse Rows 2. To Reverse Rows: Transpose Ribbon Tab Reverse Rows
(review results).
3. To Return rows to the original setting: Transpose Ribbon Tab
Reverse Rows(review results).
8.35 Count Rows This will Count all the Rows and display a number of the total rows in a separate
Table.

Practice Exercise 135 In Query Editor/Financials Table:


Count Rows 1. Transpose Ribbon Tab
Count Rows(review results).
2. To remove the Applied Steps, press the in the following:
.
8.36 Data Type This will change the Data Type of a column to a different type such as Decimal
Number, Whole Number, Date, Text, etc.
Refer to: Home Ribbon TabData Type for a detailed explanation.
8.37 Detect Data This will review all the records of the selected column to determine the Data
Type Type. If it is still incorrect, use the Data Type command to make the changes (if
it was incorrectly imported). Select the desired columnTransform Ribbon
TabDetect Data Type.
8.38 Rename One common use of the Query Editor is to Rename column labels to a more
understandable name. These names will be used in the reports as the title.
Tip: You can Rename any column by double-clicking on the column label.

Page 112
Chapter 8 - Query Editor

Practice Exercise 136 1. In Query Editor: Select Financial Table.


Rename 2. Select the columnTransform Ribbon Tab
Rename .
3. To remove the Applied Steps press the in the following:

Tip: You can also double-click on the column label to rename the field.
8.39 Replace Values This will find a specific value located in the Data Table and Replace every
Value with a new one.
Refer to the: Home Ribbon Tab Replace Values for a detailed explanation.
Practice Exercise 137 1. In Query Editor: Select Financial Table.
Replace Values 2. Select the Discount Brand column Transform
Ribbon Tab Replace Values dropdown Replace Values 
(enter the following and press Ok):

Ok.
2. To remove the Applied Steps, press the in the following:
.
8.40 Replace Errors If a column has errors displayed choose Replace Errors with 0 or other text.
Transform Ribbon Tab Replace Values dropdown Replace Errors.
8.41 Fill This Fills the values of cells that are blank with the record above as shown in
value above.
Select the desired columnTransform Ribbon Tab 
Before After

8.42 Pivot Column In the Query Editor, you can Pivot the data in the rows and columns.
Select the desired column and provide the numerical value to be used as a cross-
section.

Page 113
Chapter 8 - Query Editor

Practice Exercise 138 1. In Query Editor: Select Financial Table.


Pivot Column 2. Right-Click on the Financial TableDuplicateSelect the Duplicated
Table. Select Discount Brand column
Transform Ribbon Tab Pivot Column

Ok.
This will list the Discount Brand fields in the column and compare all records to
None, Low, Medium, and High.

3. To remove the Applied Steps press the in the following:


.
8.43 Unpivot This removes the Pivot layout.
Columns

8.44 Move This Moves columns to a different position within the Table. Tip: This can also
be done by selecting the column and dragging it to another position.

Practice Exercise 139 Select and Move the Product column it to a new position.
Move 1. In Query Editor: Select Financial Table.
2. Select the Product ColumnTransform Ribbon Tab Move Right.
3. To remove the Applied Steps press the in the following:
.
8.45 Convert To List This Converts the selected column to a single column List of information. It
removes all columns except the result List.
Tip: You might want to Duplicate the Query prior to using this command:
Home Ribbon TabManage Drop Down ArrowDuplicate.

Page 114
Chapter 8 - Query Editor

Practice Exercise 140 1. In Query Editor: Select Financial Table.


Remove
2. Select the Country column
Duplicates
Transform Ribbon Tab Convert to List.
3. Transform Contextual Ribbon Tab
Remove Duplicates.
Tip: There are two Transform Ribbon Tabs:

4. To remove the Applied Steps, press the in the following:

8.46 Split Columns This will Split a single Column into two columns.
Refer to Home Ribbon TabSplit Columns for a detailed explanation.
8.47 Format This will change the values in a selected column to:
Lowercase - This will convert all characters to Lowercase.
UPPERCASE - This will convert all characters to
Uppercase.
Capitalize Each Word - This will convert all words in the
column to Propercase.
Trim - This will Trim blank characters before and after the
characters in the column.
Clean - This will remove any non-printable characters contained in the column.
Add Prefix - This will Add characters before the data in the column.
Add Suffix - This will Add characters after the data in the column.

Tip: This feature is also available at Add Column Ribbon Tab Format.
Practice Exercise 141 1. In Query Editor: Select Financial Table.
Uppercase 2. Select column 

Transform Ribbon Tab Format  .


3. To remove the Applied Steps, press the in the following:
8.48 Merge This will concatenate or patch several selected Columns into a single Column.
Columns Tip: This feature is also available at: Add Column Ribbon Tab Merge
Columns.
8.49 Extract This will Extract specific characters from text values in
the selected column.

Tip: This feature is also available at: Add Column Ribbon


Tab Extract.

Page 115
Chapter 8 - Query Editor

Practice Exercise 142 1. In Query Editor: Select Financial Table.


Extract
2. Select the column 
Transform Ribbon Tab Extract End Result:
First Characters.

Ok.
3. To remove the Applied Steps, press the in the following:

This extracts rows and columns from XML or JSON formatted text.
8.50 Parse Tip: This feature is also available at Add Column Ribbon Tab Parse.
8.51 Statistics Perform the following Statistical operations on a numeric
column. The end result will provide a single total of the entire
field. The following is the result:

Tip: This feature is also available at:


Add Column Ribbon Tab Statistics.
Practice Exercise 143 1. In Query Editor: Select Financial Table.
Statistics 2. Select the Units (or Units Sold) column
Transform Ribbon Tab
StatisticsSum.
3. To remove the Applied Steps press the in the following: .
8.52 Standard This will perform the following Standard math functions on a
numeric column.
Tip: This feature is also available at:
Add Column Ribbon Tab Standard.

Page 116
Chapter 8 - Query Editor

Practice Exercise 144 This will add one (1) to every value in the field.
Standard 1. In Query Editor: Select Financial Table.
2. Select Manufacturing Price (or Mfg Price) columnTransform Ribbon Tab
 Standard dropdownAdd(Enter the following value):

3. To remove the Applied Steps, press the in the following:

8.53 Scientific This will perform the following Scientific operations on a


numeric column:
Power Logarithm

Tip: This feature is also available at: Add Column Ribbon Tab Scientific.
8.54 Trigonometry This will perform the following Trigonometry operations on a
numeric column:
Tip: This feature is also available at: Add Column Ribbon Tab
Trigonometry.

8.55 Rounding This Rounds the decimal places using the following Rounding
methods. Tip: This feature is also available at: Add Column
Ribbon Tab Rounding.
8.56 Information This will create a New Column using the words True or False depending on the
option chosen.
Refer to Transform Ribbon Tab Information for a detailed explanation.

Page 117
Chapter 8 - Query Editor

Practice Exercise 145 1. In Query Editor: Select Financial Table.


Information 2. Select the MonthNum Column
3. Make sure the Data Type is a whole number.

Result .
4. Transform Ribbon Tab InformationIs Even.
Before: After:

5. To remove the Applied Steps, press the in the following:


8.57 Date This changes the look of a Date to the following
options. Tip: This feature is also available at:
Add Column Ribbon Tab Date.
Practice Exercise 146 1. In Query Editor: Select Financial Table.
Date
2. Select the Date Column
Tip:You may need to convert the field to the Date
Click the left side of the field name Date.
3. Transform Ribbon Tab DateQuarter
Quarter of Year.
Before: After:

4. To remove the Applied Steps, press the in the following:


8.58 Time This will change the look of a Time value to the
following options:
Tip: This feature is also available at: Add Column
Ribbon Tab Time.

Page 118
Chapter 8 - Query Editor

8.59 Duration This will format a Duration field to the


following types:
Tip: This feature is also available at:

Add Column Ribbon Tab Duration.

8.60 Structured Expand - This will Expand nested data containing tables,
Column lists, and records to become New Columns and rows in
the existing table.
Aggregate - This will summarize nested data to average,
min, max, and count.
Extract Values - This will Extract the values of a list in the
selected column by combining them into a single text
value using a specified delimiter.
8.61 Run R Script Performs transformation and shaping steps with R Script Program Language.
You must have R installed to add an R Script.

Page 119
Chapter 8 - Query Editor

Section 4 - Add Column Ribbon Tab


The Add Column tab provides additional tasks associated with adding and manipulating columns,
formatting column data, and adding custom columns. The following is the Add Column tab:

Concept Explanation / Command String in italic.


Practice Exercise 147 1. Start Power BI Desktop or a new blank report (File Tab New).
Set Up
2. In Power BI Desktop: Get Data dropdown Excel
C:\Data\PowerBI-2\Financial Sample1.xlsxOpen.
3. Choose the Financial Sheet.

4. Edit .
This will open the Query Editor.

8.62 Column From This allows you to create a custom formula that will transform
Examples data into a New Column. The two options available are:
From All Columns and From Selection.

Page 120
Chapter 8 - Query Editor

Practice Exercise 148 1. In Query Editor:


Column From Select Financial Table.
Example
2. Add Column Ribbon Tab
Column From Examples
From All Columns
(Type the words Units).
3. Choose Rounded Down
UnitsPress EnterOK.
Before: After

4. To remove the Applied Steps, press the in the following:

8.63 Custom This will create a New Column using a formula from different fields.
Column The applied column will appear in the Applies Steps (located on the right side of
the screen). If you wish to remove the column formula, you can delete the
Applied Step.
Add Column Ribbon Tab Custom Column:
Practice Exercise 149 Add a Custom Column to total the units sold at sales price:
Custom Column 1. In Query Editor: Select Financial Table.
2. Add Column Ribbon TabCustom Column
(use the Available columns on the right to spell the column names properly):

3. Press Ok and review the new field.


4. To remove the Applied Steps, press the in the
following: .
Test it: Add a New Column for the Year, Month,
and Day.
8.64 Invoke Custom This will Invoke or execute a custom Visual Basic function such as:
Function Function TestFunc()
MyVar = 2500
End Sub
In the Invoke Custom Function screen, you would insert the following:
MyFunc()
8.65 Conditional This will create a New Column from an existing column using a Conditional
Column statement.

Page 121
Chapter 8 - Query Editor

Practice Exercise 150 1. In Query Editor: Select Financial Table.


Conditional 2. Add Column Ribbon Tab Conditional Column
Column (Enter the following parameters)
New Column Name: HighMfgPrice
Column Name: Manufacturing Price (or Mfg Price)
Operator: is greater than
Value: 10
Output: Manufacturing Price (Tip: Change to )
Otherwise: Ok.

Manufacturing Price HighMfgPrice

3. To remove the Applied Steps, press the in the following:

8.66 Index Column This creates a New Column with a starting Index. The Index
options are 0, 1, or a custom value. For example, using an Index of
0 will result in a column numbered from 0,1,2,3, etc.

Practice Exercise 151 Sort the Segment Field in ascending order and then create an Index.
1. In Query Editor: Select Financial Table
2. Sort Segment Field Ascending:

3. Index ColumnFrom 1 (review results)


4. To remove the Applied Steps, press the in the
following:
8.67 Duplicate This will make a copy of the selected column.
Column

Page 122
Chapter 8 - Query Editor

Practice Exercise 152 1. In Query Editor: Select Financial Table.


Duplicate Column
2. Select column Segment 
Add Column Ribbon Tab
Duplicate Column(Review the Duplicated column).
3. To remove the Applied Steps, press the in the following:

8.68 Format This will change the values in the selected column to lowercase, UPPERCASE,
etc.Refer to Chapter 8, Section 3 Transform Ribbon Tab Format for details.
8.69 Merge This will concatenate or patch several selected Columns into a single Column.
Columns Refer to Chapter 8, Section 3 Transform Ribbon Tab Merge Columns for
details.
8.70 Extract This will Extract specific characters from text values in the selected column.
Refer to Chapter 8, Section 3 Transform Ribbon Tab Extract for details.
8.71 Parse This extracts rows and columns from XML and JSONformatted text.
Refer to Chapter 8, Section 3 Transform Ribbon Tab Parse for details.
8.72 Statistics This will perform Statistical operations on a selected column such as Sum,
Minimum, Maximum, etc.
Refer to Chapter 8, Section 3 Transform Ribbon Tab Statistics for details.
8.73 Standard This will perform Standard operations on a selected column such as Add,
Multiply, Subtract, etc. Refer to Chapter 8, Section 3 Transform Ribbon Tab
Standard for details.
8.74 Scientific This will perform Scientific operations on a selected column such as Absolute
Value, Power, Square Root, etc.
Refer to Chapter 8, Section 3 Transform Ribbon Tab Scientific for details.
8.75 Trigonometry This will perform Trigonometry operations on a selected column such as Sine,
Cosine, etc. Refer to Chapter 8, Section 3 Transform Ribbon Tab
Trigonometry for details.
8.76 Rounding This will Round whole numbers on a selected column such as Round Up, Round
Down, etc.
Refer to Chapter 8, Section 3 Transform Ribbon Tab Rounding for details.
8.77 Information This will create a New Column using the words True or False depending on the
option chosen.
Refer to Chapter 8, Section 3 Transform Ribbon Tab Information for
details.
8.78 Date This will change the format of a Date column to Year, Month, Quarter, etc.
Refer to Chapter 8, Section 3 Transform Ribbon Tab Date for details.
8.79 Time This will change the look of a Time value to Hour, Minute, Second, etc.
Refer to Chapter 8, Section 3 Transform Ribbon Tab Time for details.
8.80 Duration This will format a Duration field to Days, Minutes, Total Seconds, etc.

Refer to Chapter 8, Section 3 Transform Ribbon Tab Duration for details.

Page 123
Chapter 8 - Query Editor

Section 5 - View Ribbon Tab


The View Ribbon Tab on the Query Editor interface is used to toggle whether certain panes or windows
are displayed. It is also used to display the Advanced Editor. The following image shows
the View Ribbon Tab:

Concept Explanation / Command String in italic.


8.81 Query Settings The Query Settings will be displayed on the right side
of the screen and contain two major options:
Properties - The most important part of Properties is to
rename the Query.
Applied Steps - Whenever you add a Query step or
the filter in the Query Editor, it is inserted into the
sequence of steps located in the Query
Settings/Applied Steps. Usually, steps are added at the
end of the sequence, but if you add a step anywhere
other than at the end of the flow, you should verify
that all the subsequent steps function properly. The
following is an example of the Applied Steps located
on the right side of the screen.

8.82 Formula Bar This will display the Formula Bar similar to the Excel Formula Bar. It will allow
you to see the code that is being used to build each step in the Query
Settings/Applied Steps. The equation is using the M Language to transform the
data and the drop-down arrow located on the right side of the Formula Bar is
used to expand the Formula Bar to view more code.

8.83 Monospaced This displays data using a Monospaced Font which is a lighter gray shade.
The following will show the differences:
Monospace unchecked:

Monospace Checked:

8.84 Show This displays white space in the background. In some Excel versions, this has no
Whitespace apparent effect.
8.85 Go To Column This will find a column located in large tables. Refer to:
Home Ribbon Tab Choose Column for a detailed explanation.

Page 124
Chapter 8 - Query Editor

8.86 Always Allow Checking this will always allow parameterization in the data source and
transformation dialogs. This is not checked by default. Therefore, if you
encounter problems with parameters and prompts, this may correct the problem.
8.87 Advanced The Advanced Editor is where filtering steps are stored in a text layout using the
Editor Query Formula Language. It is often referred to as the M Program Language.
Refer to Home Ribbon Tab Advanced Editor for a detailed explanation.
8.88 Query The Query Dependencies button displays how multiple tables are related
Dependencies together. Often times, this is done automatically. The Query Dependencies button
will display the following screen: View Ribbon Tab Query Dependencies.

Layout - The following layouts are available:


Zoom In/Out -
This will scale the Query Dependencies
larger/smaller.
Fit to Screen - When you scale in, the Query may
disappear off the viewable screen. This will fit everything into the viewable area.
Reduce Viewable Screen - If you hold the cursor on the bottom of the screen, a
line with arrows on each side will appear. This will allow you to reduce the
viewable area.
Practice Exercise 153
1. In Power BI Desktop: New Source Dropdown Excel
C:\Data\PowerBI-2\BikeDB1.xlsxOpen.
2. Select all 4 Tables:

 .
3. In Query Editor: View Ribbon Tab Query Dependencies.

4. Test it: Use the following to adjust the diagram: Reduce Viewable Area, Fit to
Screen, Zoom In/Out, and the different layouts.

Page 125
Index - Power BI Desktop
Conditional Format Group ............................ 63 Edit Queries................... 29
Advanced Filtering........ 53 Page Level Filters.......... 55 From File ....................... 31
Conditional Column .... 121 Report level Filters ........ 55 From Store..................... 31
Conditional Formatting See Records ................... 63 Get Data .................. 25, 28
Background Text........... 75 Show Data ..................... 60 Get Data Overview .......... 7
Bar Charts ..................... 77 Show Next Level........... 60 Image ............................. 31
Data Bars....................... 77 TopN Filter.................... 54 Left Pane ....................... 27
Font Color ..................... 77 Visual Hierarchy ........... 58 Load........................... 7, 26
Logic Condition ............ 76 Visual Level Filters ....... 54 Manage Relationships ... 32
Multiple Rules............... 78 Format New Column ................. 32
Remove ......................... 76 Align ............................. 71 New Measure ................ 32
Contextual Ribbons ... 8, 10, Background ................... 68 New Page ...................... 30
12 Border ........................... 68 New Visual .................... 30
Dashboard Development Bring Forward ............... 70 Overview ......................... 7
Guidelines ...................... 6 Conditional Format ....... 75 Partner Showcase .......... 30
Data View Data Colors ................... 67 Publish ........................... 32
Data Category ............... 84 Data Labels ................... 68 Recent Sources .............. 29
Data Type ...................... 83 Date Style ...................... 73 Refresh Preview ............ 29
Data View Overview..... 10 Date Type ...................... 73 Right Pane ..................... 27
Default Summarize ....... 84 Distribute....................... 71 Shapes ........................... 31
Edit Groups ................... 86 Duplicate Report ........... 74 Text Box ........................ 30
Format ........................... 83 Edit Interactions ............ 70 Undo/Redo Ribbon........ 28
Home Table................... 84 Format ........................... 66 History of Power BI .......... 5
Manage Relationships ... 81 Format Overview .......... 16 Power BI Desktop .............. 5
Manage Roles................ 85 Format Painter ............... 74 Power BI Web Service ...... 5
New Column ................. 82 General .......................... 66 Publish
New Group .................... 85 Legend........................... 66 Dashboard ..................... 18
New Measure ............... 81 Lock aspect ................... 68 Open Dashboard ............ 18
New Table ..................... 82 Page Background .......... 69 Publish ........................... 17
Sort By Column ............ 82 Page Information ........... 69 Publish To Web ............. 18
View As Roles .............. 85 Page Size ....................... 69 Web Service .................. 17
Filter Page View ..................... 72 Query Add Column Ribbon
Advanced Filtering........ 53 Phone Layout ................ 72 Column From Examples
Basic Filtering ............... 52 Plot Area ....................... 68 ................................. 120
Customize Buttons ........ 62 Revert To Default.......... 66 Conditional Column .... 121
Data Categories ............. 57 Send Backwards ............ 70 Date ............................. 123
Drill Down .................... 61 Show Gridlines.............. 72 Duplicate Column ....... 122
Drill Through ................ 61 Snap Objects To Grid .... 73 Duration....................... 123
Drill Up ......................... 61 Title ............................... 68 Extract ......................... 123
Edit Interactions ............ 58 X-Axis ........................... 67 Format ......................... 123
Edit Interactions Filter .. 59 Y-Axis ........................... 67 Index Column .............. 122
Edit Interactions Highlight Get Data Information.................. 123
.................................. 59 Access Error .................. 28 Invoke Custom Column
Edit Interactions None .. 59 Center Pane ................... 27 ................................. 121
Expand Next Level ....... 60 Clipboard Ribbon .......... 28 Invoke Custom Function
Filter Edit View............. 51 Data source.................... 26 ................................. 121
Filters Overview............ 15 Edit ............................ 7, 26 Merge Column ............ 123

Page 127
Index - Power BI Desktop

Parse ............................ 123 Group By ..................... 111 Card Summaries ............ 44


Rounding ..................... 123 Information.................. 117 Chart Tiles ..................... 34
Scientific ..................... 123 Merge Columns ........... 115 Clustered Bar Chart ....... 39
Standard ...................... 123 Move ........................... 114 Clustered Column.......... 39
Statistics ...................... 123 Parse ............................ 116 Contextual Ribbons ....... 22
Time ............................ 123 Pivot Column .............. 113 Create A Report............. 34
Trigonomery ............... 123 Rename........................ 112 Date Slicer ..................... 46
Query Editor Replace Values............ 113 Donut Chart ................... 42
Advanced Editor ......... 102 Reverse Rows.............. 112 Field List ....................... 12
Append Queries .......... 109 Rounding ..................... 117 Filled Map ..................... 43
Applied Steps ................ 95 Run R Script ................ 119 Focus Mode ................... 36
By Group..................... 106 Scientific ..................... 117 Funnel............................ 44
Center Pane ................... 94 Split Columns .............. 115 Gauge ............................ 44
Choose Columns ......... 102 Standard ...................... 116 Hide Field ...................... 35
Close And Apply............. 8 Statistics ...................... 116 Image ............................. 36
Combine Files ............. 109 Structured Column ...... 119 Import Custom Visual ... 49
Data Type .................... 107 Time ............................ 118 KPI ................................ 46
Edit Query ....................... 8 Transpose .................... 112 Line Chart...................... 40
Keep Rows .................. 103 Trigonomery................ 117 Line/Clustered Col ........ 41
Left Pane ....................... 94 Unpivot Columns ........ 114 Line/Stacked Column .... 41
Manage........................ 102 Use First Row / Header112 Location/Map Tiles ....... 34
Manage Parameters ....... 99 Query View Ribbon Map ............................... 43
Merge Queries............. 108 Advanced Editor ......... 125 Matrix ............................ 48
Permissions ................... 98 Always Allow ............. 125 Modeling Roles ............. 37
Properties .............. 94, 101 Formula Bar ................ 124 More Options ................ 36
Query Interface ............... 8 Go To Column ............ 124 Multi-Row Card ............ 45
Refresh Preview .......... 101 Monospaced ................ 124 Phone Layout ................ 37
Remove Columns ........ 103 Query Dependencies ... 125 Pie Chart ........................ 42
Remove Rows ............. 104 Query Settings ............. 124 R Script Visual .............. 49
Replace Values............ 107 Show Whitespace ........ 124 Report Handles .............. 36
Sort .............................. 104 Relationships View Scatter Chart .................. 42
Split Column ............... 104 Auto-Relationships.. 11, 90 Shapes ........................... 37
Use First Row / Header107 Language ....................... 91 Slicer Defaults ............... 47
Query Home Ribbon Manage Relationship..... 11 Stacked Area Chart ....... 40
Change Source .............. 97 Manage Relationships ... 91 Stacked Bar Chart ......... 38
Data Source Settings ..... 97 Manage Roles................ 91 Stacked Column Chart .. 39
Load&Close .................. 96 Relationships Button11, 89 Table.............................. 48
New Source ................... 96 Synonyms ...................... 91 Table Summaries ........... 48
Recent Sources .............. 96 Table Relationships ....... 11 Text Box ........................ 36
Query Transform Ribbon View As Roles .............. 91 ToolTip.......................... 36
Convert To List ........... 114 Story ................................... 6 Treemap......................... 43
Count Rows................. 112 Visual Reports Unhide Field .................. 36
Data Type .................... 112 100% Stacked Bar ......... 39 Value Calculation .......... 37
Date ............................. 118 100% Stacked Column .. 40 Visuals/Reports/Tiles ... 12,
Detect Data Type ........ 112 ArcGIS Maps ................ 49 34
Duration ...................... 119 Area Chart ..................... 40 Waterfall Chart .............. 41
Extract ......................... 115 Bucket ..................... 12, 34 Well ......................... 12, 34
Fill ............................... 113 Card ............................... 44
Format ......................... 115 Card Measures............... 45

Page 128
Introducing The New Comprehensive Excel
Step-By-Step Training Guide and Workbook
Available on Amazon.com or CreateSpace.com
(Search for author, Jeff Hutchinson)
Available in Paperback: $19.95.
Available in Kindle eBook: $9.95.
This Comprehensive workbook combines all individual courseware
in to one easy to read the guide:
Formulas, Formatting, and Printing
Worksheets, Columns/Rows, Sum/Average, and AutoFill.
Formulas, Charts And PivotTables
Intermediate Formulas include Date, Text, If Logic, and Vlookups.
Advanced Features
Protection, Validation, Conditional Formatting, and Analysis.
Advanced PowerPivot Add-Ins
Advanced PivotTables, PowerView, PowerQuery, and PowerMap.
Goto: www.createspace.com/7593243 Evaluation copy: www.elearnlogic.com/courseware.html

Introducing Individual Excel Courseware


A Step-By-Step Training Guide And Workbook For Specific Topics
Available in Paperback: $9.95 or Kindle eBook: $5.95

www.createspace.com/7527770 www.createspace.com/7527862 www.createspace.com/7527941 www.createspace.com/7528032


These Step-By-Step Training Guides provide specific Excel concepts,
including brief descriptions, as well as many short 2-5 minute exercises for
practice. The Table of Contents and Index will allow students to look up
desired concepts quickly and easily. These guides are invaluable resources to
build and maintain Excel skills for industry, as well as for personal use.
About the Author www.createspace.com/7826938

Jeff Hutchinson is a corporate computer trainer and consultant and teaches


Microsoft and Adobe products from beginning to advanced topics. He has a BS
degree from BYU in Computer-Aided Engineering Jeff also owned a computer
training and consulting firm in San Francisco, CA for several years. He currently
works as an independent computer instructor and the books are based on the topics
taught. Contact: Jeff Hutchinson, jeffhutch@elearnlogic.com (801) 376-6687.

Page 129

You might also like