0% found this document useful (0 votes)
43 views39 pages

PBI Slides ShortCourse Handout

Uploaded by

Bhupesh Nayak
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views39 pages

PBI Slides ShortCourse Handout

Uploaded by

Bhupesh Nayak
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 39

Bring your data to life with Microsoft Power BI

Instructor: Peggy Jones – Associate Director


Technology Support Services

Introduction to Microsoft Power BI


Course Takeaways

Understand Understand how to connect to different types of data sources and shape the data fields

Develop Understand how to develop visuals from a variety of data sets

Save and publish Know how to save and publish reports to share with others

Generate Know the process to generate a dashboard for a report


What is Power BI?

Microsoft Power BI is a business analytics


collection of services, apps and visualizations that Intuitive tool that is easy to learn that allows for
allows the users to visualize and share data for users to easily connect to datasets, transform
easy consumption. that data and tell a story..

Workspaces are simply put, containers for your


reports, datasets and dashboards in Power BI.
Power BI consist of a Windows desktop Your workspaces can be “My Workspace” or the
application called Power BI Desktop and online teams you are members of would also be listed.
SaaS service called Power BI Service
What makes up a Power BI File

Visualizations

•A visual representation of data, such as a chart, a graph, a color-coded map, or other


interesting things you can create to represent your data visually.

Report

•A report is a collection of visualizations that appear together on one or more pages.


•A goal of a report is to help the viewer or user to find answers to a broad set of
questions by utilizing the visuals.
•Slicers are an important feature as they allow the user to filter the visuals quickly
•Operational reports can be used to see real-time data

Dashboards

•A dashboard is a collection of visuals from single or multiple pages that you can share
with others. Often, it’s a selected group of visuals that provide quick insight into the
data or story you’re trying to present. Think of a dashboard as a quick look at what is
important, then you reopen the report to get more details.
•The goal of creating a dashboard is so that the user can see the information as
quickly as possible.
•An example of a dashboard would be a departmental quick look or executive
dashboard
See Your Data in
New Ways
■ Typically, a Power BI Report
connects to one (or more)
data sets and will have at
least one report page.
– It is very common to have
multiple pages within your
report as well
Parts of a Report
Visuals - a means to visualize a dataset
Elements – used to draw attention to visuals but do not interact with data

Visuals Elements
•Microsoft Power BI •Text Box - used to add titles or
includes over 30 general instructions can be visually
changed by font, color bold and
standard visuals which alignment
are already available •Buttons – you can assign a function
to the users to a button, so the user need only
activate the button
•You can create custom
•Shapes – can be used for
visuals, or they can be decoration – information or to point
sourced from the to another element
AppSource •Images- can be used to add a logo
to a report, or can even behave like
a button
Types of Visuals

Proportional Performance
Categorical Time Series Numeric Grid Geographical
based
•Bar or •Line or •Stacked bar •Cards or •Tables or •Gauge or •Maps
column column chart Call outs matrices KPI
CATEGORICAL VISUAL
TIME SERIES VISUALS
PROPORTIONAL
VISUALS
NUMERIC VISUALS
A matrix visual displays inventory by product and by
store. It uses conditional formatting to show
indicators, which provide visual cues to
understanding the data.

GRID VISUALS
PERFORMANCE VISUAL
GEOSPATIAL VISUALS
Publish

Part of the Power BI Service

Publish directly to the cloud or on premise

Data refresh, so your reports are always up to date

Package your reports in mobile for easy consumption


and control
Manage your analytics content with admin and
governance tools
Power BI
Service –
Online
Software as a
■ We have been learning how to use
Service
Power BI Desktop to create reports
■ Dashboards are used by the Power BI
Service (online)
– From here you can pin the visuals
from one or more reports that you
have published to a single
dashboard to allow easy
consumption and quick answers to
questions.
Dashboards
Pin Tiles from one or more
reports to create a dashboard.
A dashboard is a single page that is used to tell a story
•Gives a quick view of information
through visualizations
•If more detail need a click of a visual will
open the corresponding report
Dashboards - Continued
• Reports and Dashboard will appear very similar as they both are a page with visualizations.
There are however some major differences between the two.

