0% found this document useful (0 votes)
7 views

1. power_bi

The document provides an introduction to Microsoft Power BI, outlining its benefits, capabilities, and components such as Power BI Desktop, Service, and Apps. It emphasizes the need for Power BI over Excel for data analytics due to limitations in handling large datasets and data visualization. The document also covers data sourcing, ETL processes, and data preparation techniques, along with the importance of cleaning and transforming data for effective reporting.

Uploaded by

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

1. power_bi

The document provides an introduction to Microsoft Power BI, outlining its benefits, capabilities, and components such as Power BI Desktop, Service, and Apps. It emphasizes the need for Power BI over Excel for data analytics due to limitations in handling large datasets and data visualization. The document also covers data sourcing, ETL processes, and data preparation techniques, along with the importance of cleaning and transforming data for effective reporting.

Uploaded by

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

UNIT-1: MS Power BI

CHAPTER-1
Introduction To Power BI
Learning objectives
 Understand Power BI's role-specific benefits.
 Create a report and dashboard.
 Explore role-based features.
 Collaborate and share reports.
 See real-world role customization examples.
Is Excel enough for
Data Analytics?
 We CAs use Excel predominantly for data analysis.
 When it comes for enterprise data Excel is having the following
limitations:
 Row limitation of 1048576 rows.
 Pivot Table can handle only a single flat table.
 Data visualization is not effective and synchronised or at
least not interactive to each other.
 Data from multiple sources cannot be imported (like
json, pdf etc.).
 OLAP and Data Modelling requires Robust Columnar
Databases for optimizing the performance of reporting.
Need for a Tool like
Power BI
 Increasing Business Challenges
 Availability of Data Online
 Multidimensional approach –
Data Cube Automate
d
Accurate
 Online Analytical Processing
 Possibility of Data Driven Decision
Making
Decision Making
 Handling Big Data Integrate
d
Data
driven
 Continuous Monitoring of KPIs
Intelligent
Elements of Power BI
 Power BI Desktop (Free) –
Used by Developers of Power
BI Reports
 Power BI Service – Online
SaaS – a web service to share
Reports
 Power BI Apps - available on
phones and tablets.
Power BI Capabilities
 Capacities – Set of Resources to share
content Reports

 Workspaces – Containers of datasets,


Dashboard
reports etc., Datasets
s

 Datasets – Collection of underlying data for Capabilities of


reports Power BI

 Reports – Data Visualizations and other Workspace Template


s Apps
elements
 Dashboards - single interactive canvas Capacities

with tiles and widgets.


 Template Apps – Out of the box content to
publish for Power BI Partners
Conceptual Understanding
• Relationships • Fact
• Fact Centered • Dimension
• Star/ • Hierarchy
Snowflake • Measures
Schema

Data
OLAP
Modelling

Power Visualizati
Query on

• Extract • DAX
• Transform • Interactive
• Load Visuals
• M Language
Other Related Concepts
 Columnar Databases
 SQL & NoSQL
 Data Flow
 Filter Context
 Row Evaluation Context
 Context Transition
 Data Cube Operations
Power BI Reporting
Pin visuals
Build
Data sets to
Report
Dashboard

Data Share link


Extract
Modelling to the users

Report
Transform Load Consumptio
n
UNIT-1: MS POWER BI

CHAPTER-2 Connecting to
Data Sources
Learning Objective
 Explore the data-centric features and tools
of Power BI.
 Explore ways to find data.
Getting Ready …
 Download Power BI Desktop (free from Microsoft
Website)
 https://powerbi.microsoft.com/en-us/downloads/
 Sign-in to Power BI Service
 Launch Power BI Desktop
 Three major views of Power BI Desktop
 Report View (Default)
 Data View
 Model View
Get familiar with the
interface
 Ribbon
 Report View or Canvas
 Page Tab
 Panes
 Layout
Power BI Workflow

