Power BI Guide
Power BI Guide
Power BI Guide
AN IN-DEPTH UNDERSTANDING
BY
ADITI GUPTA
1
Power BI (in-depth Understanding)
Great to see that you are reading this.
I have created this E-Book to share my knowledge on one of the most awesome
Business intelligence tools i.e. Microsoft Power BI. This will help you kick start
your knowledge on this tool. Hope you will enjoy this.
I would appreciate if you can share this further with your connections. Also, if you
are looking to use Power BI in your current job role or switching to a Data
analytics and visualization career then I would recommend you to learn this tool
in-depth.
Cheers!!
Power BI (in-depth Understanding) Aditi Gupta 2
Contents
1 Business Intelligence (BI) Concepts
7 Reports in Power BI
9 Dashboards in Power BI
Business Intelligence (BI) is a process of analysing data through technology and presenting it to the end
user(s) which help them to make an informed decision. With the use of historical and current data, a BI
tool serves predictive view.
Usually a BI tool can perform tasks like data connection, data mining, data transformation, data modelling
through building relationships, complex calculations, report building, dashboard creation, online analytical
processing and predictive analysis.
It consists of a huge storage of data gathered from single or many sources to aid the process of making an
informed decision at any level of an enterprise.
A typical data warehouse follows an ETL (Extract, Transform, Load) process.
A Business Intelligence tool takes data from a Data warehouse to generate reports and help the end user to
make informed decision. By this, we can call Data warehouse as a part of a complete Business Intelligence
process.
Page
Power BI (in-depth Understanding)
10
BI TOOLS
• Microsoft Power BI
• ReportPlus
• Tableau
• QlikView
• Sisense
• SAP BusinessObjects Lumira
• Looker
• SAP Crystal Reports
• datapine
• SAP Business Intelligence
• Zoho Analytics
• Vista
• Yellowfin
• Clootrack
• Answer Dock
• Hotjar
Page
11
Power BI (in-depth Understanding) 12
MICROSOFT POWER BI ( MSPBI ) INTRODUCTION
2. Power BI Architecture
Power BI is a collection of software/tools that works in synchronisation to turn unrelated sources of data into
meaningful and interactive insights.
Power BI support 100’s of data sources including the most common one’s like Excel spreadsheets, Text/CSV, SQL,
Oracle etc.
Page
Power BI (in-depth Understanding)
15
PARTS OF POWER BI
01 03
02
Power BI service
04
Power BI Report Server
An online SaaS (Software as a Service) service to publish Power BI reports to an on-premises
report server, after creating them in
POWER BI FLOW
Power BI Flow
It starts with connecting to data then transforming it, building relationships and finally creating
reports and publishing it to Power BI service. Later it can be shared so that end users in the
Power BI service and mobile devices can view and interact with the report.
Page
Power BI (in-depth Understanding)
18
INTRODUCTION TO POWER BI DESKTOP
Power BI Flow
It starts with connecting to data then transforming it, building relationships and finally creating
reports and publishing it to Power BI service. Later it can be shared so that end users in the
Power BI service and mobile devices can view and interact with the report.
• Publishing and Sharing the Report: Just by hitting the publish button, one can
publish the report on Power BI service and whosoever has an access to it can view
the updated report or dashboard always. On the other hand in Excel, one need to
send emails or putting in the share drive or share point and telling them that we
have updated the file.
• Defining Roles: Power BI gives us an option to define roles to make sure people from
different departments or locations can see only their respective data (Which can’t be
done in Excel).
Situation:
You have been hired by “Big Market”, an American Retail Corporation, to design and deliver the end-to-end
business intelligence solution.
Given:
You will be given CSV files, containing the sales, customer, products etc for 2 years.
Expected:
Client want’s to track not only KPI’s (i.e. Sales, Profit, Cost, Return) but also the product level performance,
forecast, regional level comparisons, and want to identify high value customers.
Below is the first screen you will get, once you open PBI desktop. You will be prompted to sign-in but sign-in is
required only when it comes to publish the report to PowerBI.com, rest the whole model can be created without sign-
in.
Note: Sign-in can be done only using an official email ID. i.e. it can not accept personal email ids like gmail, yahoo etc.
Page
Power BI (in-depth Understanding)
26
POWER BI DESKTOP INTERFACE
Sign-in to
Tabs Publish Power BI
Report Name Service
Report
Different Views
(Report, Data &
Relationship)
Page Name
Feature Update
PagN
e otification
Power BI (in-depth Understanding)
27
POWER BI DESKTOP INTERFACE (CONT.)
• Report Name: We can rename the report while saving the same for the first time.
• Views:
• Report View – Under this we can use different visualizations to build report.
• Data View – Once data is being loaded to PBI Desktop, the same can be seen here in the form of tables and
fields. Here we can create calculated columns and measures.
• Relationship View – This view is useful to build relationship to create data model.
• Page Name: We can have multiple pages into a single report. Each page contributes a part of a report.
Its just like “Sheet” tabs in MS Excel.
• Add New Page: By clicking the plus sign, we can add new page in the report.
• Tabs:
• Home: This is a general purpose tab and used for connecting new data, editing queries etc.
• View: One can set the view and even design the phone layout too.
• M od elling :C reating new tables, parameters etc. can be done her
Power BI (in -de pt hU nder st andi ng )
Page
28
• Help: It’s a good resource to learn this program and even post your queries in PBI forums/community.
POWER BI DESKTOP INTERFACE (CONT.)
• Publish Report: This helps in publishing the reported created in Power BI desktop to Power BI Service.
• Sign-In: To publish the report or importing new visualizations, one has to sign into Power BI service.
• Visualization Pane: Here we can choose among many visualizations like charts, slicers, maps etc.
• Filters Pane: PBI Desktop provides three levels of filters i.e. Visual, Page & Report level filter.
• Drill-Through Filter: Helps in accessing the detailed report of an item.
• Drop Fields pane: As every visualization needs one or multiple fields to show data into it. This pane
facilitate to drop the desired fields from the fields pane.
• Format Pane: Every visualization has different formatting options, this pane helps in formatting the
selected visualization.
• Fields Pane: Show all the connected data tables and fields.
• Feature Update Notification: This will show a notification for any new update released from Microsoft
PBI team.
Page
Power BI (in-depth Understanding)
29
CHANGE DEFAULT SETTINGS
Home Tab -> Get Data -> Click on Text/CSV or Excel -> Choose File -> Open
3
4
Page
Power BI (in-depth Understanding)
33
CONNECT TO CSV/TEXT/EXCEL FILES (CONT.)
• Following are the list of available fields in order to connect Power BI desktop to SQL Server Database
• Server- In this section we will provide default SQL server Instance
• Database- If we want to use custom SQL query then this option is required
• Data Connectivity Mode- Choose whether we want to import or directly connect through query
Click Load
Power BI (in-depth Understanding) Page 44
ENTER DATA DIRECTLY
Home Tab -> Enter Data
Once the data is loaded, all the fields can be accessed in PBI.
Power Query act as an “ETL” tool for Power BI i.e. it Extracts data from one or multiple sources, Transform that data
and finally Load it into Power BI environment.
It also facilitates an “Applied Steps” feature, where whatever we do, will get recorded as steps and upon updating the
source data, all those steps will get applied to them automatically and this way the creator of the report needs not to
repeat the steps.
Page 51
HOW TO OPEN POWER QUERY EDITOR?
Power query editor is a separate window which can be accessed by either of the following ways:
1. Power BI window Home -> Get Data -> Choose the respective data source -> Browse the file -> “Edit”. (Here
“Edit” button will open Query editor).
2. Power BI window Home -> “Edit Queries”
Click “Edit”
Click “Edit Queries”
Power BI (in-depth Understanding)
Page 52
POWER QUERY EDITOR INTERFACE
Tabs
Formula Bar
Table Name
Queries Pane
Applied Steps
• Queries pane: This will show all the queries or the data with which our model is connected to.
• Applied Steps: List of steps that has been recorded while using the Power Query Editor. When the data in the data
source will be updated then we need to just refresh our Power BI model and all the transformation steps which has
been recorded by the Query Editor will get applied to updated data and that saves lots of repetitive work and time.
• Table Name: We can rename the table name to something that helps in recognizing the same in Power BI
environment.
• Formula Bar: As Power BI use “M Code” language. The same can be seen here for each applied steps been
recorded by Query Editor.
• Tabs:
• File: General customizations related to Query Editor window can be done here.
• Home: Major options can be found under this tab like Get Data, Append & Merge Query, Data source settings etc.
• Transform: This helps in transforming the existing column(s) like changing the data types, change formatting, Pivot or
Unpivot columns etc. (Note: These operations will be applied only on the selected column(s).
Page
Power BI (in-depth Understanding)
54
POWER QUERY EDITOR INTERFACE (CONT.)
• Add Column: This add a new column based on calculation or existing column.
• View: Here we can turn on or off the formula bar, whitespace etc.
• Help: It’s a good resource to learn this program and even post your queries in PBI forums/community.
• Close & Apply: Once transformation of the data is done, hitting this button, Power Query will load the data into
Power BI and apply all the recent changes.
Page
Power BI (in-depth Understanding)
55
DATA TYPES
• Make sure the suitable data type must be assigned to each column.
Po
agwee5r7BI (in-depth Understanding)
INCLUDE IN REPORT REFRESH
• When the collection of two or more independent tables are connected through
relationships based on common fields forms a Data Model.
• Data Modelling helps in building custom calculations on the existing tables, which
can further be used directly into Power BI visualizations.
In our sample data, if the relationship between returns table and products table do not exist then using the fields in
the report view from both of these tables will leads to independent and meaningless results.
Now both returns and Product tables are connected. Here, we are getting the correct result.
• This can be done by either picking up common keys and dropping them
on related table or by using “Manage Relationship” option.
When a Lookup table has a primary key which doesn’t exist as foreign key in a Data table but in another lookup table,
which in turn is connected to the data table, the relationship formed between the Lookup Tables called a “Snowflake”
schemas.
In the relationship view either one can double click on the relationship thread or can go to Home -> Manage
Relationships.
Having two foreign keys in a data table can facilitate two relationships with one Lookup Table at the same time. But
only one can be activated at one time. E.g. date field in calendar lookup table can have two relationships with Sales
table with “Transaction Date” and Stock Date” field. But only one can remain active at one time.
Note: An inactive relation will be shown as a dotted line in relationship view.
• Cardinality refers to the uniqueness of values in a column. Here, high cardinality means higher number
of unique values and low cardinality means higher number of repetitive values.
We can have both-way filter too i.e. it can flow from Lookup table to Data table and at the same time Data table to
lookup table.
Note: This can be dangerous to have both way filter when we have more then one Data table in the model.
Its quite usual for any user to use foreign key, which will give us an incorrect result. To make user forcefully use a
Primary key, we can hide the foreign keys from the report view.
• These are new formula based columns which can be added into the tables. These are calculated based entire
column or table. It understand row context, so for basic statistical functions like sum, count, average etc. this
will not be useful.
• Measures are used to create new calculated values. These also works on
entire columns or tables and entertain filter context. These values can’t
be seen in data view.
Po
agwee7r6BI (in-depth Understanding)
ADDING MEASURES
• Measures can be added either by right clicking within the table or by using “Quick Measures”.
• Implicit Measures
These are being create when we drag a numerical field into the values pane of a visualization in the report
view and choose any pre-defined calculation on the same like Sum, count, average etc. These can be
accessed only in the visualization where these has been created.
• Explicit Measures
These are being created by entering the DAX function. These can be accessed anywhere in the report and
can be used in other DAX calculations too.
CALCULATED TABLES
• Calculated Tables are the new tables to be added to the model using DAX. Usually we import data from
different sources and use them as tables in Data and report view but Calculated tables are being
created using DAX on existing data.
Page
Power BI (in-depth Understanding)
84
DAX FUNCTIONS CATEGORIES
► Date and time
► Time-intelligence
► Filter
► Information
► Logical
► Other
► Statistical
► Text
Power BI (in-depth Understanding) Page 85
DATE AND TIME FUNCTIONS
• CALENDAR
• NOW
• CALENDARAUTO
• SECOND
• DATE
• TIME
• DATEDIFF
• TIMEVALUE
• DATEVALUE
• TODAY
• DAY
• UTCNOW
• EDATE
• UTCTODAY
• EOMONTH
• WEEKDAY
• HOUR
• WEEKNUM
• MINUTE
• YEAR
• MONTH
• YEARFRAC
• CONTAINS
• CUSTOMDATA • ISNONTEXT
• IN Operator / CONTAINSROW function • ISNUMBER
• ISBLANK • ISODD
• ISERROR • ISONORAFTER
• ISEVEN • ISTEXT
• ISINSCOPE • LOOKUPVALUE
• ISLOGICAL • USERNAME
• AND
• False
• IF
• IFERROR
• IN
• NOT
• OR
• SWITCH
• True
• ACOSH
• FLOOR ► QUOTIENT
• GCD
• ASIN
• INT ► RADIANS
• ASINH
• ATAN
• ISO.CEILING
► RAND
• LCM
• ATANH
• LN ► RANDBETWEEN
• CEILING
• LOG
• COMBIN ► ROUND
• LOG10
• COMBINA
• MOD ► ROUNDDOWN
• COS
• MROUND
• COSH
• ODD
► ROUNDUP
• CURRENCY
• PI ► SIGN
• DEGREES
• DIVIDE ► SQRT
► SUM
Power BI (in-depth Understanding) ► SUMX Page 91
► TRUNC
OTHER FUNCTIONS
• DATATABLE
• ERROR
• SELECTEDSMEASURE
• EXCEPT
• SELECTEDMEASUREFORMATSTRING
• GENERATESERIES
• SELECTEDSMEASURENAME
• GROUPBY
• SUMMARIZECOLUMNS
• INTERSECT
• Table Constructor
• ISEMPTY
• TREATAS
• ISSELECTEDMEASURE
• UNION
• NATURALINNERJOIN
• VAR
• NATURALLEFTOUTERJOIN
• APPROXIMATEDISTINCTCOUNT • CROSSJOIN
► NORM.DIST ► SAMPLE
• AVERAGE • DISTINCTCOUNT
► NORM.INV ► SELECTCOLUMN
• • EXPON.DIST
AVERAGEA
• GENERATE ► NORM.S.DIST S
• AVERAGEX
• BETA.DIST • GENERATEALL
► NORM.S.INV ► SIN
• BETA.INV • GEOMEAN
► POISSON.DIST ► T.DIST
TEXT FUNCTIONS
• BLANK
• MID
• CODE
• REPLACE
• COMBINEVALUES
• REPT
• CONCATENATE
• RIGHT
• CONCATENATEX
• SEARCH
• EXACT
• SUBSTITUTE
• FIND
• TRIM
• FIXED
• UNICHAR
• LEFT
• UPPER
• LEN
• VALUE
• LOWER
Power BI (in-depth Understanding) Page 95
Reports in Power BI
DirectQuery – no data is imported or copied into Power BI Desktop. For relational sources, the selected tables and
columns appear in the Fields list. For multi-dimensional sources like SAP Business Warehouse, the dimensions and
measures of the selected cube appear in the Fields list. As you create or interact with a visualization, Power BI
Desktop queries the underlying data source, which means you’re always viewing current data.
Many data modeling and data transformations are available when using DirectQuery, though with some limitations.
When creating or interacting with a visualization, the underlying source must be queried and the time necessary to
refresh the visualization is dependent on the performance of the underlying data source. When the data necessary to
service the request has recently been requested, Power BI Desktop uses recent data to reduce the time required to
display the visualization. Selecting Refresh from the Home ribbon will ensure all visualizations are refreshed with
current data.
Page
Power BI (in-depth Understanding)
98
REPORT VIEW (INTERFACE)
Page
Power BI (in-depth Understanding)
99
POWER BI DESKTOP FILTERS
➢ Visual Level Filter: This gets applied to only to the active visual.
➢ Page Level Filter: This gets applied to all the visuals in the existing page.
➢ Report Level Filter: This gets applied to all the visuals in all the existing
pages in the report.
Page
Power BI (in-depth Understanding)
100
REPORT INTERACTIONS
By default, all the visualizations are connected to each other and filtering items in one visual will impact others too.
Through “Edit interactions” we can prevent certain visualizations to get filtered.
Page
Power BI (in-depth Understanding)
101
Reports and Visualisation
types in Power BI
Page
Power BI (in-depth Understanding) 102
Reports and Visualization types in
Power BI
Types of visualization in a Power BI report
Custom visualization to a Power BI report
Types of visualization in a Power BI report
Add a custom visualization to a Power BI report
Download a custom visual from the gallery
Getting started with color formatting and axis properties
Change how a chart is sorted in a Power BI report
Move, resize, and pop out a visualization in a Power BI report
Drill down in a visualization in Power BI
Power BI also provides us an option to download custom visualization from the Microsoft App store.
Page 105
VISUALIZATION SETTINGS
Page 106
VISUALIZATION DRILL DOWN OPTION
When a visual has a hierarchy, it supports drill down/up feature e.g. putting “Product Category, Sub-Category and
Product” into a matrix will automatically enable dill down/up feature.
Page 107
KPI VISUAL
Page 108
DRILLTHROUGH FILTERS
It helps in creating a dedicated page for specific entities. A detailed page can be created for the user to dig-in from the
dashboard. The moment we add a drillthorugh filter, Power BI automatically adds a back button to go back to the
overview.
Page 109
Dashboard in Power BI
Page
Power BI (in-depth Understanding) 110
Dashboard in Power BI
Create a Power BI dashboard
Dashboard tiles in Power BI
Pin a tile to a Power BI dashboard from a report
Pin a tile to a Power BI dashboard from Excel
Power BI publisher for Excel
Pin an entire report page to a Power BI dashboard
Data alerts in Power BI service
Add an image, text box, video, or web code to your dashboard
Edit a tile -- resize, move, rename, pin, delete, add hyperlink
Tips for designing a great Power BI dashboard
Print a dashboard, print a dashboard tile, print a report page
Display dashboards and reports in Full Screen mode (TV mode)
Display a dashboard tile in Focus mode
Featured dashboards in Power BI
Create a phone view of a dashboard
Add an image to a dashboard
• This is a single page view of overall story through visualizations. For detailed
summary, user can visit the related reports.
• Dashboard is a feature of Power BI Service. This is unavailable in Power BI Desktop.
A pro license if needed to access Power BI Service.
Page
Power BI (in-depth Understanding) 112
ADVANTAGES OF A DASHBOARD
Page
Power BI (in-depth Understanding) 113
DIFFERENCE BETWEEN DASHBOARD & REPORT
Dashboard Report
Po
agwee1r1B4I (in-depth Understanding)
TILES IN DASHBOARD
One can add a new tile from within the Dashboard. Clicking on these tiles will take back into the report. Even a whole
report page can be pinned to dashboard. This is also considered as pinning a live tile because tiles from reports are
synced and upon any update in report will update these tiles in dashboard too.
Page 115
PIN AN ENTIRE REPORT PAGE TO PBI DASHBOARD
• If the requirement is to pin more then one visualization in the dashboard then its better to pin the
entire report. When we pin the complete page then the tiles become live, we can interact with them
directly from the dashboard.
Page
Power BI (in-depth Understanding) 116
DATA ALERTS IN POWER BI SERVICE
• Setting a data alert is possible with Power BI Pro license. Alerts can only be set on the tiles pinned from report
visuals, and only on gauges, KPI’s and cards. Alerts can’t be set on the streaming tiles created directly on the
dashboard.
Page
Power BI (in-depth Understanding) 117
CREATE A PHONE VIEW OF A DASHBOARD
• Viewing dashboard in a portrait mode on a phone will laid the tiles out as one after another in same
size. In PBI service, we can create a customized view of the dashboard, specially for the portrait mode on
the phone.
Page
Power BI (in-depth Understanding) 118
Data Refresh in Power BI
• Gateway Connection
• Data Source Credentials
• Schedule Refresh
Thank You