Capability Dashboards Reports

Pages One page One or more pages

Data sources One or more reports and one or more datasets per dashboard. A single dataset per report

Drilling down in visuals Only if you pin an entire report page to a dashboard. Yes

Available in Power BI Desktop No Yes. Can build and view reports in Power BI Desktop.

Filtering No. Can't filter or slice a dashboard. Can filter a dashboard tile in focus mode, but can't Yes. Many different ways to filter, highlight, and slice.
save the filter.

Feature content on colleagues' Home page Yes Yes

Favorite Yes. Can set multiple dashboards as favorites. Yes. Can set multiple reports as favorites.

Natural langage queries (Q&A) Yes Yes, provided you have edit permissions for the report and underlying dataset.

Set alerts Yes. Available for dashboard tiles in certain circumstances. No

Subscribe Yes. Can subscribe to a dashboard. Yes. Can subscribe to a report page.

Can see underlying dataset tables and fields No. Can export data but can't see tables and fields in the dashboard itself. Yes
Resources
Power BI Documentation

•https://docs.microsoft.com/en-us/power-bi/

Power BI Guided Learning

•https://learn.microsoft.com/en-us/training/paths/power-bi-effective/

https://docs.microsoft.com/en-us/power-bi/guided-learning/

Power BI Dashboards

•https://learn.microsoft.com/en-us/power-bi/create-reports/service-dashboard-create?source=recommendations
•https://learn.microsoft.com/en-us/training/modules/build-simple-dashboard/5-build-dashboard

Power BI Webinars

•https://docs.microsoft.com/en-us/power-bi/webinars

Power BI Whitepapers

•https://docs.microsoft.com/en-us/power-bi/whitepapers

Power BI Blogs

•https://powerbi.microsoft.com/en-us/blog/

YouTube

•https://youtu.be/lJKgWnvl6bQ
Lab 1: Combine data from Excel and an
OData feed

■ It's common to have data spread across multiple data sources, such as product
information in one database and sales information in another. With Power BI
Desktop, you can combine data from different sources to create interesting,
compelling data analyses and visualizations
■ In this lab you learn how to combine data from two data sources: an Excel
workbook that includes product information, and an OData feed that contains
orders data. After you import each dataset and perform transformation and
aggregation steps, you will use data from both sources to produce a sales analysis
report with interactive visualizations. These techniques can also be applied to SQL
Server queries, CSV files, and any other data sources in Power BI Desktop.

■ For this lab you will need to open the link on the desktop for short courses and
open the files we will be using for this lab exercise.
Import the product data from Excel

First, import the product data from the Excel Products.xlsx


workbook into Power BI Desktop.

1. Download the Products.xlsx Excel workbook, and save it as


Products.xlsx.
2. Select the dropdown arrow next to Get Data in the Home
tab of the Power BI Desktop ribbon, and then select Excel
from the Most Common dropdown.

Note
You can also select the Get Data item itself, or
select Get Data from the Power BI Get started
dialog, then select Excel or File > Excel in the Get
Data dialog box, and then select Connect.

3. In the Open dialog box, navigate to and select the


Products.xlsx file, and then select Open.
4. In the Navigator pane, select the Products table and
then select Transform Data.
A preview of the table opens in the Power Query
Editor, where you can apply transformations to clean
up the data.

Note
You can also open the Power Query Editor by selecting Edit Queries >
Edit Queries from the Home ribbon in Power BI Desktop, or by right-
clicking or choosing More options next to any query in Report View,
and selecting Edit Query.
Clean up the products columns

Your combined report will only use the ProductID,


ProductName, QuantityPerUnit,
and UnitsInStock columns from the Excel workbook, so
you can remove the other columns.

1. In Power Query Editor, select the ProductID,


ProductName, QuantityPerUnit,
and UnitsInStock columns (use Ctrl+Click to select
more than one column, or Shift+Click to select
columns that are next to each other).
2. Right-click any of the selected headers and select
Remove Other Columns from the dropdown, to
remove all except the selected columns from the
table.

