Professional Documents
Culture Documents
Microsoft Power BI Desktop (Level 2)
Microsoft Power BI Desktop (Level 2)
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.
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
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
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
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
3. Sort by :
Locate the Label Sort Ascending
Page 8
Chapter 1 - Power BI Process Overview
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
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
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
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.
Page 12
Chapter 1 - Power BI Process Overview
Page 13
Chapter 1 - Power BI Process Overview
Page 14
Chapter 1 - Power BI Process Overview
Page 15
Chapter 1 - Power BI Process Overview
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
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:
PublishPublish
to Power BI
2. Login to Power BI Service
3. Success Status
Or https://powerbi.microsoft.com/en-us/landing/signin/
Page 17
Chapter 1 - Power BI Process Overview
1.27 Publish To
Web
File menu Publish to web.
Practice Exercise 20 1. Expand the My Workspace link:
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:
Page 19
Chapter 1 - Power BI Process Overview
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
Page 20
Chapter 1 - Power BI Process Overview
9. The end result of the QtrSales Table will look like the following:
Page 21
Chapter 1 - Power BI Process Overview
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.
Page 22
Chapter 1 - Power BI Process Overview
Default Color .
To change the color of each bar: Show all On: .
2. Format the Font Color.
TitleFont Color .
3. Format the Border.
Border .
4. Format the Table Report:
Select the Table FormatTotalsText Size: .
Page 23
Chapter 1 - Power BI Process Overview
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.
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
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.
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
ExcelC:\Data\PowerBI-2\BikeDB1.xlsxOpen.
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.accddOpen.
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
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 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.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 TextBoxDraw 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
ImageC:\Data\PowerBI-2\Background.png.
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%.
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.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.
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.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.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.
Page 37
Chapter 3 - Visual Reports
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
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.
Page 40
Chapter 3 - Visual Reports
Tip: You will need a text field and two numeric fields.
Page 41
Chapter 3 - Visual Reports
Page 42
Chapter 3 - Visual Reports
Page 43
Chapter 3 - Visual Reports
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 buttonDisplayDisplay 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
Page 45
Chapter 3 - Visual Reports
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
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 TabOptions and settingsOptionsPreview Features
2. You will be asked to restart Power BI and will receive the following
message:
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 TabOptions and
settingsOptionsPreview Features
Page 47
Chapter 3 - Visual Reports
Page 48
Chapter 3 - Visual Reports
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):
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
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.xlsxChoose all 4 TablesLoad.
Page 52
Chapter 4 - Filter Report
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
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.
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:
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:
Page 55
Chapter 4 - Filter Report
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 TabData Category
Page 57
Chapter 4 - Filter Report
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 TabEdit 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
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.
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
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:
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.
Page 61
Chapter 4 - Filter Report
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 TabImage
Black Back button.gifOpen.
4. Select Image and display the format the link properties to back.
Format Properties: LinkPage1.
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
chartChoose the See Records.
Method 2 - Select the desired chartTurn on
the See Records Icon in the Data/Drill
Ribbon TabDouble 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:
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.xlsxOpen.
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
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
Page 66
Chapter 5 - Format Report
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.
5.13 Lock Aspect This will force the report to be symmetrical. When you
move the X-Axis, the Y-Axis will move evenly.
Practice Exercise 76 Test the formatting features above on the chart created from the previous practice
exercise.
Page 68
Chapter 5 - Format Report
Practice Exercise 78 Test the Page Formatting feature using the previous practice exercise.
Page 69
Chapter 5 - Format Report
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
Page 70
Chapter 5 - Format Report
After
Practice Exercise 81 Move several reports so they are misalignedSelect multiple reports by using
Alignment the Ctrl KeyFormat Ribbon TabAlignAlign 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 themSelect
Distribute multiple reports by using the Ctrl KeyFormat Ribbon Tab
DistributeDistribute horizontally.
Page 71
Chapter 5 - Format Report
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 TabPhone LayoutDrag 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.
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 TabOpen
Open C:\Data\PowerBI-2\Visual Reports3.pbixOpen 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 TabFormat 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 TabFormatting dropdown
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 reportHome Ribbon TabCopyPaste.
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 iconTurn Background On
Make the following adjustments:
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.
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 DataClick * 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 areaAdd 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
Enter the following below:
Page 76
Chapter 5 - Format Report
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.
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
Axis:
Value:
Color Saturation:
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:
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
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:
Page 81
Chapter 6 - Data View
Practice Exercise 98 In Data View: Home Ribbon Tab New MeasureEnter 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 VisualDrag 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 ColumnEnter 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 iconenter 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.
Page 82
Chapter - BI
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 columnModeling Ribbon Tab
Data Type dropdownText: .
Notice the Year field is now left justified as a text data
type.
3. Select the Year columnModeling Ribbon Tab
Data Type drop-downWhole 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
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. CreateRoles: Country
3. Tables: Financial . . . Add Filter[Country].
4. Change the word Value to a country: [Country] = “Canada”
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 SelectGroup Button.
Page 85
Chapter 6 - Data View
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
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
Page 89
Chapter 7 - Relationships
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 .
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
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.
Page 93
Chapter 8 - Query Editor
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
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 SourceMore . . . Access Database
C:\Data\PowerBI-2\Northwind 2008.accddOpen.
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.accddOpen
Choose the Customers TableLoad .
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.
4. OKClose.
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.
Page 98
Chapter 8 - Query Editor
Choose Parameter
Ok
6. Refresh:Home Ribbon Tab Refresh Preview dropdown Refresh All.
Page 99
Chapter 8 - Query Editor
11. Delete the Parameter: In Query Editor: Select the Filter drop-down
in the Discount Brand Field Clear Filter .
12. Home Ribbon TabManage Parameter drop-downManage Parameter
Page 100
Chapter 8 - Query Editor
OKClose.
Page 101
Chapter 8 - Query Editor
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
screenHome Ribbon TabManageDuplicate.
3. Delete Query Name: Select the Duplicated Query name located on the left
side of the screenHome Ribbon TabManageDelete.
Tip: You can also Right-Click on the Duplicate NameDelete.
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
Page 102
Chapter 8 - Query Editor
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 20Name: Table1Ok.
2. Select Table1Home Ribbon Tab Remove Rows
Remove Alternate RowsEnter 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
Ok.
4. Split Columns: Select the Merged columnHome Ribbon Tab
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:
Ok
4. The result will group and count all the records in the field.
Page 106
Chapter 8 - Query Editor
.
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 TabReplace Value.
Page 107
Chapter 8 - Query Editor
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.xlsxSelect:
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
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 DataMore. . .Folder
.
4. Enter the folder path: Browse
Page 109
Chapter 8 - Query Editor
Choose
Select the Financial table
Page 110
Chapter 8 - Query Editor
4. Edit
This will open the Query Editor.
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.
Page 112
Chapter 8 - Query Editor
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 columnTransform 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
Ok.
This will list the Discount Brand fields in the column and compare all records to
None, Low, Medium, and High.
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 ColumnTransform 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 TabManage Drop Down ArrowDuplicate.
Page 114
Chapter 8 - Query Editor
8.46 Split Columns This will Split a single Column into two columns.
Refer to Home Ribbon TabSplit 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
Page 115
Chapter 8 - Query Editor
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:
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) columnTransform Ribbon Tab
Standard dropdownAdd(Enter the following value):
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
Result .
4. Transform Ribbon Tab InformationIs Even.
Before: After:
Page 118
Chapter 8 - Query Editor
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
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
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 TabCustom Column
(use the Available columns on the right to spell the column names properly):
Page 121
Chapter 8 - Query Editor
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:
Page 122
Chapter 8 - Query Editor
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.
Page 123
Chapter 8 - Query Editor
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.
.
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
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
Page 129