Professional Documents
Culture Documents
Introduction to Power BI
Complete Course
CONTENTS
Getting Started
Section 1: Welcome..................................................................4
Section 2: Getting Started..................................................... 10
Connecting to Data
Section 3: Connecting to Text Files...................................... 30
Section 4: Connecting to Excel data..................................... 45
Section 5: Connecting to a Folder of Data............................ 65
Section 6: Connecting to Web Data...................................... 87
Section 7: Connecting to SQL Server.................................. 104
Data Wrangling
Section 8: Splitting and Combining..................................... 123
Section 9: Extracting text..................................................... 135
Section 10: Transforming report data................................. 143
Section 11: Combining tables............................................. 159
Data Modelling
Section 12: Data Modelling Essentials............................... 175
Section 13: Creating Fact and Dim Tables......................... 195
Section 14: Date Tables....................................................... 213
Section 15: Relationships.................................................... 235
Section 16: Hierarchies and Groups................................... 254
-1-
CONTENTS
DAX Formulas
Section 17: Calculated Columns......................................... 277
Section 18: Calculated Tables............................................. 297
Section 19: Measures.......................................................... 312
Section 20: The CALCULATE Function............................... 336
Section 21: DAX Time Intelligence Functions.................... 350
Visualization
Section 22: Big Picture visuals............................................ 374
Section 23: Drill-Down and Drill-Through............................ 389
Section 24: Further Visualization Practice......................... 414
Section 25. Dynamic Titles & Conditional Formatting....... 430
-2-
Getting Started
-3-
Section 1: Welcome
-4-
Section 1: Welcome
combine all the files inside the folder into a single table.
You’ll also learn how to Connect to data on websites and how to scrape data
from the web page itself.
And, naturally, you’ll get plenty of practice in connecting to Power BI’s most
frequent data partner: SQL Server. You’ll learn how to work in import, Di-
rectQuery and composite modes and how to retrieve data from both views
and database tables, as well as by executing SQL statements.
-5-
Section 1: Welcome
-6-
Section 1: Welcome
Having created a data model, our next group of sections focuses on using the
DAX language to add insights and enhancements.
We’ll look at the three types of calculation which you can create using the
DAX language:
Calculated columns
Calculated tables
And measures
And we’ll get to grips with the most important function in the DAX language:
the CALCULATE function.
And we’ll end the section by looking at DAX time intelligence functions which
enable you to compare calculations based on different time periods, to pro-
vide such insights as year-on-year growth and year to date sales.
-7-
Section 1: Welcome
Once we have built our data model, we’ll move on to the next phase in the
Power BI development cycle: visualization and report creation.
We’ll start with what I like to call the big-picture visuals, those which give your
audience with key metrics at a glance. As you’ll see in this section Power BI
has three big picture visuals: the card, the KPI visual and the gauge.
Then you’ll learn how the hierarchical structures within the data model can be
exposed to your users by enabling them to drill down into data which has a
parent-child and drill-through from a overview page to a page which focuses
on a particular item displayed in the overview.
And, of course, we’ll talk about many other visuals and visualization tech-
niques as we work through these sections.
We’ll even look at using DAX measures to enhance the user experience by
making titles change dynamically as users interact with them.
-8-
Section 1: Welcome
entire organisation.
And, in our section on Power BI mobile, you’ll learn how to create reports and
dashboards which are optimised for mobile viewing.
And we’ll end our collaboration and sharing section by discussing the prin-
cipal mechanism used in Power BI for refreshing data to keep it in sync with
changes made to the original data sources: namely, on premises data gate-
way.
So, as you can see this course covers a lot of ground; there’s a lot to learn and
a lot to remember.
That’s why each of the thirty sections in this course starts with an overview
and ends with a section summary which recaps the key topics covered and
reminds you where these techniques fit into the overall Power BI cycle.
So, basically, you always know where you are within the grand scheme of all
things Power BI.
-9-
Section 2: Getting Started
Section
Summary
- 10 -
Section 2: Getting Started
Section
Summary
- 11 -
Section 2: Getting Started
- 12 -
Section 2: Getting Started
- 13 -
Section 2: Getting Started
Power BI Service
Dashboards
- 14 -
Section 2: Getting Started
- 15 -
Section 2: Getting Started
- 16 -
Section 2: Getting Started
Optimized Reports
- 17 -
Section 2: Getting Started
Section
Summary
- 18 -
Section 2: Getting Started
- 19 -
Section 2: Getting Started
Tenant Location
- 20 -
Section 2: Getting Started
- 21 -
Section 2: Getting Started
Section
Summary
- 22 -
Section 2: Getting Started
- 23 -
Section 2: Getting Started
- 24 -
Section 2: Getting Started
Free or Pro
- 25 -
Section 2: Getting Started
- 26 -
Section 2: Getting Started
Power BI Premium
• Unlike the Power BI Pro and Free licenses, Power BI Premium
is a tenant-level subscription available in various capacity
configurations.
• Power BI Premium provides organizations with dedicated
capacities, in contrast to the shared capacity model, where
Power BI resources are shared by multiple organizations.
• Even if an organization
purchases Power BI Premium,
content creators (people who
are creating reports,
dashboards and apps) will still
need to have a Power BI Pro
license.
- 27 -
Section 2: Getting Started
- 28 -
Connecting to Data
- 29 -
Section 3: Connecting to Text Files
- 30 -
Section 3: Connecting to Text Files
- 31 -
Section 3: Connecting to Text Files
- 32 -
Section 3: Connecting to Text Files
- 33 -
Section 3: Connecting to Text Files
- 34 -
Section 3: Connecting to Text Files
- 35 -
Section 3: Connecting to Text Files
- 36 -
Section 3: Connecting to Text Files
- 37 -
Section 3: Connecting to Text Files
- 38 -
Section 3: Connecting to Text Files
- 39 -
Section 3: Connecting to Text Files
- 40 -
Section 3: Connecting to Text Files
• When configuring the map visual, the Size data field can
be used to link the size of the hotspots to any numeric
value.
• Just drag the appropriate field or measure into the Size
data field.
- 41 -
Section 3: Connecting to Text Files
- 42 -
Section 3: Connecting to Text Files
• On a bar chart, both the axis titles and the axes themselves
can be switched off.
• Data labels are often a good replacement for the X axis.
- 43 -
Section 3: Connecting to Text Files
- 44 -
Section 4: Connecting to Excel data
- 45 -
Section 4: Connecting to Excel data
- 46 -
Section 4: Connecting to Excel data
- 47 -
Section 4: Connecting to Excel data
- 48 -
Section 4: Connecting to Excel data
- 49 -
Section 4: Connecting to Excel data
- 50 -
Section 4: Connecting to Excel data
- 51 -
Section 4: Connecting to Excel data
- 52 -
Section 4: Connecting to Excel data
- 53 -
Section 4: Connecting to Excel data
- 54 -
Section 4: Connecting to Excel data
- 55 -
Section 4: Connecting to Excel data
- 56 -
Section 4: Connecting to Excel data
- 57 -
Section 4: Connecting to Excel data
- 58 -
Section 4: Connecting to Excel data
- 59 -
Section 4: Connecting to Excel data
- 60 -
Section 4: Connecting to Excel data
- 61 -
Section 4: Connecting to Excel data
- 62 -
Section 4: Connecting to Excel data
- 63 -
Section 4: Connecting to Excel data
- 64 -
Section 5: Connecting to a Folder of Data
- 65 -
Section 5: Connecting to a Folder of Data
- 66 -
Section 5: Connecting to a Folder of Data
- 67 -
Section 5: Connecting to a Folder of Data
- 68 -
Section 5: Connecting to a Folder of Data
- 69 -
Section 5: Connecting to a Folder of Data
- 70 -
Section 5: Connecting to a Folder of Data
- 71 -
Section 5: Connecting to a Folder of Data
- 72 -
Section 5: Connecting to a Folder of Data
- 73 -
Section 5: Connecting to a Folder of Data
The Team
- 74 -
Section 5: Connecting to a Folder of Data
- 75 -
Section 5: Connecting to a Folder of Data
- 76 -
Section 5: Connecting to a Folder of Data
- 77 -
Section 5: Connecting to a Folder of Data
- 78 -
Section 5: Connecting to a Folder of Data
- 79 -
Section 5: Connecting to a Folder of Data
- 80 -
Section 5: Connecting to a Folder of Data
- 81 -
Section 5: Connecting to a Folder of Data
- 82 -
Section 5: Connecting to a Folder of Data
- 83 -
Section 5: Connecting to a Folder of Data
- 84 -
Section 5: Connecting to a Folder of Data
• To
T preserve existing
i i formatting,
f i visuals
i l can be
duplicated by highlighting the original and typing
Control-C followed by Control-V.
- 85 -
Section 5: Connecting to a Folder of Data
- 86 -
Section 6: Connecting to Web Data
- 87 -
Section 6: Connecting to Web Data
- 88 -
Section 6: Connecting to Web Data
The Team
- 89 -
Section 6: Connecting to Web Data
The Team
Data Gateway
On-prem Data
- 90 -
Section 6: Connecting to Web Data
- 91 -
Section 6: Connecting to Web Data
- 92 -
Section 6: Connecting to Web Data
- 93 -
Section 6: Connecting to Web Data
Web Data
- 94 -
Section 6: Connecting to Web Data
- 95 -
Section 6: Connecting to Web Data
• Th
The ttwo tables
t bl mustt have
h a common column.
l
• The common columns must contain the same type of data.
• One table must have unique values in the common column.
- 96 -
Section 6: Connecting to Web Data
- 97 -
Section 6: Connecting to Web Data
- 98 -
Section 6: Connecting to Web Data
- 99 -
Section 6: Connecting to Web Data
- 100 -
Section 6: Connecting to Web Data
- 101 -
Section 6: Connecting to Web Data
- 102 -
Section 6: Connecting to Web Data
- 103 -
Section 7: Connecting to SQL Server
- 104 -
Section 7: Connecting to SQL Server
- 105 -
Section 7: Connecting to SQL Server
The Team
Th T
- 106 -
Section 7: Connecting to SQL Server
The Team
- 107 -
Section 7: Connecting to SQL Server
The Team
- 108 -
Section 7: Connecting to SQL Server
- 109 -
Section 7: Connecting to SQL Server
- 110 -
Section 7: Connecting to SQL Server
- 111 -
Section 7: Connecting to SQL Server
The Team
- 112 -
Section 7: Connecting to SQL Server
- 113 -
Section 7: Connecting to SQL Server
- 114 -
Section 7: Connecting to SQL Server
- 115 -
Section 7: Connecting to SQL Server
No Query Folding
• Whenever you create a query by executing an SQL statement,
no query folding at all will occur.
• Whatever transformational steps you perform will always be
done using the M language and not converted into SQL.
- 116 -
Section 7: Connecting to SQL Server
- 117 -
Section 7: Connecting to SQL Server
- 118 -
Section 7: Connecting to SQL Server
•• Composite
Composite mode
mode is
is aa variant
variant of
of DirectQuery
DirectQuery mode.
mode.
•• Composite
Composite mode is a variant of DirectQuery mode.
• Composite mode
mode is
is aa variant
variant of
of DirectQuery
DirectQuery mode.
mode.
•• Composite
You can mode is aDirectQuery
variant of DirectQuery mode.
• You can switch
Composite mode
switch from
is aDirectQuery
from to
to Composite
variant of DirectQuery mode,
mode, but
mode.
Composite but
not from
not from Import to
Importfrom Composite.
to Composite.
• You can switch DirectQuery to Composite mode, but
• You can switch from DirectQuery to Composite mode, but
not from Import to Composite.
not from Import to Composite.
•• Importing
Importing aa table
table or
or creating
creating aa DAX
DAX table
table will
will automatically
automatically
switch
switch a report
a report from
from DirectQuery
DirectQuery mode
mode to Mixed mode,
• Importing a table or creating a DAX tabletowill
Mixed mode,
automatically
• creating
Importing
creating a composite
a table or model.
creating a DAX table will automatically
switch a areport
composite model.
from DirectQuery mode to Mixed mode,
switch a report from DirectQuery
creating a composite model. mode to Mixed mode,
creating a composite model.
- 119 -
Section 7: Connecting to SQL Server
- 120 -
Section 7: Connecting to SQL Server
- 121 -
Data Wrangling
- 122 -
Section 8: Splitting and Combining
- 123 -
Section 8: Splitting and Combining
- 124 -
Section 8: Splitting and Combining
- 125 -
TrimSection 8: Splitting and Combining
and Clean
• The Trim command removes leading and trailing spaces from a
text column.
• The Clean command removes white space characters like tabs
and returns.
Trim and Clean
• To use these commands, either:
• The Trim command removes leading and trailing spaces from a
text column.
• Right-click the text column and choose Transform > Format >
Trim/Clean
• The Clean command
• In the removes
Ribbon, click white
Transform space
> Format characters like tabs
> Trim/Clean.
and returns.
• To use these commands, either:
• Right-click the text column and choose Transform > Format >
Trim/Clean
• In the Ribbon, click Transform > Format > Trim/Clean.
occurs.
by splitting text entries wherever the specified delimiter
- 126 -
• The Split Column by Delimiter command creates new columns
Section 8: Splitting and Combining
- 127 -
Section 8: Splitting and Combining
- 128 -
Section 8: Splitting and Combining
- 129 -
Section 8: Splitting and Combining
- 130 -
Section 8: Splitting and Combining
Merge Columns
• The merge columns command combines the selected
columns into a single column using the specified
“Separator”.
- 131 -
Section 8: Splitting and Combining
- 132 -
Section 8: Splitting and Combining
- 133 -
Section 8: Splitting and Combining
Data Type
• Using the Merge Columns command always generates a text
column. However, when using Add Column > Custom column,
you must manually specify the data type of the new column.
- 134 -
Section 9: Extracting text
- 135 -
Section 9: Extracting text
x x x x x
- 136 -
Section 9: Extracting text
First Characters
• Extract > First Characters returns the specified number of
characters from the start of a string and is equivalent to
Microsoft Excel's LEFT function.
- 137 -
Section 9: Extracting text
Last Characters
• The command Extract > Last Characters returns the specified
number of characters from the end of a string and is
equivalent to Excel's RIGHT function.
Range
• The command Extract > Range returns the specified number
of characters from the middle of a string and is equivalent to
Excel's MID function.
• When specifying the starting index, remember that, in the M
language, the first character position has an index of zero, not
one.
- 138 -
Section 9: Extracting text
- 139 -
Section 9: Extracting text
- 140 -
Section 9: Extracting text
- 141 -
Section 9: Extracting text
Replace Values
• The Replace Values command, which works in a similar way
to Find and Replace, can be used to iron out minor
discrepancies in the text being used as the delimiter.
- 142 -
Section 10: Transforming report data
- 143 -
Section 10: Transforming report data
Section
Summary
- 144 -
Section 10: Transforming report data
- 145 -
Section 10: Transforming report data
- 146 -
Section 10: Transforming report data
Section
Summary
- 147 -
Section 10: Transforming report data
- 148 -
Section 10: Transforming report data
- 149 -
Section 10: Transforming report data
- 150 -
Section 10: Transforming report data
Section
Summary
- 151 -
Section 10: Transforming report data
Pivoted Data
Unpivot Columns
- 152 -
Section 10: Transforming report data
Table.UnpivotOtherColumns
- 153 -
Section 10: Transforming report data
Section
Summary
- 154 -
Section 10: Transforming report data
The Team
- 155 -
Section 10: Transforming report data
REPT(<text>, <num_times>)
- 156 -
Section 10: Transforming report data
- 157 -
Section 10: Transforming report data
• The text font and background colours used in the table visual
can be changed on an individual column basis.
• In the Field Formatting section of the Format pane, choose a
column from the dropdown, then set the Font and
Background colours as required.
- 158 -
Section 11: Combining tables
- 159 -
Section 11: Combining tables
- 160 -
Section 11: Combining tables
- 161 -
Section 11: Combining tables
- 162 -
Section 11: Combining tables
- 163 -
Section 11: Combining tables
- 164 -
Section 11: Combining tables
- 165 -
Section 11: Combining tables
- 166 -
Section 11: Combining tables
- 167 -
Section 11: Combining tables
• With the Full Outer join kind, all rows from both tables will
be included in the output, with null values occurring
wherever there is no matching data in either table.
- 168 -
Section 11: Combining tables
• When the Inner join kind is specified, only rows where the
entry in the common column is present in both tables will
be included in the output.
- 169 -
Section 11: Combining tables
- 170 -
Section 11: Combining tables
- 171 -
Section 11: Combining tables
- 172 -
Section 11: Combining tables
- 173 -
Data Modelling
- 174 -
Section 12: Data Modelling Essentials
- 175 -
Section 12: Data Modelling Essentials
- 176 -
Section 12: Data Modelling Essentials
- 177 -
Section 12: Data Modelling Essentials
- 178 -
Section 12: Data Modelling Essentials
- 179 -
Section 12: Data Modelling Essentials
- 180 -
Section 12: Data Modelling Essentials
- 181 -
Section 12: Data Modelling Essentials
- 182 -
Section 12: Data Modelling Essentials
- 183 -
Section 12: Data Modelling Essentials
- 184 -
Section 12: Data Modelling Essentials
- 185 -
Section 12: Data Modelling Essentials
- 186 -
Section 12: Data Modelling Essentials
- 187 -
Section 12: Data Modelling Essentials
- 188 -
Section 12: Data Modelling Essentials
- 189 -
Section 12: Data Modelling Essentials
- 190 -
Section 12: Data Modelling Essentials
- 191 -
Section 12: Data Modelling Essentials
- 192 -
Section 12: Data Modelling Essentials
- 193 -
Section 12: Data Modelling Essentials
- 194 -
Section 13: Creating Fact and Dim Tables
- 195 -
Section 13: Creating Fact and Dim Tables
- 196 -
Section 13: Creating Fact and Dim Tables
• When connecting
to SQL Server from
Power BI, schemas
can also be used to
store views
optimized for use in
Power BI reporting.
- 197 -
Section 13: Creating Fact and Dim Tables
- 198 -
Section 13: Creating Fact and Dim Tables
• When importing data into Power from SQL Server, the most
efficient approach is to avoid connecting directly to the
tables in your relational database.
• Instead, create a series of views, each corresponding to
one of the tables which will be present in your data model.
• In Power BI, you then connect to these views rather than to
the original database tables.
• Connecting to views, rather than connecting to the
database tables protects your Power BI reports by creating
a buffer between your data models and any changes to the
database.
- 199 -
Section 13: Creating Fact and Dim Tables
- 200 -
Section 13: Creating Fact and Dim Tables
- 201 -
Section 13: Creating Fact and Dim Tables
- 202 -
Section 13: Creating Fact and Dim Tables
- 203 -
Section 13: Creating Fact and Dim Tables
- 204 -
Section 13: Creating Fact and Dim Tables
- 205 -
Section 13: Creating Fact and Dim Tables
- 206 -
Section 13: Creating Fact and Dim Tables
• To access this feature, in the Get Data > SQL Server dialog,
expand the “Advanced Options” section and ensure that
the “Include Relationship Columns” checkbox is active.
- 207 -
Section 13: Creating Fact and Dim Tables
- 208 -
Section 13: Creating Fact and Dim Tables
- 209 -
Section 13: Creating Fact and Dim Tables
- 210 -
Section 13: Creating Fact and Dim Tables
- 211 -
Section 13: Creating Fact and Dim Tables
- 212 -
Section 14: Date Tables
- 213 -
Section 14: Date Tables
- 214 -
Section 14: Date Tables
- 215 -
Section 14: Date Tables
- 216 -
Section 14: Date Tables
- 217 -
Section 14: Date Tables
- 218 -
Section 14: Date Tables
- 219 -
Section 14: Date Tables
• Create a reference
to the main fact
table query.
- 220 -
Section 14: Date Tables
- 221 -
Section 14: Date Tables
- 222 -
Section 14: Date Tables
- 223 -
Section 14: Date Tables
• Click Home > Advanced Editor and edit the definition of the
Source variable in the M code to read:
S ource L ist. N um bers E arliestDate, L atestDate E arliestDate 1
- 224 -
Section 14: Date Tables
- 225 -
Section 14: Date Tables
- 226 -
Section 14: Date Tables
- 227 -
Section 14: Date Tables
- 228 -
Section 14: Date Tables
• To filter the date table so that it maps to the earliest year and
latest year queries, choose Number Filters > Between from
the filter dropdown of the Year column of the imported date
table and enter any temporary numeric values in the “greater
than or equal to” and “less than or equal to” fields.
- 229 -
Section 14: Date Tables
DAX
- 230 -
Section 14: Date Tables
- 231 -
Section 14: Date Tables
- 232 -
Section 14: Date Tables
- 233 -
Section 14: Date Tables
- 234 -
Section 15: Relationships
- 235 -
Section 15: Relationships
- 236 -
Section 15: Relationships
- 237 -
Section 15: Relationships
- 238 -
Section 15: Relationships
- 239 -
Section 15: Relationships
- 240 -
Section 15: Relationships
- 241 -
Section 15: Relationships
- 242 -
Section 15: Relationships
- 243 -
Section 15: Relationships
The Team
• Choose the table which you want on the one side of the
relationship (usually a dim table) from the second dropdown.
- 244 -
Section 15: Relationships
- 245 -
Section 15: Relationships
- 246 -
Section 15: Relationships
- 247 -
Section 15: Relationships
• When the command Add Column > Custom Column is used, the
data type of the resulting column is left undefined. It is therefore
important to remember to set the data type of the new column.
- 248 -
Section 15: Relationships
- 249 -
Section 15: Relationships
- 250 -
Section 15: Relationships
- 251 -
Section 15: Relationships
- 252 -
Section 15: Relationships
- 253 -
Section 16: Hierarchies and Groups
- 254 -
Section 16: Hierarchies and Groups
- 255 -
Section 16: Hierarchies and Groups
- 256 -
Section 16: Hierarchies and Groups
• To create a hierarchy:
• In the Fields pane right-click on the parent field at the
top of the hierarchy and choose New Hierarchy.
• This creates a hierarchy object containing the parent
field.
- 257 -
Section 16: Hierarchies and Groups
- 258 -
Section 16: Hierarchies and Groups
- 259 -
Section 16: Hierarchies and Groups
- 260 -
Section 16: Hierarchies and Groups
- 261 -
Section 16: Hierarchies and Groups
- 262 -
Section 16: Hierarchies and Groups
- 263 -
Section 16: Hierarchies and Groups
- 264 -
Section 16: Hierarchies and Groups
The Team
- 265 -
Section 16: Hierarchies and Groups
- 266 -
Section 16: Hierarchies and Groups
- 267 -
Section 16: Hierarchies and Groups
- 268 -
Section 16: Hierarchies and Groups
- 269 -
Section 16: Hierarchies and Groups
- 270 -
Section 16: Hierarchies and Groups
- 271 -
Section 16: Hierarchies and Groups
- 272 -
Section 16: Hierarchies and Groups
- 273 -
Section 16: Hierarchies and Groups
- 274 -
Section 16: Hierarchies and Groups
- 275 -
DAX Formulas
- 276 -
Section 17: Calculated Columns
- 277 -
Section 17: Calculated Columns
DAX
- 278 -
Section 17: Calculated Columns
- 279 -
Section 17: Calculated Columns
- 280 -
Section 17: Calculated Columns
DAX
- 281 -
Section 17: Calculated Columns
- 282 -
Section 17: Calculated Columns
- 283 -
Section 17: Calculated Columns
- 284 -
Section 17: Calculated Columns
- 285 -
Section 17: Calculated Columns
* 1
- 286 -
Section 17: Calculated Columns
- 287 -
Section 17: Calculated Columns
Branches[Country]
Branches[Branch]
Staff[Account Handler]
Clients[Customer Name]
• However, to create a hierarchy, all of the required columns
must be in the same table.
• So, the logical solution is to recreate all of the columns
required for the hierarchy in the Sales table, the fact table
which has many-to-one relationships with the Branches,
Staff and Clients tables.
• We therefore created four new
columns in the Sales table,
using the formulas:
Country =
RELATED(Branches[Country])
Branch =
RELATED(Branches[Branch])
Account Handler =
RELATED(Staff[Account Handler])
Customer Name =
RELATED(Clients[Customer Name])
- 288 -
Section 17: Calculated Columns
- 289 -
Section 17: Calculated Columns
* 1
- 290 -
Section 17: Calculated Columns
- 291 -
Section 17: Calculated Columns
- 292 -
Section 17: Calculated Columns
- 293 -
Section 17: Calculated Columns
- 294 -
Section 17: Calculated Columns
- 295 -
Section 17: Calculated Columns
- 296 -
Section 18: Calculated Tables
- 297 -
Section 18: Calculated Tables
- 298 -
Section 18: Calculated Tables
- 299 -
Section 18: Calculated Tables
- 300 -
Section 18: Calculated Tables
- 301 -
Section 18: Calculated Tables
- 302 -
Section 18: Calculated Tables
- 303 -
Section 18: Calculated Tables
- 304 -
Section 18: Calculated Tables
- 305 -
Section 18: Calculated Tables
- 306 -
Section 18: Calculated Tables
- 307 -
Section 18: Calculated Tables
- 308 -
Section 18: Calculated Tables
- 309 -
Section 18: Calculated Tables
- 310 -
Section 18: Calculated Tables
- 311 -
Section 19: Measures
- 312 -
Section 19: Measures
- 313 -
Section 19: Measures
- 314 -
Section 19: Measures
- 315 -
Section 19: Measures
- 316 -
Section 19: Measures
- 317 -
Section 19: Measures
- 318 -
Section 19: Measures
- 319 -
Section 19: Measures
- 320 -
Section 19: Measures
- 321 -
Section 19: Measures
- 322 -
Section 19: Measures
- 323 -
Section 19: Measures
- 324 -
Section 19: Measures
- 325 -
Section 19: Measures
- 326 -
Section 19: Measures
- 327 -
Section 19: Measures
- 328 -
Section 19: Measures
- 329 -
Section 19: Measures
- 330 -
Section 19: Measures
- 331 -
Section 19: Measures
- 332 -
Section 19: Measures
- 333 -
Section 19: Measures
- 334 -
Section 19: Measures
1
2
3
4
- 335 -
Section 20: The CALCULATE Function
- 336 -
Section 20: The CALCULATE Function
- 337 -
Section 20: The CALCULATE Function
- 338 -
Section 20: The CALCULATE Function
- 339 -
Section 20: The CALCULATE Function
- 340 -
Section 20: The CALCULATE Function
Column-Operator-Value
• For example:
Sales[Quantity] > 0
• or
Branches[Branch] = “London“.
- 341 -
Section 20: The CALCULATE Function
- 342 -
Section 20: The CALCULATE Function
- 343 -
Section 20: The CALCULATE Function
- 344 -
Section 20: The CALCULATE Function
- 345 -
Section 20: The CALCULATE Function
- 346 -
Section 20: The CALCULATE Function
- 347 -
Section 20: The CALCULATE Function
- 348 -
Section 20: The CALCULATE Function
- 349 -
Section 21: DAX Time Intelligence Functions
- 350 -
Section 21: DAX Time Intelligence Functions
- 351 -
Section 21: DAX Time Intelligence Functions
- 352 -
Section 21: DAX Time Intelligence Functions
- 353 -
Section 21: DAX Time Intelligence Functions
- 354 -
Section 21: DAX Time Intelligence Functions
A dditional filte rs
- 355 -
Section 21: DAX Time Intelligence Functions
- 356 -
Section 21: DAX Time Intelligence Functions
- 357 -
Section 21: DAX Time Intelligence Functions
- 358 -
Section 21: DAX Time Intelligence Functions
• With the resulting period always the same duration as the current period.
- 359 -
Section 21: DAX Time Intelligence Functions
- 360 -
Section 21: DAX Time Intelligence Functions
- 361 -
Section 21: DAX Time Intelligence Functions
- 362 -
Section 21: DAX Time Intelligence Functions
- 363 -
Section 21: DAX Time Intelligence Functions
• < Dates> A date column (usually the date column of your date
table)
• < Interval> The time unit to be used: Year, Quarter, Month or Day.
- 364 -
Section 21: DAX Time Intelligence Functions
• However, it is a useful
component in ratio
calculations.
• For example, we could
use calculate the
percentage proportion
of last year’s total
represented by each
month’s total in the
current year by dividing
[Total Revenue] by the
result returned using
PARALLELPERIOD in
conjunction with the
CALCULATE function.
- 365 -
Section 21: DAX Time Intelligence Functions
- 366 -
Section 21: DAX Time Intelligence Functions
- 367 -
Section 21: DAX Time Intelligence Functions
- 368 -
Section 21: DAX Time Intelligence Functions
- 369 -
Section 21: DAX Time Intelligence Functions
- 370 -
Section 21: DAX Time Intelligence Functions
e xp re ssion
filte r
- 371 -
Section 21: DAX Time Intelligence Functions
e xp re ssion
filte r
- 372 -
Visualization
- 373 -
Section 22: Big Picture visuals
- 374 -
Section 22: Big Picture visuals
- 375 -
Section 22: Big Picture visuals
Data label
Category label
- 376 -
Section 22: Big Picture visuals
- 377 -
Section 22: Big Picture visuals
- 378 -
Section 22: Big Picture visuals
- 379 -
Section 22: Big Picture visuals
- 380 -
Section 22: Big Picture visuals
- 381 -
Section 22: Big Picture visuals
- 382 -
Section 22: Big Picture visuals
- 383 -
Section 22: Big Picture visuals
Value Target
Minimum Maximum
- 384 -
Section 22: Big Picture visuals
- 385 -
Section 22: Big Picture visuals
- 386 -
Section 22: Big Picture visuals
Filtered
Filter ignored
- 387 -
Section 22: Big Picture visuals
- 388 -
Section 23: Drill-Down and Drill-Through
- 389 -
Section 23: Drill-Down and Drill-Through
- 390 -
Section 23: Drill-Down and Drill-Through
• To determine
determ
etermine whether drill-down
eter drill down applies
app
plies
es only
on to the visual
o
containing the hierarchy, or whether other visuals on the
page will be cross-filtered, click the Data/Drill Tab; and
choose “Apply drill down filters to” either “Entire page” or
“Selected visual”.
- 391 -
Section 23: Drill-Down and Drill-Through
- 392 -
Section 23: Drill-Down and Drill-Through
- 393 -
Section 23: Drill-Down and Drill-Through
- 394 -
Section 23: Drill-Down and Drill-Through
- 395 -
Section 23: Drill-Down and Drill-Through
- 396 -
Section 23: Drill-Down and Drill-Through
- 397 -
Section 23: Drill-Down and Drill-Through
- 398 -
Section 23: Drill-Down and Drill-Through
- 399 -
Section 23: Drill-Down and Drill-Through
• Treemaps provide a
useful alternative to pie
charts and donut charts
when the number of
items to be displayed is
fairly numerous.
• A treemap consists of a
series of rectangles
whose size is mapped to a
given value, such as
Revenue.
- 400 -
Section 23: Drill-Down and Drill-Through
- 401 -
Section 23: Drill-Down and Drill-Through
- 402 -
Section 23: Drill-Down and Drill-Through
- 403 -
Section 23: Drill-Down and Drill-Through
• If the option
“Cross-report” is
activated, then
the user has the
potential to drill-
through to the
current page from
other reports
based on the
same dataset.
- 404 -
Section 23: Drill-Down and Drill-Through
- 405 -
Section 23: Drill-Down and Drill-Through
- 406 -
Section 23: Drill-Down and Drill-Through
• If you start with the “Blank” button option, you will need to
activate “Button Text” and enter the text which you want to
appear on the button.
- 407 -
Section 23: Drill-Down and Drill-Through
- 408 -
Section 23: Drill-Down and Drill-Through
- 409 -
Section 23: Drill-Down and Drill-Through
The Team
- 410 -
Section 23: Drill-Down and Drill-Through
• Next, to reduce the size of the page, expand the “Page Size”
section and either set the size to “Tooltip” (320 pixels wide by
240 pixels high) or choose “Custom” to enter the dimensions
required by your content.
- 411 -
Section 23: Drill-Down and Drill-Through
- 412 -
Section 23: Drill-Down and Drill-Through
• When you hover over the tooltip field, the tooltip page
should now be displayed, replacing Power BI’s default.
- 413 -
Section 24: Further Visualization Practice
- 414 -
Section 24: Further Visualization Practice
- 415 -
Section 24: Further Visualization Practice
- 416 -
Section 24: Further Visualization Practice
- 417 -
Section 24: Further Visualization Practice
- 418 -
Section 24: Further Visualization Practice
- 419 -
Section 24: Further Visualization Practice
- 420 -
Section 24: Further Visualization Practice
- 421 -
Section 24: Further Visualization Practice
- 422 -
Section 24: Further Visualization Practice
- 423 -
Section 24: Further Visualization Practice
- 424 -
Section 24: Further Visualization Practice
- 425 -
Section 24: Further Visualization Practice
- 426 -
Section 24: Further Visualization Practice
- 427 -
Section 24: Further Visualization Practice
Synchronized
2017 2018 2019 2020 2017 2018 2019 2020 2017 2018 2019 2020
• To show the Sync Slicers pane, in the Ribbon, click View >
Sync Slicers.
• The Sync Slicers pane will remain completely blank until a
slicer is selected.
- 428 -
Section 24: Further Visualization Practice
- 429 -
Section 25. Dynamic Titles & Conditional Formatting
- 430 -
Section 25. Dynamic Titles & Conditional Formatting
- 431 -
Section 25. Dynamic Titles & Conditional Formatting
- 432 -
Section 25. Dynamic Titles & Conditional Formatting
- 433 -
Section 25. Dynamic Titles & Conditional Formatting
- 434 -
Section 25. Dynamic Titles & Conditional Formatting
- 435 -
Section 25. Dynamic Titles & Conditional Formatting
- 436 -
Section 25. Dynamic Titles & Conditional Formatting
- 437 -
Section 25. Dynamic Titles & Conditional Formatting
• So, you often end up having to set up or modify the same set of
rules repeatedly.
- 438 -
Section 25. Dynamic Titles & Conditional Formatting
- 439 -
Section 25. Dynamic Titles & Conditional Formatting
- 440 -
Section 25. Dynamic Titles & Conditional Formatting
• A more efficient
alternative to the use of
formatting rules is to
encapsulate the logic that
would normally be placed
in rules into a measure.
• An IF statement can be
used to test the value of
an expression or measures
and return the
appropriate colour in the
form of a string containing
a hexadecimal code.
- 441 -
Publishing and Sharing
- 442 -
Section 26: Publishing to the Power BI Service
- 443 -
Section 26: Publishing to the Power BI Service
- 444 -
Section 26: Publishing to the Power BI Service
- 445 -
Section 26: Publishing to the Power BI Service
- 446 -
Section 26: Publishing to the Power BI Service
- 447 -
Section 26: Publishing to the Power BI Service
- 448 -
Section 26: Publishing to the Power BI Service
• When you first start using the Power BI service, all reports
that you publish will end up in what is known as
“MyWorkspace”. This is a space which is reserved within
the Power BI service for your own use and which only you
can access.
- 449 -
Section 26: Publishing to the Power BI Service
- 450 -
Section 26: Publishing to the Power BI Service
- 451 -
Section 26: Publishing to the Power BI Service
- 452 -
Section 26: Publishing to the Power BI Service
- 453 -
Section 26: Publishing to the Power BI Service
- 454 -
Section 26: Publishing to the Power BI Service
- 455 -
Section 26: Publishing to the Power BI Service
- 456 -
Section 26: Publishing to the Power BI Service
P ower B I Desktop
P ower B I S ervice
- 457 -
Section 26: Publishing to the Power BI Service
- 458 -
Section 26: Publishing to the Power BI Service
- 459 -
Section 26: Publishing to the Power BI Service
- 460 -
Section 27: Power BI Dashboards
- 461 -
Section 27: Power BI Dashboards
- 462 -
Section 27: Power BI Dashboards
• Normally
N ll created
t in • Al
Always created
t d in
i PPower BI
Power BI Desktop service
• Can have multiple • Single page overviews
pages
• Dependent on reports
• Mainly self-contained
• No slicers are allowed
• Can feature any type of
visual • No cross-filtering or cross-
highlighting
• Cross-filtering and
cross-highlighting • No drill-through and drill-
down
• Drill-through and drill-
down • Additional tiles available;
e.g. streaming
- 463 -
Section 27: Power BI Dashboards
- 464 -
Section 27: Power BI Dashboards
- 465 -
Section 27: Power BI Dashboards
- 466 -
Section 27: Power BI Dashboards
- 467 -
Section 27: Power BI Dashboards
- 468 -
Section 27: Power BI Dashboards
- 469 -
Section 27: Power BI Dashboards
Dashboard
- 470 -
Section 27: Power BI Dashboards
- 471 -
Section 27: Power BI Dashboards
- 472 -
Section 27: Power BI Dashboards
- 473 -
Section 27: Power BI Dashboards
Dashboard
- 474 -
Section 28: Collaboration and Sharing
- 475 -
Section 28: Collaboration and Sharing
- 476 -
Section 28: Collaboration and Sharing
• Dashboards can be created either as blank objects or by
pinning a visual from a report.
• To create a blank dashboard, choose “Dashboard” from the
“New” menu, enter a name and click “Create”.
•• A
Dashboards
workspacecan (or be
appcreated eitherisas
workspace) blank
used objects
in the or by
Power BI
pinning a visual from a report.
service for collaboration on the creation of content and
provides different levels of access to its members.
• To create a blank dashboard, choose “Dashboard” from the
• “New”
When an menu, enter a name
app workspace and click “Create”.
is published, an app is created; a
• read-only
A workspacecopy(orofapp
theworkspace)
original workspace.
is used in the Power BI
service for collaboration on the creation of content and
provides different levels of access to its members.
• When an app workspace is published, an app is created; a
read-only copy of the original workspace.
- 477 -
Section 28: Collaboration and Sharing
- 478 -
Section 28: Collaboration and Sharing
- 479 -
Section 28: Collaboration and Sharing
- 480 -
Section 28: Collaboration and Sharing
- 481 -
Section 28: Collaboration and Sharing
• And, naturally, this means that the Admin role also allows
grants the user the ability to delete the workspace itself.
- 482 -
Section 28: Collaboration and Sharing
- 483 -
Section 28: Collaboration and Sharing
- 484 -
Section 28: Collaboration and Sharing
- 485 -
Section 28: Collaboration and Sharing
- 486 -
Section 28: Collaboration and Sharing
• You can also add a link to a support site where users can
find answers to questions regarding your app.
- 487 -
Section 28: Collaboration and Sharing
• The “Setup” tab of the dialog also contains two options for
branding: the ability to upload a circular app logo; and to
choose a preset “App theme color”.
- 488 -
Section 28: Collaboration and Sharing
- 489 -
Section 28: Collaboration and Sharing
• Links allows you to link to any URL accessible via the web.
• It is a useful facility for allowing end users to access related
information on an intranet or website or to download
related material such as PDF documents.
- 490 -
Section 28: Collaboration and Sharing
- 491 -
Section 28: Collaboration and Sharing
- 492 -
Section 28: Collaboration and Sharing
- 493 -
Section 28: Collaboration and Sharing
• If you wish to recall the app, for any reason, from within the
app, choose “Unpublish App” from the Ellipsis menu.
• This action uninstalls the app for everyone to whom you
have published it; however, it does not delete the original
workspace or any of its contents.
- 494 -
Section 28: Collaboration and Sharing
- 495 -
Section 28: Collaboration and Sharing
- 496 -
Section 28: Collaboration and Sharing
- 497 -
Section 28: Collaboration and Sharing
- 498 -
Section 28: Collaboration and Sharing
- 499 -
Section 28: Collaboration and Sharing
- 500 -
Section 29: Power BI Mobile
- 501 -
Section 29: Power BI Mobile
- 502 -
Section 29: Power BI Mobile
- 503 -
Section 29: Power BI Mobile
- 504 -
Section 29: Power BI Mobile
- 505 -
Section 29: Power BI Mobile
- 506 -
Section 29: Power BI Mobile
- 507 -
Section 29: Power BI Mobile
- 508 -
Section 29: Power BI Mobile
- 509 -
Section 29: Power BI Mobile
• As a final precaution,
the mobile group can
be positioned behind
any visual in the
desktop layout group
which has a solid
background.
• Dragging the mobile
group will now be
impossible, so you will
need to use Format >
General and set the X
and Y coordinates,
within the context of a
1280 x 720 pixel page.
- 510 -
Section 29: Power BI Mobile
- 511 -
Section 29: Power BI Mobile
• To add visuals to the report page, either drag the visual from
the Visualizations pane into the mobile preview or simply
double-click the required visual.
• To remove a visual from the report page, click on the “X” icon
in the top right of the visual.
- 512 -
Section 29: Power BI Mobile
- 513 -
Section 29: Power BI Mobile
- 514 -
Section 29: Power BI Mobile
- 515 -
Section 29: Power BI Mobile
• The default mobile layout contains all visual tiles from the
original dashboard.
• To unpin a tile from the layout, click the unpin button in the
top right of the tile.
- 516 -
Section 29: Power BI Mobile
- 517 -
Section 30: Refreshing Data
- 518 -
Section 30: Refreshing Data
- 519 -
Section 30: Refreshing Data
- 520 -
Section 30: Refreshing Data
- 521 -
Section 30: Refreshing Data
• After signing in, you will be asked to name the gateway and
enter a recovery key.
• The recovery key is used to generate a key which encrypts
the data source credentials stored in the Power BI tenant.
• You will need to re-enter
the recovery key if you
need to reconfigure a
crashed machine, migrate
the gateway to a different
machine or change the
user account associated
with the gateway.
- 522 -
Section 30: Refreshing Data
- 523 -
Section 30: Refreshing Data
- 524 -
Section 30: Refreshing Data
- 525 -
Section 30: Refreshing Data
- 526 -
Section 30: Refreshing Data
- 527 -
Section 30: Refreshing Data
- 528 -
Section 30: Refreshing Data
- 529 -