Note: You can also select Remove


Columns > Remove Other Columnsfrom the
Manage Columns group in the Home ribbon tab.
Import the order data from an OData feed
Next, import the order data from the sample Northwind sales system OData feed.

1. In Power Query Editor, select New Source and then select OData feed from
the Most Common dropdown.

2. In the OData Feed dialog box, paste the URL for the Northwind OData feed,
http://services.odata.org/V3/Northwind/Northwind.svc/ , and select OK.
3. In the Navigator pane, select the Orders
table, and then select OK to load the data
into Power Query Editor.

Note
In Navigator, you can select any table name, without selecting
the checkbox, to see a preview.
Expand the order data

When you connect to data sources that have multiple tables, such as relational
databases or the Northwind OData feed, you can use references between tables to
build up your queries.
The Orders table contains references to several related tables. You can add the
ProductID, UnitPrice, and Quantity columns from the related Order_Detailstable into
the subject (Orders) table by using the Expand operation.

1. Scroll to the right in the Orders table until you can see the Order_Details column.
Note that instead of data, it contains references to another table.

2. Select the Expand icon ( ) in the Order_Details column header.


3. In the Expand drop-down:
a. Select (Select All Columns) to clear all columns.
b.Select ProductID, UnitPrice, and Quantity, and then select OK.
After you expand the Order_Details table, the
Order_Details column is replaced by the three new
columns from the nested table, and there are new rows
in the table for the added data from each order.
Create a custom calculated column

Power Query Editor lets you create calculations and


custom fields to enrich your data. You will create a
custom column that calculates the total price for each
line item in an order by multiplying the unit price by
item quantity.

1. In the Add Column ribbon tab of Power Query


Editor, select Custom Column.

2. In the Custom Column dialog box, type LineTotal in


the New column name field.
3. In the Custom column formula field after the = ,
enter [Order_Details.UnitPrice] *
[Order_Details.Quantity]. (You can also select the
field names from the Available columns scroll box
and select << Insert, instead of typing them.)
4. Select OK.

The new LineTotal field appears as the last column in the


Orders table.
Set the data type for the new field

When Power Query Editor connects to data, it


determines the best data type for each field and
displays the data accordingly. You can see the data
types assigned to fields by the icons in the headers, or
under Data Type in the Transform group of the Home
ribbon tab.

Your new LineTotal column has a data type of Any,


but its values are currency. To assign a data type,
right-click the LineTotal column header, select Change
Data Type from the dropdown, and then select Fixed
decimal number.

Note
You can also select the LineTotal column, then select the dropdown arrow next to
Data Type in the Transformarea of the Home ribbon tab, and then select Fixed
decimal number.
Clean up the orders columns
To make your model easier to work with in reports, you can delete,
rename, and reorder some of the columns.

Your report will only use


the OrderDate, ShipCity, ShipCountry, Order_Details.ProductID,
Order_Details.UnitPrice,
and Order_Details.Quantity columns. You can select these columns and
use Remove Other Columns as you did with the Excel data, or you can
select all the columns except those listed, right-click on one of the
selected columns, and select Remove Columns to remove them all.

You can make


the Order_Details.ProductID, Order_Details.UnitPrice and
Order_Details.Quantity columns easier to identify by removing the
Order_Details. prefixes from the column names. To rename the
columns
to ProductID, UnitPrice and Quantity, respectively:

1. Double-click or tap and hold each column header, or right-click


the column header and select Rename from the dropdown.
2. Delete the Order_Details. prefix from each name, and then press
Enter.

Finally, to make the LineTotal column easier to access, drag and drop
it to the left, just to the right of the ShipCountry column.
Review the query steps
As you shaped and transformed data in the :Power Query Editor, each step was recorded in the Applied Steps area of the Query Settings
pane on the right side of Power Query Editor. You can step back through the Applied Steps to review the changes you made, and edit,
delete, or rearrange them if necessary (although this can be risky, because changing preceding steps can break later steps).