Report
Consumptio
Publish to n
PBI Service
Create and
Data Connect
Modelling Visuals
ETL & Creating
Measures
Data
Source
Data Preparation and
Process
 Need for ETL
 Data coming from different sources like Text, CSV, XML,
JSON, PDF, ODBC, Web, Cloud, Dataverse, Big Data, Images
etc.,
 Clean and standardize the data to integrate with multiple
sources
 Moving from Entity Centred approach to Fact Centred
approach
 In RDBMS > Entity in the centre Attributes in the
surrounding
 In OLAP > Fact in the centre, Dimensions in the
surrounding
 Load only the data relevant for the reports to optimize space
What is ETL?

ETL stands Data Data Data Loading Data Quality Metadata Data
for Extract – Extraction Transformati Assurance Management Governance
Transform – on and Security
Load
Full or incremental Convert data into a Loading Handling Managing Ensuring
extraction format that is transformed data exceptions and metadata to track compliance with
methods used to compatible with into the data errors encountered data lineage, data governance
get the required the schema. model. during the ETL transformations, policies and
data. Applying business process. and dependencies. regulations.
Ensuring data rules, data Data profiling and Documentation of Implementing data
quality and validation, and cleansing to ETL processes and security measures
consistency during data enrichment improve data data mappings for during the ETL and
the extraction processes quality before transparency and entire reporting
phase. loading. governance. process.
Role-based access
controls for
sensitive data
handling.
ETL IN POWER BI

Power Query Running in M


Editor It is a Process Output of Step 1
Language (Data
• ETL Tool integrated in Flow Modelling becomes in input
Mashup
Power BI Software of Step 2
Language)

No coding It automates the


necessary by the ETL process by
Like recording a
user. commands designing one
macro in Excel.
are GUI/Menu time using many
based. times.
EXTRACT DATA
 Using various kinds of
data connectors
available in Power BI we
can extract from almost
any form of digital data.
 This is the starting point
of using Power BI.
 Use Home Menu -> Get
Data for Common Data
Sources
 Click More if needed to
get data from further
many sources
CLEAN AND TRANSFORM
 If we need to clean the data, we can use Power Query
Editor.
 Click Home->Transform Data to enter Power Query Editor.
Uses of Power Query
Editor
 Clean the data  Change the Format or
 Removing unwanted Type
rows/columns/data  Extract day, month, year
 Replacing values  Do time related
 Transform the data calculations
 Splitting a Column into two
 Adding a calculated column
 Transpose
 Pivot
 Unpivot etc.,
 Merge and Append multiple Queries
from same or different source of
data.
UNIT-1: MS POWER BI

CHAPTER-3.1
Querying and Shaping the
Data
LEARNING OBJECTIVES:
 Identify and connect to a data source
 Get data from a relational database, such as
Microsoft SQL Server
 Get data from a file, such as Microsoft Excel
 Get data from applications
 Get data from Azure Analysis Services
 Select a storage mode
 Fix performance issues
 Resolve data import errors
Get data from multiple
sources
 An organization may have data in multiple sources,
but they are related. Getting the data into Power
Query is the first step.
Get data from Flat Files
 Flat files are individual data files.
 Data from external sources may also be required for
analysis (like) GST/Bank account data for
reconciliation)
 These files are usually in one of the following formats.
 Txt (Fixed width)
 Csv (Delimited)
 XLSX (Excel Files)
 XML (Tree Structure Data)
 PDF (Portable Document Format)
 Json (Nested Tables/Key Value pairs)
Get data from Flat
Files … Contd.
 Flat files may be in
 Local drives
 OneDrive for Business
 OneDrive Personal
 Sharepoint Folder
 Data source can be changed later by clicking Home-
>Transform Data-> Data Source Settings
 Make sure the same structure of the data is being
loaded every time.
Get data from
RDBMS
 Transaction data of an organization (like
a typical ERP) is stored mainly in RDBMS.
 Power BI can connect any RDBMS data
as source of data using specific
database-oriented connector or through
ODBC (Open DataBase Connectivity)
 Example, Tally data can be connected
