Professional Documents
Culture Documents
Abstract
Power BI allows the everyday Excel user to become a Business Intelligence Analyst.
Create stunning reports and dashboards, poignant data visuals, and design highly
insightful DAX measures with Power BI. Microsoft's Power BI landscape allows easy
data clean-up and data modelling directly in the Power BI application, or the user has
the choice to accomplish these same tasks in Excel.
Microsoft Power BI Essentials Training Guide
Complying with all applicable copyright laws is the responsibility of the user. All rights
reserved. Without limiting the rights under copyright, no part of this document may be
reproduced, stored in or introduced into a retrieval system, or transmitted in any form or
by any means (electronic, mechanical, photocopying, recording, or otherwise), or for
any purpose, without express written permission of LearniT!.
i
Microsoft Power BI Essentials Training Guide
Contents
About this Training Course .......................................................................................................... vii
Course Description ...................................................................................................................... vii
How to Use this Manual .............................................................................................................. vii
Course Outline ............................................................................................................................ viii
Day 1: Getting Started with Power BI....................................................................................... 10
Learning Objectives ................................................................................................................... 10
What is Excel Power BI? ............................................................................................................. 10
Programs and Files You Will Need: ........................................................................................... 10
How to Install Power BI Desktop? ...................................................................................... 11
Download Power BI Exercise Files ..................................................................................... 12
What’s New in Excel 2016? .................................................................................................... 12
Data Analysis Tools & Terminology Changes .................................................................. 12
Built-In Apps .......................................................................................................................... 13
Office 365—Excel Online vs. Excel Native ....................................................................... 15
Excel Add-Ins (only for Excel 2013 users) .......................................................................... 15
Power BI Community .................................................................................................................. 15
Power Query - Get and Transform Data ................................................................................. 16
What is a Data Query?........................................................................................................... 16
Querying Data from Excel ..................................................................................................... 17
Query Editor ............................................................................................................................. 17
How to Launch Query Editor ............................................................................................. 17
Overview of Query Editor Interface .................................................................................. 18
RIBBON OVERVIEW: HOME TAB ................................................................................................. 19
Append Queries in Query Editor ....................................................................................... 19
Rename Queries.................................................................................................................. 20
Querying Online Data ............................................................................................................ 20
Querying Text Files .................................................................................................................. 20
Merging Tables ........................................................................................................................ 21
Expanding Tables ....................................................................................................................... 21
Best Practices for Normalizing Concepts............................................................................. 22
RIBBON OVERVIEW: TRANSFORM TAB ................................................................................... 21
ii
Microsoft Power BI Essentials Training Guide
iii
Microsoft Power BI Essentials Training Guide
iv
Microsoft Power BI Essentials Training Guide
v
Microsoft Power BI Essentials Training Guide
vi
Microsoft Power BI Essentials Training Guide
Course Description
Power BI Essentials is a fast-paced, two-day, hands-on training course designed for the
everyday Excel user to gain business intelligence and analysis skills. The course is
designed to take participants through a project-based approach where they will learn
about big data, how to organize and clean data, design highly insightful DAX
measures, and transform data into stunning reports, dashboards, and data visuals.
Participants will explore Microsoft's Power BI landscape within the Desktop and through
Office 365 online environment. This course will also focus on new features within Excel
that allow users to clean data and design data modelling directly within Excel and the
Power BI application.
vii
Microsoft Power BI Essentials Training Guide
Course Outline
Day One
Day 2
viii
Microsoft Power BI Essentials Training Guide
Module 5: Power BI
ix
Microsoft Power BI Essentials Training Guide
Day 1: Module 1
Getting Started with Power BI
Learning Objectives
What is Power BI?
What are the different parts of the Power BI ecosystem?
How do the Power BI tools differ from the tools in Excel
Pull data from multiple sources and transform it into tables, charts, graphs,
interactive maps, reports, and dashboards
Produce data models and queries
Pull big picture results, patterns and trends
Deep dive into data sets
What’s more, conducting data analysis in Excel no longer requires obscure add-ins,
plugins and software downloads. Data analysis features have been renamed and
integrated into Excel’s interface to make user experience easy and seamless.
1. Cancel the installation and download the newest .NET framework by going to:
https://www.microsoft.com/en-us/download/details.aspx?id=30653.
3. Run installation
4. Now, run the Power BI installer (repeat steps 1-3) to run POWER BI Desktop.
Built-In Apps
Users with Excel 2013 or prior are required to download separate Add-Ins to access
Power BI tools. Users with Excel 2016 or newer, now have access to these tools, such as
Get & Transform Data and Data Model, directly in the Data tab of the ribbon.
Exploring, filtering and transforming data through tables, pivot tables and pivot
charts (Power BI has similar features, however they are less powerful)
Building key performance indicators (KPIs)
Creating visualizations using charts, pivot charts, conditional formatting
Power BI Desktop has an enhanced user experience in which the data analysis tools are
a part of the interface and the user doesn’t have to jump between multiple
applications to reach them. In addition, users can conduct data clean-up and data
modeling directly in the application.
Enhanced interface and user experience—data analysis tools are part of the
interface and users will not have to jump between multiple applications to use
various tools.
Improved and easier to use visualizations—more visualizations are available and
users can create custom visuals and use them in dashboards and reports.
Creating reports & dashboards—see data through live dashboards and
interactive custom or pre-built reports.
Enhanced importing data features—users can import queries, data models and
Power View worksheets into Power BI, in addition to having other data
import/export options. Users can also import data from various databases and
file formats, including a new integration with Azure services.
Cloud-based functionality—data can be connected through SharePoint and
Microsoft Office cloud services. Users have unlimited data storage with a 365
Office subscription.
Any data and tools used in Excel can be converted over into Power BI.
(Note: You will download this when you begin to use Power BI online and create
dashboards.)
Power Pivot
Power Query
Power BI Ecosystem
The Power BI community is where users can collaborate, share code and strategies and
learn tips and tricks. Click here to join the discussions: www.community.powerbi.com.
Day 1: Module 2
Power Query—Get and Transform Data
Learning Objectives
In this module, you will learn:
Benefits of “importing” with Power Query compared to other methods like copy
and paste.
Concepts and benefits of normalizing data (organize, clean and sort) before
importing into Power BI
How to save and re-use queries
The difference between “load to table” and “load to data model”
Data tab > New Query > From File > From
Workbook
Select the file [GeographyAsia.xlsx]
A navigator window will appear > Click on
GeographyAsia > Import
Click Load
Import the other two exercise files doing the same thing:
o [GeographyEurope.xlsx]
o [GeographyNorthAmerica.xlsx]
You will be able to see all three data sets showing up on the right side navigation
window called Workbook Queries. If you do not see this navigation panel do the
following:
o Click on DATA tab > “Show Queries”
The table will import into Excel workbook. The file you are importing does not have to be
in perfect condition, Power BI will help you automate normalization. However, you may
save time if you clean the data before importing.
Query Editor
The Query Editor will enable you to modify and preview data before importing into
Excel. For example, once you have imported data you may find the following issues:
Users can
reorder and
remove steps.
Table Preview
Use First Row as Headers—Assign headers to first row of data if imported data does not
have headers. This will promote contents in Row 2 into column headers.
Rename Queries
To rename a query:
In Excel, click on: Data tab > New Query > From File >
From Text
Locate the file location > [GeocodesGeometry.txt]
Click Import
Rename the query “GeoCodes” (see above to rename
queries)
Click Close & Load
You may need t o enable First Row as Headers feature in Ribbon.
Merging Tables
Merging tables enables users to combine
different queries into one table. Merging adds
new data side-by-side the existing data.
Expanding Tables
Sometimes when users merge tables, Excel is not able to identify which
columns should be linked across queries. If you have merged tables and
the columns are not identified, you will see a column on the right called
“New Column” and the data will be called “Table.” Users can use the
feature Expand to connect the corresponding columns of data.
Remove unnecessary data—Any columns or rows that are meaningless or will not
be used for your analysis should be removed.
Compliant field names— Ensure fields (column/row headers) have unique names
that explicitly refer to the corresponding content. Do not include characters that
could be mistaken for formula syntax (e.g. {} ; : ‘ , /). Ensure field naming
consistency within and across data sets.
Replace values—Ensure data is consistent and simplified (i.e. convert all the
semi-colons to commas).
In Query Editor:
Select column
HOME > Replace Values
Value to Find: “;”
Replace with “,”
OK
Note: Field names you have just created are “State, Region 1” and “State, Region2”. These
are NOT “compliant field names.
Exercise
Merging columns
Combine two columns of data into one column.
Click OK
Expanding Tables
Sometimes when users merge tables, Excel is not able to identify which
columns should be linked across queries. If you have merged tables and
the columns are not identified, you will see a column on the right called
“New Column” and the data will be called “Table.” Users can use the
feature Expand to connect the corresponding columns of data.
Exercise:
=[Employees]*1.15
Reusing Queries
Refresh--Pulls the original data and new or updated data, and runs all existing queries.
Duplicate –Run an existing query on data in a different tab in Excel, while keeping the
original query result.
Reference–Create a different query based on the result from an existing query. The new
query is dependent upon the original. If the original query changes, the dependent
query will change.
LAB 1
Navigate to the back of this guide and find LAB 1.
1Covered in Power BI: Day 3. This feature only available for users with active Office 365
subscriptions or the Excel 2016 or newer.
Day 1: Module 3
Introduction to Power BI Desktop
Learning Objectives
By the end of this module, you will be able to:
Start Screen
When you open Power BI Desktop, you will be sent to the
Start Screen. The Start Screen includes the following
features:
File
Home
Modeling
Under the ribbon, the left-side toolbar is called the modes Bar.
The three modes are:
Report mode
Data mode
Relationships mode
Data mode
Create data models, like in Power Pivot. Once you have imported data, click Data
mode to see your data, including:
Columns
Tables are displayed on the right-side.
Icons appear next to the table columns. The small sigma icon signifies a column
of numbers.
Relationships mode
Connect and link data tables by creating relationships.
Field lists
Depending on the mode you have selected; a field list will appear in the right-side
toolbar. Field lists pull in the data fields you are working with, similar to a pivot table.
Exercise
Renaming tables
By renaming tables, you will be able to search for data more efficiently.
Queries
Queries Steps
List
Query
Preview
Select the query to edit from the Query List on the left-side toolbar
o “Geography”
HOME > Remove Columns:
Select columns/rows/data to delete
Remove the following columns:
o Continent
o Locations
o Employees
o ContinentName
Select Close & Apply
Detect relationships
Use Power BI to connect and link tables so that you can run analysis across data sets.
Exercise
Reports allow you to create stunning visuals to demonstrate what you want your data
to say. See below for a diagram of the Report features.
Report Mode
Field
wells
Stage
Note: Numerical fields will appear as a chart and alpha fields will appear in a list.
Formatting
Exercise: Format visual elements.
Creating Visuals
There are many interesting visualizations available and Microsoft continues to provide
visualization updates almost weekly. By customizing visualizations, you can convey a
unique story to your audience.
Fields Format
Exercise
Gauge
Use a gauge visual to show a minimum, maximum or target value, and where you
currently are at.
Exercise
Click on Gauge icon in Visuals Bar (ensure you are click in a blank space in
staging area before you select an icon, otherwise you will change the existing visual
that is selected).
Add GrossPay2013 to the Value area of the stage
Automatically, this chart will show your value as 50% of the gauge. However, you
can customize the size of the gauge.
Target Value: Set the living wage to target value
o Max: 200,000,000
Map
There are three kinds of map visuals. Maps use location information (i.e. states, cities,
latitude/longitude coordinates).
Note: This only works with an I nternet connection .
Exercise
Fields
Format
Apply a border
Cards
Cards allow you to see the value of the aggregate and will display values.
Exercise
Text boxes
Create text boxes to provide more information about what your dashboard is
displaying.
Exercise
Slicers
Slicers are visual buttons that filter reports. For example, when you click on a slicer, the
visual will change and the entire report will also filter to reflect that change.
Note: A slicer will affect all visuals on your dashboard.
Exercise
Fields
Change the orientation to horizontal so that the states show up like buttons next
to each other, instead of check boxes down a list
o Field > General well > Orientation > change to horizontal
Format
Click on one of the states and see that the entire report changes to reflect the
values for that slice of the data.
NOTE: You may want to change the max to 20 million on the gauge chart. This will give you
a better visualization for the map when you apply a slicer.
Shapes
Shapes are useful for creating borders around cards created on your dashboard.
Creating Filters
Apply a filter to the entire table by dragging a field to the Report Filter. Visuals will
update according to the filter applied.
Exercise
Fields
Generally, fields that can be categorized should be placed in the Axis and Legend
areas. Fields that can be calculated should go in the Value area.
Day 2: Module 1
Data Modeling in Excel
Learning Objectives:
By the end of this module, you will be able to:
In the Table Import Wizard, make sure that Use first row as column headers is
checked off > NEXT
Check off the Stores table
Exercise
Exercise
After selecting the table to import [COMPLETED$], in the Table Import Wizard, filter
the data by clicking on Preview and Filter
Uncheck the box next to the column headers that you don’t want to view. This
will filter this data out of the imported data. Columns to filter out should include:
o Locations
o Employees
o ProjectedEmpCount
o Average Revenue
o GeoCodes
o Projected Revenue
o Actual Revenue
o Difference
o % Difference
In the Power Pivot Window, on the Home tab, click Get External Data > From
Database > From Access
o Channel
o Entity
o FactSales
o Product
o ProductCategory
o ProductSubcategory
o Promotion
Follow the steps below to filter data imported from Access
Click OK > Finish (this will take a few moments and you will see Success Story
when completed)
Exercise
Power Pivot > HOME tab > Pivot Table > New Worksheet > OK
NOTE: I n Excel 2016, you can also create a Power Pivot Table from Excel’s original Pivot
Table command. I n the resulting dialogue box, choose Use this workbook’s Data Model .
Exercise:
Analysis 1: Analyze the number of regions in each continent, from the Geography
table.
Collapse Geography
Expand FactSales
Place the following:
o Rows: ContinentName [Geography]
o Values: SalesQuantity [FactSales]
Note: Be aware that there is currently no existing relationship between Geography and
FactSales tables.
Create relationships
Creating relationships will allow you to connect similar data from different data sources
and unrelated tables.
Now that you have the necessary relationships, the Pivot Table that you made earlier
should be accurately analyzing the data.
Note: To insert fields in the formula, either type in the field name OR click in the column
while typing out the formula.
= [UnitCost] * [SalesQuantity]
Name this column “COGS”
= [MSRP] * [SalesQuantity]
= [MSRP] * [ReturnQuantity]
Name this column “ReturnAmount”
Now create calculated columns that use the columns you just made
= [SalesAmount] – [COGS] – [ReturnAmount]
Name this column “Profit”
= [Profit] / [SalesAmount]
Name this column “ProfitMargin”
= RELATED (ProductSubcategory[ProductSubcategoryName] )
Note: Calculated columns show up as a darker color. This helps distinguish between
imported data and custom data.
Creating Hierarchies
We frequently want to apply the same analysis in multiple tables. Maybe you want to
be able to drill down into dates, or you want to see Products subdivided by the Regions
they are sold in. If you need these Pivot Table fields in the same order frequently, set up
a hierarchy.
One Number
Ancestor Measures—Simple measures that only derive data from columns in a table.
Ancestor measures are foundation formulas (change this one and the derived
measures will update). Adjust one ancestor measure and the resulting measures update
immediately. See diagram below.
Ancestor
Measure
= Field + Field
Derived Derived
Measure Measure
= Measure + Measure = Measure + Measure
Note: User defined measures are known as Explicit Measures (i .e. Total Profit). I mplicit
Measures are built into Pivot Tables (i .e. Sum of Sales). When measures are explicit you can
do more.
When you’re making measures in Excel, ensure you select the correct table in the Measure
window.
DAX Expressions
DAX (data analysis expressions) can be used to define calculated columns in a table
and they can also be used to define measures.
COUNTROWS
COUNTROWS counts the number of records in a field
(rows in a table).
Table: FactSales
Measure Name: TotalTransactions
Formula: =COUNTROWS(FactSales)
Formatting Options: choose formatting (i.e.
number, decimal, no decimal place, use 1,000
separator)
DISTINCTCOUNT
DISTINCTCOUNT counts the number of unique records in a field. If the value shows up
twice, it will only be counted once.
Table: FactSales
Measure Name: DaysSelling
Formula: =DISTINCTCOUNT(FactSales[DateKey])
Formatting Options: choose formatting (i.e. number, decimal, no decimal place,
use 1,000 separator)
Compound measures
A compound measure is made up of two or more other measurements. An example of
a compound measure is speed. Speed is a compound measure because it is
calculated from distance and time.
Table: FactSales
Measure Name: Total Sales per Transaction
Formula: = [TotalSales] / [TotalTransactions]
Formatting options: currency
Note: To view all measures created and edit/delete/add new measures go to : Power Pivot
tab in Excel > Measures > Manage Measures .
Table: FactSales
Measure Name: Sales per Day
Formula: = [TotalSales] / [DaysSelling]
Formatting options: currency
CALCULATE
CALCULATE function calculates a field with the measure you choose (i.e. SUM,
AVERAGE). CALCULATE allows a filter to be placed on the field before measuring it. You
can apply unlimited filters. (Think of CALCULATE like a SUMIF function).
CALCULATE Syntax
CALCULATE Syntax
SUM IF
Table: FactSales
Measure Name: RegularSales
Formula: = CALCULATE ( [TotalSales] , FactSales[PromotionKey] = 1 )
Format options: currency
Table: FactSales
Measure Name: PromoSales
Formula: = CALCULATE ( [TotalSales] , FactSales[PromotionKey] <> 1 )
Format options: currency
Table: FactSales
Measure Name: % Sales Regular
Formula: = [RegularSales] / [TotalSales]
Format options > category > number
Format > percentage
Table: FactSales
Measure Name: % Sales Promo
Formula: = [PromoSales] / [TotalSales]
Format options > category > number
Format > percentage
Day 2: Module 2
Data Modelling in Power BI
Learning Objectives:
By the end of this module, you will be able to:
Exercise
START
A confirmation should appear that everything migrated over
Data mode
This is Power Pivot’s data view. See
all of the tables on the right-hand
side.
Relationships mode
This is Power Pivot’s diagram
view. Create relationships
by clicking on dragging
fields.
Note: I t can be helpful to
visually resize tables to make
the more centralized tables
larger. I t helps conceptualize
the relationships.
Creating measures
MODELING tab > New Measure
o Or right click on FactSales table in right-hand side FIELDS list > New
Measure *make sure you right-click on the correct table )
In the formula bar type the formula and name of column
Creating Dashboards
Dashboards are a high level analysis, or summaries, whereas reports perform a deep
dive into specific data. Dashboards contain important visuals from a variety of charts.
Note: Once you have published reports and da ta to Power BI Online, you cannot modify
the data in the online dashboard.
Sharing Dashboards
Share dashboards with colleagues and allow anyone in your organization to view
reports and dashboards.
Day 3: Module 3
Introduction to Calendar Tables & Time Intelligence
Learning Objectives:
By the end of this module, you will be able to:
Exercise
Press Enter
Note: This pulls all of the dates found in the entire data set, even
irrelevant dates and outliers such as sales dates from 2003.
CALENDAR
CALENDAR allows you to specific a start date and end date and provides the user
more control over the dates.
Note: You must use serial numbers to enter dates using the D ATE function.
Press Enter
Exercise
Exercise
Relationships
Exercise: Make a simple chart that shows which month had the best sales:
DATESYTD
Exercise: Create a measure that CALCULATES TotalSales for the Year To Date
Show TotalSales by Month and show a running total of TotalSales for the year. Create a
measure that will allow you to include a running total (not a grand total) from the
beginning of the year.
Day 2: Module 4
Creating Dashboards
Learning Objectives:
By the end of this module, you will be able to:
LABS
NOTES:
GeographyEurope
GeaographyNorthAmerica
Promote Headers
If the headers are named like “Column 1”, make
sure to “Use first row as headers”.
Append Tables
1. Excel > QUERY TOOLS > Append
2. Append GeographyAsia with GeographyEurope
3. Append the new query with GeographyNorthAmerica
4. Name this query AllRegions
5. Close and Load to Data Model
Referencing Queries
1. Select the Query called AllRegions
2. Excel > QUERY TOOLS > Reference
Merging Queries
3. Query Editor > HOME > Merge Queries
4. Merge the query named AllRegions with the query named Continents
5. Select the columns on each table called ContinentID
6. Click OK
7. Select the resulting column in the Query Editor
8. Query Editor > TRANSFORM > Expand
9. Choose the column ColumnName
10. Click OK
11. Name this Query Merged
12. Close and Load to Data Model
Replace Values
1. Select the column called State, Region
2. Query Editor > HOME > Replace Values
3. Replace all semi-colons with commas
4. Click OK
Split Columns
1. Select the column called State, Region
2. Query Editor > TRANSFORM > Split Column
3. Select the drop-down menu, and choose “Custom”
4. Enter “ – “ as the custom delimiter.
5. Rename the columns, “State” and “Region” respectively
Whole number
Locations
Employees
Date
LoadDate
UpdateDate
Currency
Projected Revenue
Actual revenue
Difference
Merge Columns
1. Select the columns called Loc2 and Loc5
2. Query Editor > TRANSFORM > Merge Columns
3. Name this column GeoCodes
4. Click OK
= [Employees] * 1.15
4. Click OK
5. Format this column as a Whole Number
6. Close and Load to Data Model
Make 2 cards
Make it easy for your audience to understand the main point: how much over (or
under) the projection were the actual sales?
Use the following fields, and apply the Card style visual.
Difference (SUM)
% Difference (AVERAGE)
Field Placement
Axis State
Value Difference
Field Placement
Axis State
Field Placement
Details State
Note that Scatter charts are charts with 2D data (X and Y Axis fields)
where as Bubble charts have a 3rd dimension of values that change the bublle size
(Projected Revenue)
Data Colors
Change the default color.
Field Placement
Location State
Data Colors
1. Diverging On
2. Minimum Red
3. Center White
4. Maximum Blue
5. Minimum -1000000
6. Center 0
7. Maximum 8000000
The second
report will
compare
wages to
revenues to
see if there is
any
correlation, or
insights we
can gain.
Make 2 cards
Make it easy for the audience to understand the main point: how much over (or under)
the projection were the actual sales?
Use the following fields, and apply the Card style visual.
Field Placement
Values Actual Revenue (Geography table)
GrossPay2013 (Employees table)
Field Placement
Shared Axis State (Employees table)
Sort by
GrossPay2013
Field Placement
Rows State (Employees table)
Matrix Style
Try a few, choose which ever one you like best.
Add a slicer
Field Placement
Field State
Resize the slicer, making it tall and narrow so that it will fit on the left side of the report.
Lab
Create at least one additional report, analysis suggestions include:
Profit
Which product categories have the highest profit margins? Which product
generate the most dollars in profit? What correlations can be drawn here?
Compare Profit in each month by category. What conclusions can you draw?
Compare this to the sales in each month by category. What conclusions can you
draw here?
Refunds
What portion of total sales is refunded?
Which Product Category has the most refunds? The highest refund amount? The
highest refund:sales ratio?
What time of year brings in the most refunds? Is there any correlation between
promotions being run and refunds?
Locations
Which locations have been selling the best?
Which locations have the highest refunds?
Which locations have the highest profit margin?
Which locations have the most transactions?
Transaction to profit ratio?
REFUNDS Measure
Table: FactSales
Measure Name: Refunds
Formula: = SUM ( FactSales[ReturnAmount] )
Format: Currency
NETSALES Measure
Table: FactSales
Measure Name: NetSales
Formula: = [TotalSales] - [Refunds]
Format: Currency
This last example is one in which the user has decided not to create individual ancestor
measures first.
Fields
Axis: MonthName
Value: RegularSales
PromoSales
Tooltips: RegularSales
PromoSales
PromoSalesYTD
DiscountAmount
Promo Sales
Discount Amount
% of Total Sales
Discounted
(Average)
Matrix Table
Fields
Field
Rows: MonthName
Columns: Year
Values: PromoSales
PromoSalesYTD
Format
Format
Lab 4B
Create at least one additional report, analysis suggestions include:
Profit
Which product categories have the highest profit margins? Which product
generate the most dollars in profit? What correlations can be drawn here?
Compare Profit in each month by category. What conclusions can you draw?
Compare this to the sales in each month by category. What conclusions can you
draw here?
Refunds
What portion of total sales is refunded?
Which Product Category has the most refunds? The highest refund amount? The
highest refund:sales ratio?
What time of year brings in the most refunds? Is there any correlation between
promotions being run and refunds?
Locations
Which locations have been selling the best?
Which locations have the highest refunds?
Which locations have the highest profit margin?
Which locations have the most transactions?
Transaction to profit ratio?