Select each of your queries in the Queries list on the left side of Power Query Editor, and review
the Applied Stepsin Query Settings. After applying the previous data transformations, the Applied Steps for your two queries should look
like the following

Tip
Underlying the Applied Steps are formulas written in the Power Query Language, also known as
the Mlanguage. To see and edit the formulas, select Advanced Editor in the Query group of the Home tab of the ribbon.
Import the transformed queries

When you are satisfied with your transformed data,


select Close & Apply > Close & Apply in
the Close group of the Home ribbon tab, to import
the data into Power BI Desktop Report View.

Once the data is loaded, the queries appear in the


Fields list in the Power BI Desktop Report View .
Manage the relationship between the datasets
Power BI Desktop does not require you to combine
queries to report on them. However, you can use the
relationships between datasets, based on fields they
have in common, to extend and enrich your reports.
Power BI Desktop may detect relationships
automatically, or you can create them in the Power BI
Desktop Manage Relationships dialog. For more details
about relationships in Power BI Desktop,
see Create and manage relationships.

The Orders and Products datasets in this tutorial


share a common ProductID field, so there is a
relationship between them based on that column.

1. In Power BI Desktop Report View, select Manage


Relationships in the Relationships area of the
Home ribbon tab.

2. In the Manage Relationships dialog, note that


Power BI Desktop has already detected and listed
an active relationship between the Products and
Orders tables. To view the relationship,
select Edit.
The Edit Relationship dialog opens,
showing details about the relationship.
3. Power BI Desktop has autodetected the
relationship correctly, so you can select Cancel
and then Close to exit the relationship dialogs.
You can also view and manage the relationships between your queries by
selecting
the Relationship view at the left side of the Power BI Desktop window. Double-
click the arrow on the line connecting the two queries to open the Edit
Relationship dialog and view or change the relationship.

To get back to Report View from Relationships View, select the Report View icon.
Create visualizations using your data
In Power BI Desktop Report View, you can create a variety of
visualizations to gain insights from your data. You can build reports
with multiple pages, and each page can have multiple visuals. You
and others can interact with your visualizations to help analyze and
understand your data. For more information about viewing and
editing reports in Power BI Service (your site), see Edit a Report.

You can use both of your data sets, and the relationship between
them, to help visualize and analyze your sales data.

First, create a stacked column chart that uses fields from both
queries to show the quantity of each product ordered.

1. Select the Quantity field from Orders in the Fields pane at the
right, or drag it onto a blank space on the canvas. This creates a
stacked column chart showing the total quantity of all products
ordered.
2. Select ProductName from Products in the Fields pane, or
drag it onto the chart, to show the quantity of each product
ordered.
3. To sort the products by most to least ordered, select the More
options ellipsis (...) at the upper right of the visualization, and
then select Sort By Quantity.
4. Use the handles at the corners of the chart to enlarge it so more
product names are visible.
Next, create a chart showing order dollar amounts (LineTotal)
over time (OrderDate).

With nothing selected on the canvas, select LineTotal from


Orders in the Fields pane, or drag it to a blank space on the
canvas. The stacked column chart shows the total dollar amount
of all orders.
With the chart selected, select OrderDate from Orders, or drag it
onto the chart. The chart now shows line totals for each order
date.
Resize the visualization by dragging the corners to be able to
see more data.

Tip
If you only see Years on the chart (only three data points), drop
down the arrow next
to OrderDate in the Axis field of the Visualizations pane, and
select OrderDate instead of Date Hierarchy.
Finally, create a map visualization showing order
amounts from each country.

With nothing selected on the canvas, select


ShipCountry from Orders in the Fields pane, or drag
it to a blank space on the canvas. Power BI
Desktop detects that the data is country names,
and automatically creates a map visualization, with
a data point for each country that had orders.
To make the sizes of the data points reflect the
order amounts for each country, drag
the LineTotal field onto the map (or drag it to Drag
data fields here under Size, in the bottom half of
the Visualizations pane). The sizes of the circles on
the map now reflect the dollar amounts of the
orders from each country.

You might also like