through TallyODBC.
Get data from RDBMS
 First connect to the RDBMS Server using Data connectors
 Two ways to get data from RDBMS
 Selecting required individual tables
 Running a customized query
Dynamic Reports with
Parameters
 Dynamic Reports can be created by passing
Parameters to SQL Queries
 Steps to be followed:
 Create a query with parameter
 Create a Parameter (Home->Manage Parameters-
>New Parameter)
 Convert the Query to a Function (Right Click Query-
>Create Function)
 In any other query having the parameters as a
column, Add a Column by Invoking Custom Function
Dynamic Reports with
Parameters
Step 1 Step 2
Dynamic Reports with
Parameters

Step Step 4
3
Get Data from NoSQL (Not
only SQL) Database
Data can be extracted from NoSQL Databases like Azure
Cosmos DB.
JSON DOCUMENTS
 In NoSQL
databases,
data is stored
in the form of
JSON
documents
which can be
easily
extracted into
Power Query
Editor
 By pressing
Expand button
we can extract
Get Data from Online Services
 Data can be downloaded from online services like
SharePoint, OneDrive, Google Analytics, Dynamics
365 etc.,
Storage Modes
 Data can be stored in three modes in Power BI
Services
 Import Mode (Create a local copy of data)
 Direct Query (Make a query whenever required)
 Used for viewing the most up-to-date data
 Dual (Composite of above two)
 Some part is copied
 Balance is queried
Get data from Azure
Analysis Services
Azure Analysis Services is a fully managed platform
as a service (PaaS) that provides enterprise-grade
data models in the cloud.
Create a Semantic Model to perform ad hoc data
analysis
Fix Performance
Issues
 Use Performance Analyzer to fix tune
performance issues.
 To optimize the performance use
performance tuning techniques
 Index Creation
 Hardware Upgrades
 Query Execution Plan Tuning
 Data Compression etc.,
Fix Performance
Issues

 Query Folding
 A method used by the Power Query
Editor to convert internally Power Query
steps to Native SQL Query.
 Useful only for SQL Query connectors
and not flat file connectors.
 If Query Folding is possible, View Native
Query option will be enabled.
 The idea is to run the steps in SQL
server itself if possible, instead of
running the steps by Power Query.
Query Diagnostics
• This tool is useful when you
want to analyse
performance on the Power
Query side for tasks such as
loading datasets, running
data refreshes, or running
other transformative tasks.
Optimize Performance
 Process as much possible in the native source itself
instead of Power Query
 Instead of CTE (Common Table Expressions) or Stored
Procedures, use Native SQL Queries.
 Column separation like Date and Time into two
