Power Bi
Power Bi
7. REPORTS IN POWER BI
7.1 Connect to direct SQL Query in Desktop
7.2 There are 3 Different types of views in Power BI.
7.3 Report View
7.4 Table View
7.5 Model View
7.6 Power BI Desktop Filters
7.7 How can we filter Data in Power BI?
7.8 Report Interactions
Page 3 of 60
9. TYPES OF VISUALIZATIONS
9.1 Card
9.2 Bar Graph
9.3 Pie Chart
9.4 Ring Chart/Donut
9.5 Line Chart
9.6 Area Chart
9.7 Stack Area Chart
9.8 Tree Map
9.9 Map
9.10 Gauge Chart
9.11 Matrix
9.12 Slicer
9.13 Decomposition Tress
9.14 Q&A
9.15 Custom Visualization to a Power BI
Page 4 of 60
1. BUSINESS INTELLIGENCE (BI) CONCEPTS
Introduction to Business Intelligence
The importance of Business Intelligence
The relation between Business Intelligence and Data Warehouse
Tools and Technologies in Business Intelligence area
DATA WAREHOUSE
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.
ETL
Extract :- The first step in using Data Warehousing is to extract data from single or
multiple sources to load in its environment.
Transform :- The Data which has been extracted, may not come in the desired format or
size etc, so there may be the need to transform the incoming data to meet business
requirements and objects.
Load :- Once the data is being transformed, its ready to be loaded in targeted tables.
Page 5 of 60
1.4 BI TOOLS
• Microsoft Power BI
• Tableau
• Sisense
• Looker
• datapine
• Zoho Analytics
• Yellowfin
• Answer Dock
• Hotjar
• ReportPlus
• QlikView
• SAP BusinessObjects Lumira
• SAP Crystal Reports
• SAP Business Intelligence
• Vista
• Clootrack
Page 6 of 60
2. MICROSOFT POWER BI (MSPBI) INTRODUCTION
Power BI introduction and overview
Power BI Architecture
Introduction and Power BI in Desktop
Why Choose Power BI over Excel
PARTS OF POWER BI
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 7 of 60
2.2 POWER BI ARCHITECTURE
Page 8 of 60
3. INTRODUCTION & GETTING STARTED
How to get Power BI desktop
Power BI Desktop Interface
Change Default Settings
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 publishing 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 cannot accept personal email ids like Gmail,
yahoo etc.
Page G of 60
3.2 POWER BI DESKTOP INTERFACE
Page 10 of 60
How Microsoft App look like?
Views:
1. Report View – Under this we can use different visualizations to build report.
2. 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.
3. Relationship View – This view is useful to build relationships 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 a new page in the report.
Tabs:
1. Home: This is a general-purpose tab and used for connecting new data, editing queries
etc.
2. View: One can set the view and even design the phone layout too.
Help: It’s a good resource to learn this program and even post your queries in PBI
forums/community.
Page 11 of 60
POWER BI DESKTOP INTERFACE (CONT.)
Publish Report: This helps in publishing the reports created in Power BI desktop to
Power BI Service.
Sign-In: To publish the report or import 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 facilitates dropping 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 12 of 60
4. CONNECT TO VARIOUS DATA SOURCES
Connecting PowerBI with Different Data Sources
Connect to CSV files.
Connect to Excel
Connect to text.
Connect to SQL Server
Connect to a Web page.
Enter data directly.
Analysis Services Tabular data
Connect to Direct SQL Query
Page 13 of 60
4.1 CONNECT TO CSV/TEXT/EXCEL FILES
Home Tab -> Get Data -> Click on Text/CSV or Excel -> Choose File -> Open
Comma
Colon
Equal sign
Semicolon
Space
Tab
Custom
Fixed with
Page 14 of 60
4.3 CONNECT TO CSV/TEXT/EXCEL FILES (CONT.)
Load the dataset from Get data.
Page 15 of 60
Choose which dataset you want to choose- For long dataset search via
navigator.
Page 16 of 60
4.4 CONNECT TO SQL SERVER
Home Tab -> Get Data-> Choose SQL server Database or More-> Choose SQL server
database - > Connect.
Page 17 of 60
4.5 CONNECT TO SQL SERVER (CONT.)
Windows – Here we can access the SQL Server database using our windows credentials.
Page 18 of 60
4.5 CONNECT TO SQL SERVER (CONT.)
After selecting the tables that need to be added in the model, we can click on “Load”
to load them into PBI environment directly.
Home Tab -> GetData -> Web data -> Type the URL -> Connect.
Page 1G of 60
4.7 CONNECT TO A WEB PAGE (CONT.)
Once Power BI desktop connects with the web page, it presents the data available into the
navigator window. When we click on any table showing inside the navigator pane, it will
display the preview of data. When we select the Load option in the navigator, Power BI
imports the selected item data and makes them visible inside the Fields Tab.
Home Tab -> Enter Data This will trigger “Create Table” dialogue box.
Page 20 of 60
4.8 ENTER DATA DIRECTLY (CONT.)
To Insert a new Column or row just click on the asterisk (*) symbol which is showing on both
sides of the Column and Row. At the bottom, we can define Table Name, for example –
Customer data.
Home -> Get Data -> SQL server database -> Type server Name -> Type Database (Optional)
-> Click on Direct Query. Enter the credentials to access the database.
Note: Rest of the steps are same as we discussed above in “Connect to SQL Server
Database”.
Page 21 of 60
5. POWER QUERY FOR DATA TRANSFORMATION
Using SQL Different versions of Power Query
Power Query Introduction
Query Editor
Manipulation in Power Query
Power Query acts 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.
o Power BI window Home -> Get Data -> Choose the respective data source ->
Browse the file -> “Edit”. (Here “Edit” button will open Query editor).
Page 22 of 60
5.3 POWER QUERY EDITOR INTERFACE
Home Tab -> GetData -> Web data -> Type the URL -> Connect
Page 23 of 60
5.5 DATA TYPES
Make sure the suitable data type must be assigned to each column.
What is Power Query? Power query is an ETL tool which helps you to clean, shape, and
modify data utilizing instinctive interfaces without doing anything. M-code is a new
programming language that is used in power query.
Page 24 of 60
5.7 MERGE & APPEND QUERIES
Merge Queries This allows us to join two tables based on one common column (like Vlookup
function in Excel) •Example: Merging Sales & Product table based on Product key in both the
tables.
Append Queries It allows us to combine two or more tables that shares the same table
structure and data types. •Example: Appending two years of sales data.
In Power Query there is no step to undo or ctrl+Z will also not work thus follow following
procedure to remove applied steps
Page 25 of 60
5.8 Choose Apply and close
Page 26 of 60
5.10 DEFINING DATA CATEGORIES
Data Categories are used to define geographical data. This will help in plotting the same on
the 3D map, where the “Bing map” will recognize these fields.
To define the same, select the respective column and then go to Modelling tab in Power BI
desktop and choose the related option.
Page 27 of 60
6. DATA MODELLING IN POWER BI
Data Model
Lookup Tables
Primary & Foreign Key
Creating Table Relationships
Snowflake Schemas
Editing Relationships
Relationship Cardinality
Filter
Introduction to DAX
Calculated Columns
Measures
Implicit & Explicit Measures
Calculated Tables
Row Context vs Set Context
Advanced calculations using Calculate functions.
Time Intelligence Functions
Data Modelling helps in building custom calculations on the existing tables, which
can further be used directly into Power BI visualizations.
Page 28 of 60
6.3 WITH DATA MODEL
Now both returns and Product tables are connected. Here, we are getting the correct result.
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” schema.
Page 2G of 60
6.6 EDITING EXISTING RELATIONSHIPS
In the relationship view either one can double click on the relationship thread or can go to
Home -> Manage Relationships.
Page 30 of 60
6.8 RELATIONSHIP CARDINALITY
Cardinality refers to the uniqueness of values in a column. Here, high cardinality means a
higher number of unique values and low cardinality means higher number of repetitive
values.
We can have a two-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 than one Data table in the model.
Page 31 of 60
6.12 INTRODUCTION TO DAX
Data Analysis Expressions (DAX) is a collection of operators and functions used to calculate
and return one or more values. This helps in creating new and meaningful information from
existing data present in our model. We can use DAX by either creating a “Calculated
Column” or by creating “Measures”.
These are new formula-based columns which can be added into the tables. These are
calculated based on the entire column or table. It understands row context, so for basic
statistical functions like sum, count, average etc. this will not be useful.
6.14 MEASURES
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.
Calculated Columns
Page 32 of 60
6.16 ADDING MEASURES
Measures can be added either by right clicking within the table orby using “Quick Measures”.
Implicit Measures These are being created 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 as Sum, count, average etc. These can be accessed only in the visualization
where these have 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 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 33 of 60
6.20 What is DAX ?
It is a formula expression language called (DAX) that can be used with various visualization
tools like Power BI. It is also known as a functional language, where the full code is kept
inside a function.
Page 34 of 60
6.22 All About DAX
New Measure is created with writing DAX m code language for mathematical operations and
will not retain extra data storage in your working data. While New table is created by same
by writing DAX but table create new calculated column and will retain space in your working
space.
7. REPORTS IN POWER BI
Connect to Direct SQL Query in Power BI Desktop
Create a new Power BI report.
The report editor in Power BI
Add a page to a Power BI report.
Add a filter to a report in Power BI
Save a report in Power BI
About filters and highlighting in Power BI reports
How to use report filters
Analyze in Excel
Other Miscellaneous operations
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 35 of 60
REPORT VIEW (INTERFACE)
Page 36 of 60
7.3 REPORT VIEW
Report view – For making reports using different visualization charts. "Report" view is where
you create, design, and interact with visualizations based on your data.
Page 37 of 60
7.5 MODEL VIEW
Model view – "Model view" is a feature that allows you to view and manage the relationships
between different data tables within your dataset.
Page 38 of 60
7.7 How can we filter data in Power BI?
Data can be filtered using various filters that are available in Power BI, implicitly. There are
basically three types of filters, namely, Page- level filters, Drillthrough filters, and Report-
level filters.
Page 3G of 60
8. REPORTS AND VISUALIZATION TYPES IN POWER BI
Area
Stacked Area
Bar/Column
Clustered Bar/Column
100% Stacked Bar/Column
Combo •Ribbon
Tree map
3D Map
Filled Map
Card/KPI
Slicer
Table
Matrix
Doughnut
Funnel
Gauge
Line
Pie
Scatter
Waterfall
Page 40 of 60
TYPES OF VISUALIZATION IN A POWER BI REPORT
Accessing the different visualizations from PowerBI Report view: -26 Charts are provided
default and More can be imputed with paid login id. Charts are visible under Build portion.
Activating all the pane from format option at rightmost side of the report view
Page 41 of 60
Making visualizations in report view
Making title for visualization using Text Box option available on top and with formatting
option visible in white strip we can entitle the visualization.
Choose horizontal bar graph option from insert or build suggestions. Choose values for x-
axis and y-axis Build option, click on 3 dots available on top of bar graph to get option like
Export data, Show as a table, Remove, Spotlight, Sort axis and Format.
Page 42 of 60
Formatting the Visualization
Format Pane: The "Format" tab contains several sections, each with its own set of formatting
options. These options may vary depending on the type of visualization you've selected.
Data colors: Customize the colors used within the visualization, including data series
colors, background colors, and font colors.
Data labels: Control the appearance of data labels, including font size, color, position, and
formatting.
Title: Customize the title of the visualization, including font size, color, alignment, and
formatting options.
X-axis / Y-axis: Format axis labels, titles, scales, and other properties specific to the X and
Y axes.
Legend: Adjust the appearance and position of the legend, including font size, color,
orientation, and visibility.
Shapes: Add shapes or lines to the visualization and customize their appearance, such as
color, style, and thickness.
Tooltip: Customize the tooltip that appears when hovering over data points in the
visualization, including the information displayed and formatting options.
Small multiples: Instead of viewing a single large chart, small multiples allow users to
compare different categories or dimensions within the same chart type.
Page 43 of 60
Exporting Data
Users can export the data displayed in visualizations such as charts, tables, matrices, and
other visual elements.
Page 44 of 60
Show as table
"Show as table" is a feature that allows you to view the data underlying a visualization in a
tabular format
Removing
Page 45 of 60
Spotlight
Sorting graph
Page 46 of 60
Focus mode
Focus mode in Power BI allows users to view a visual or a report in full-screen mode,
providing a distraction-free environment for focused analysis.
Types of Visualization
9.1 Card
"Card" visualization is a simple yet powerful way to display a single value or a key
performance indicator (KPI)
Page 47 of 60
9.2 Bar graph
Page 48 of 60
9.4 Ring Chart/Donut
Secondary Axis: Allows plotting two measures with different scales on the same chart.
Small Multiple: Displays multiple charts, each representing a subset of data, for
comparison.
Legend: Color-coded key identifying categories or measures represented in the chart.
Page 4G of 60
9.6 Area Chart
Secondary Y-axis: Allows plotting two measures with different scales on the same chart.
Legend: Color-coded key identifying categories or measures represented in the chart.
Tooltip: Provides additional information when hovering over data points.
Page 50 of 60
9.7 Stack Area Chart
A stacked area chart in Power BI is a type of visualization that displays multiple series of
data as layers, stacked on top of each other. Each layer represents a different category or
subgroup of the data, and the combined height of the layers at any given point represents
the total value of the data for that category.
Page 51 of 60
9.9 Map
Location: Represents geographic data points plotted on the map.
Legend: Color-coded key identifying categories or values on the map.
Latitude and Longitude: Coordinates specifying the location of each data point.
Bubble Size: Size of data markers representing quantitative measures on the map.
Tooltip: Provides additional information when hovering over data points.
Page 52 of 60
9.10 Gauge Chart
A gauge chart in Power BI is a type of visualization used to display a single value within a
predefined range or target. It resembles a speedometer or gauge found in dashboards and
instruments. Single Value Representation: A gauge chart typically represents a single value,
such as a key performance indicator (KPI), a progress metric, or a target attainment
percentage.
9.11 Matrix
A matrix in Power BI is a data visualization tool that organizes data in rows and columns,
similar to a spreadsheet or a pivot table.
Page 53 of 60
9.12 Slicer
Slicers are interactive visualizations that allow users to filter data across multiple
visualizations and reports dynamically. They are typically used to filter data based on
specific criteria, such as categories, time periods, or regions, enabling users to focus on
relevant subsets of data.
The decomposition tree is a powerful visualization tool in Power BI that enables users to
analyze and understand the factors driving a particular metric or measure.
Page 54 of 60
9.14 Q&A
Q&A (Question and Answer) is a feature in Power BI that allows users to ask questions
about their data using natural language queries and receive instant visualizations and
insights in response. Here's how it works:
Natural Language Queries: Users can type questions in plain English (or other supported
languages) directly into the Q&A box in Power BI. They can ask questions about their
data, such as "What were the sales last month?" or "Show me a pie chart of sales by
region.
" Natural Language Processing (NLP): Power BI's Q&A feature utilizes natural language
processing (NLP) technology to interpret and understand the user's query. It analyzes
the text input to identify keywords, entities, and intents, allowing it to generate relevant
visualizations and insights. Instant Visualizations: After interpreting the user's query,
Power BI dynamically generates visualizations that best represent the requested
information. It automatically selects the appropriate visualization type based on the data
and the nature of the query.
Page 55 of 60
9.15 CUSTOM VISUALIZATION TO A POWER BI
Power BI also provides us an option to download custom visualization from the Microsoft
App store.
VISUALIZATION SETTINGS
These settings are different for each visualization.
Page 56 of 60
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.
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 drill through filter, Power BI
automatically adds a back button to go back to the overview.
Page 57 of 60
10. 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.
Publish PowerBI report.
POWER BI DASHBOARD
This is a single page view of the 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.
DASHBOARD :-
REPORT: -
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 58 of 60
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.
Setting a data alert is possible with Power BI Pro license. Alerts can only beset 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.
To Navigate to a certain report on click, you must Bookmark a page and assign the bookmark
to a button or icon. Page navigation helps you direct you directly on required report view page
or parameter.
Page 5G of 60
Follow A S M Sadman Sakib for more
Valuable posts like this.