Power BI Desktop: Sample Manual - First Two Chapters
Power BI Desktop: Sample Manual - First Two Chapters
4.5 Relationships 41
The Need for Relationships 41
Parent-Child Relationships 41
Creating a Relationship 42
Editing Relationships 42
The Effect of Relationships 43
Cross-Filter Direction 43
7.6 Themes 65
Multiple Fields in Line Charts 112 19.1 What are Custom Visuals? 134
Line Formatting 113 19.2 Adding Custom Visuals 135
Secondary Axes 114
Pinning Custom Visuals 135
Combination Charts 114
Area Charts 115 19.3 Working with Custom Visuals 136
14.2 Pie, Donut and Treemap Charts 116 Applying a Custom Visual 136
Removing Custom Visuals 136
Formatting Pie and Donut Charts 116
28 PUBLISHING Page
28.1 Overview of Publishing 205
28.2 An Infinite Number of Variables 206
Your Power BI Licence 206
Linking to Data 206
Data Sources 207
Power BI Desktop is a standalone software application from Microsoft which allows you to load data
into a model, and then create pretty reports like this:
There are two ways to install Power BI, depending on whether you want to get automatic monthly
updates.
Wise Every month Power BI will update automatically as Microsoft release new features.
Owl’s The best way to keep track of what these new features entail is to subscribe to the
Hint Wise Owl newsletter. This goes out at the start of each month and (among other
things) summarises and explains any new updates to Power BI.
This chapter describes the basic workflow you’ll use to build a report in Power BI Desktop:
Stage Details
Loading and Loading one or more tables from various data sources, cleansing the data and
transforming data linking the tables together if necessary.
Creating a report Using the data that you’ve loaded to create a report, including visuals like charts.
Publishing this Publishing the results to your report server (usually Microsoft’s Power BI Service)
so that other people can view your reports.
You’ll find much more detail on the ideas mentioned in this chapter in later parts of this courseware.
To demonstrate the basic process of building a report, we’ll import a table of data from a webpage
and create and publish a report based upon this:
We’ll then present this data using visuals such as this chart:
You can create a new report in Power BI Desktop in the following ways:
You can open and save files using options in the File menu:
c) Click on this button to find the d) Files that you save in e) Click on this button to open
folder which contains (or will Power BI Desktop will have the report you’ve chosen or
contain) your report. a pbix extension. to save this report
Wise Every time you open a Power BI Desktop report a new instance of the application
Owl’s will launch, leaving the current report you’re working on unaffected. To close a report
Hint you must close down the Power BI Desktop application containing it (there is no
option to close a report but still leave Power BI Desktop running).
The most important components of the Power BI Desktop screen are as follows:
These tools allow you to switch between This is the Power You can use the Pane Switcher to change
the 3 main views in Power BI Desktop: BI Desktop menu what to look at. The two main views are
Report view, Table view and Model view. and ribbon. Data and Format, as explained below.
These tools allow you to switch between You can use the slider to zoom in and out, although you
designing reports for viewing on desktop may find it easier to hold down the Ctrl key and use your
computers or mobile phones. mouse wheel instead.
Switching Panes
You can use the icons on the right-hand side of your Power BI screen to choose what to show:
You can also use these tools on the View tab of the
Power BI Desktop ribbon to choose what you want to
view.
You can switch between the three views of a report using the tools on the left of the screen:
Wise The 4th icon – if present – allows you to create queries in DAX to interrogate the data
Owl’s
Hint
upon which your report is based, but this is definitely not something to consider in
this courseware chapter!
a) From the ribbon, choose Home | Get Data then choose a type of
data source. Here we’re choosing a Web source.
You can optionally rename a table after importing it into your report:
You’ll often need to make changes to the data you have imported so that it can be presented easily
in visuals. This process is known as transforming data.
Wise
Owl’s As with everything else in this chapter, we will go into this topic in much more detail
Hint later in this courseware.
Each table that you import into a report generates a query which tells Power BI Desktop which data
to get (and how to get it). You can edit these queries in (at least) 3 different ways:
You can right-click on a table in the Fields pane and choose Edit
query…
…or you can choose this option from the Home tab of the ribbon
(although it says it’s doing something different, transforming data and
editing a query are actually the same thing!).
Alternatively, you could click on this button at the point at which you’re
first loading data to go directly into the Power BI Query Editor.
Choosing to edit a query as described above opens the Power Query Editor tool within Power BI
Desktop.
Wise This program to edit Power BI queries has gone by many names in the past! This
Owl’s courseware will call it Query Editor, although this name seems to have been
Hint abandoned by Microsoft. Little known fact: everything that you can do using Query
Editor in Power BI Desktop you can also do when getting data in Excel.
For our example the first thing you need to do is to make the first row your table headers:
b) Query Editor will add two steps: one to promote your row headers (as
requested), and then another to change the data types of the columns
following this step. Query Editor will often insert silent additional steps like
this to second-guess your intentions, and (to be fair) nearly always gets
these right.
Replacing Values
To allow us to average snowfalls for our data we need to remove the cm suffices then convert the
resulting data to integer numbers:
Removing Columns
Finally, we’re not interested in the last snowfall depth, so we’ll remove this column.
Visuals are the tables, charts or other gizmos which display the data in your report. There are many
types of visual ( you’ll learn a lot more about them in later chapters of this courseware).
Inserting a Visual
a) Make sure that you’re in Report view, otherwise you won’t be able to add
visuals!
b) Click on the side bar to the right of the visuals pane (this appears on both
the Home tab and the Insert tab of the ribbon).
b) Choose which visual you want to create. If you get this wrong,
you can always change it after creating your visual by clicking
here:
Once you have inserted a visual you can begin assigning fields to it:
You can assign numerical fields in the same way, then change how you want to aggregate them:
Much of your time in Power BI Desktop will probably be spent applying formatting like this:
In Situ Selection
There are a few parts of a chart that you can edit on the chart itself:
The parts of the chart you can edit directly are shown in red boxes.
When you double-click on any of these with the chart selected you will
be able to change the text displayed.
Wise
Owl’s The More options button is less useful than you might think: it just takes you to the
Hint Format pane on the right-hand side of Power BI Desktop.
You’ll spend much of your time in Power BI Desktop using the Format pane:
Wise As a short-cut, double-click on a visual to select any part of it that you want to format;
Owl’s
Hint
the relevant card will automatically then be selected in the Format pane.
When you’ve finished your report you will probably want to share it!
d) Choose to publish
to the default My
workspace (see
hint below for
more on this).
e) Click on this link to see your report in Power BI f) Your report as it will appear to the world
Service on the Internet (you may be asked to log in (provided of course that they have the right
to your account again at this point). security level and licence …).
Wise A (much) later chapter in this courseware will cover publishing in more detail,
Owl’s
Hint
including an explanation of workspaces (and why you might want to create them),
how to create dashboards and much more besides.
Microsoft
Excel ✓ ✓ ✓ ✓
VBA
✓ ✓ ✓ ✓
OFFICE
macros
365
Office
Scripts ✓ ✓
Microsoft
Access ✓
Power BI
and DAX ✓ ✓ ✓ ✓
PLATFORM
POWER
Power
Apps ✓ ✓
Power
Automate ✓ ✓ ✓ ✓
Reporting
Services ✓ ✓ ✓ ✓
Report
✓ ✓ ✓
SERVER
Builder
SQL
Integration
Services ✓ ✓ ✓ ✓
Analysis
Services ✓ ✓
SQL ✓ ✓ ✓ ✓
LANGUAGES
CODING
Visual C# ✓ ✓ ✓ ✓
Python ✓ ✓ ✓ ✓