columns can be done in the source itself.
Resolve Data Import
Errors
Common Errors
Query Timeout Expired
Couldn’t find data formatted as table (in
Excel files)
Couldn’t find file
Data Type mismatch errors
Date format errors (importing US date
format (mm/dd/yyyy) in Indian date format
(dd/mm/yyyy) without using locale.
These errors can be resolved if we properly
follow the help and documents.
UNIT-1: MS Power BI

CHAPTER-3.2
Clean, Transform, and Load
Data in Power Bi
Learning objectives
 Resolve inconsistencies, unexpected or null
values, and data quality issues.
 Apply user-friendly value replacements.
 Profile data so you can learn more about a
specific column before using it.
 Evaluate and transform column data types.
 Apply data shape transformations to table
structures.
 Combine queries.
 Apply user-friendly naming conventions to
columns and queries.
 Edit M code in the Advanced Editor.
Clean, Prepare and
Process the data
 Cleaning the data is a challenging task for the data analyst since
Garbage In is Garbage Out.
 We need to systematically treat
 Null values
 Duplicates
 Multiple column values in a single column like address
containing PIN code, City, State etc.,
 Blank Rows/Columns etc.,
Identify Columns and
Names
 From the chunk of data imported (especially if it is not
from structured data) we need to identify columns and
names.
 Promote the column headers when needed
Clean, Prepare and
Process Data
 Power Query is having transformation
tools like
 Remove Top Rows, Blanks
 Keep Rows
 Remove Duplicates
 Remove Columns
 Choose Columns
 Transpose
 Pivot
 Unpivot
 Parse
 Split
Unpivot Columns
 Unpivot is an important feature in
Power Query Editor
Data before Unpivot Data after Unpivot
Replace Values
 Replace any value with any value even in multiple columns
together is a handy tool
Remove Duplicates
 Duplicates can be removed either
for a single column or multiple
columns together.
Change Column Types
 Choose appropriate column types to make the reports
accurate.
Date formatted as Text Date formatted as Date

Using Locale can be used for


Date from different countries
Combine Files
 Multiple Tables can be made into a single table by the
following ways:
 Combine
 When all the source files are having same
structure, it is useful to combine into a single table.
Append Queries
 Append is Row wise addition of Tables
 It is assumed that column names are same in all
the tables. Note: Power Query is case sensitive.
 Columns need not be in the same order.
 Two or more queries can be appended.
 Queries can be appended to an existing query, or a
new query can be created by appending all the
queries.
Merge Queries

 Merging two queries is like the typical SQL


Join.
 It is column wise addition.
 It is like vlookup function in Excel.
 Six kinds of Join can be done
 Left Outer
 Right Outer
 Full Outer
 Inner
 Left Anti
 Right Anti
Various kinds of Merging
Queries

Left Outer Inner Right Outer

Left Anti Right Anti

Full Outer
Column Profile
Distribution &
Quality
 Column Profile
 Helpful to find nuances of
data
 Anomalies
 Outliers
 Unique and Distinct
Count
 Column Distribution
 View of value distribution
of all the columns
 Column Quality
 Composition of valid,
error, empty data column
wise.
Use Advanced Editor to
modify M Code
 Each time you shape data in Power Query, you create
a step in the Power Query process.
 It is rarely used.
 Sometimes easy to modify M Code directly.
 View->Advanced Editor will show the M Code for the
current query.
UNIT-1: MS POWER BI

CHAPTER-4
Data Visualizations and
Data Extractions
LEARNING OBJECTIVES:
 Explore Power BI Visuals
 Create Power BI Visuals
 Create and import a custom report theme.
 Create custom visuals with R or Python.
 Enable personalized visuals in a report.
 Review report performance using Performance
Analyzer.
 Design and configure Power BI reports for
accessibility.
Introduction to Power
BI Visuals
“A picture is worth a thousand words”
Complex data can be depicted in a simple
visual.
X1 Y1 X2 Y2 X3 Y3 X4 Y4

10 8.04 10 9.14 10 7.46 8 6.58

8 6.95 8 8.14 8 6.77 8 5.76

13 7.58 13 8.74 13 12.74 8 7.71

9 8.81 9 8.77 9 7.11 8 8.84

11 8.33 11 9.26 11 7.81 8 8.47

14 9.96 14 8.1 14 8.84 8 7.04

6 7.24 6 6.13 6 6.08 8 5.25

4 4.26 4 3.1 4 5.39 19 12.5

12 10.84 12 9.13 12 8.15 8 5.56

7 4.82 7 7.26 7 6.42 8 7.91

5 5.68 5 4.74 5 5.73 8 6.89

Average X 9 XY Correlation 0.816

Average Y 7.5 R Squared 0.67

Sample Variance 11 Linear Regression 3.00+0.50x


Power BI Visuals
 Power BI Visuals are
 Dynamic
 Interactive
 Customizable and Flexible
 Wide in variety
 AI Powered
 Easy to Share
Create Visuals in
Power BI
 Two ways to create a visual
 Drag and Drop any field from data to report
canvas area, then select the type of visual.
 Select the Visual and then drag and drop the
relevant category fields (dimensions) or value
fields (measures) to the visual.
Create Slicers
 Slicers are Interactive Filters
 In Power BI, slicers are also visuals.
 Apart from slicers, every visual element is
(for example a table cell, bar in a bar
chart, pie in a pie chart etc.,) a slicer too!
Create Map Visuals
 Map visuals are useful for showing geographical data.
 Bubble map, filled map are examples of map visuals.
Tables and Matrices
 Tables are used to show values in a row/column
format.
 Matrices are pivot tables, where rows and columns are
used for grouping the values in a summary form or
any showing any measure.
Scatter, Waterfall,
Funnel, Tree map charts
 Scatter – Correlation/Relationship
(Can be animated by Play Axis)
 Waterfall – Changes over time
 Funnel – Process Changes
Modify Colours,
Conditional Formatting
 Just like Excel, we can modify any
colour in any visual.
 Conditional formatting, data bar,
icon sets, and sparklines are also
possible.
Other points to be noted
 Page Layout and Formatting (Mobile view layout is
helpful for designing the report for mobiles)
 Adding Static elements like textbox, images etc.,
 Navigation Buttons
 Manage overlapping elements
4.2 Advanced Data
visualization Concepts
 Report Themes
 There are so many themes available in the gallery
 We can create custom themes by modifying existing themes or
creating new themes.
 Themes can be saved in JSON files.
 Power BI Template (.pbit file)
 Power BI Template files can be used to save the themes and meta
data like DAX Measures and Calculated Tables but without data.
 Personalized Visuals
 Visuals can be modified by Report consumers (if allowed) to
change the type, measures, dimensions, legends, aggregations
etc.
Design the reports with
accessibility features
 Alt text for visuals, shapes, and images
 Set tab order for visuals, shapes, and images
 Consistent font, colors, positioning
 Colorblind-friendly color schemes
 Using text or icons in addition to color
 Avoid jargon and acronyms
 Set sort order for visuals
 Disable auto-start videos and audio
 Provide captions and transcripts for videos and
audio
 Avoid excess decorative shapes and images
Custom visuals,
Performance Analyzer
 Custom Visuals using R/Python
 Advanced R or Python visuals can also be included in Power BI
if installed.
 Review the reports and performance Analyzer
 Performance Analyzer is a built-in feature in Power BI Desktop
that measures how long report elements take to update and
refresh
 Monitor the performance with performance analyzer.
 To improve
 Limit visuals per page. If the entire page is slow to load,
consider spreading visuals across multiple pages instead.
 Remove unnecessary columns and rows. For slower queries,
review the data and determine if anything can be
removed.
Data Extractions
Select
Launch Get Data Connect to
Data
Power BI and data
Source

Load and
Save Power Data Data
Transform
BI File Refresh modelling
data

Create Publish to
Data
Visualizatio Power BI
Security
ns Service
UNIT-1: MS Power BI

CHAPTER-5
Creating Reports and
Output Options
Learning objectives
 Create a report in Power BI
 Share Power BI reports in various formats
Power BI Reports
Output Options
 The main purpose of Power BI Software is to provide right
information to the right person at the right time to take data
driven decision making.
 Power BI Reports can be shared in many ways.
 The common way to share a report of an Enterprise is Publishing
to Web service.
 Browser or even mobile is enough to consume the reports.
 Collaboration and sharing of reports
 Automatic refreshing of data
 Secured access to reports.
Export to PDF
 Power BI Reports can be exported to a Static PDF file.
 To export to PDF, go to "File" > "Export" > "PDF."
Export to PowerPoint
 From online service we can export to PowerPoint presentation.
 In PowerPoint there is a Power BI Add-in to showcase any
Power BI Report.
Export data to Excel
 Every visual is having the feature to export the underlying data
as a csv file and can be imported into Excel for further analysis
easily.
Email Subscription
 Users can get report updates in email if subscribed to Email
subscription service of Power BI
Print Report Pages
 Any report page can be printed from online services
directly.
Power BI Embedded
 Power BI Reports can be embedded and integrated into any
web page or portal using Azure resources.
 This may be useful for having a wider reach.
TH A N
K
YO U

You might also like