Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Dr Akhter Raza
Informatica
Dr Akhter Raza
Informatica
Dr Akhter Raza
MSBI
Dr Akhter Raza
MSBI
Dr Akhter Raza
IBM Cognos
Dr Akhter Raza
Power BI
Dr Akhter Raza
MSBI
Dr Akhter Raza
Power BI?
Dr Akhter Raza
What is Power BI?
• New Microsoft Business Intelligence product line
• Aimed at business power users and end-users
• Rich interactive reports, dashboards, charts, graphs, and maps
• Minimize clicks to complete tasks
• Open source/custom visualizations
• Remove Office 365 & SharePoint Online Requirements
History of Power BI
• PowerPivot – Excel add-in
• SQL Server 2012 SSAS Tabular Model
• Microsoft BI Semantic Model (BISM)
• PowerView
• Re-branding to Power BI
• SharePoint and Office 365 integration
• Power BI (December 2014)
• Power BI Service & Desktop GA (July 2015)
What is Power BI Desktop?
According to Microsoft:
Source: https://powerbi.microsoft.com/en-us/desktop
What is Power BI Desktop?
• Standalone design/development/rendering app with
deployment to Power BI Service
• Currently integrates:
• Power Query
• Power Pivot
• Power View
• New Power BI Desktop file extension .pbix
What is Power BI?
• PowerBI.com & Power BI Desktop
• Access on-prem sources:
SQL Oracle Teradata
MySQL PostgreSQL Sybase
Analytics Platform Service (APS, includes PDW)
IBM DB2 HDFS And more!
• Online data sources – Azure
• Built-in connectors for SaaS:
Salesforce Google Analytics GitHub
Zendesk SAP And more!
Two versions
PowerBI.com
Power BI Desktop
Future
• Cross Platform Support (iOS & Android)
• Cross Browser Support (Edge, Chrome, Firefox, etc.)
• Active Directory Security Integration
• Separation from v1 tools in Excel 2016
• Pyramid Analytics Integration (onsite solution)
• SQL Server 2016?
• Integrate Power Map?
• More SaaS connectors?
• Integration with SharePoint?
Introduction to Power BI
Ch. 1
Dr Akhter Raza
what exactly will you do in PBI?
1. Import data
2. Model data
3. Create reports and dashboards
Dr Akhter Raza 2
1. ETL—Extract transform and load
• Import data from a wide variety of sources. This covers
corporate databases to desktop files, social media to big
data.
• Merge data from multiple sources and shape it into a
coherent structure.
• Cleanse your data to make it reliable and easy to use.
• Break down the data into the rows and columns that suit
your requirements.
Dr Akhter Raza 3
2. Modeling Your Data
• Enrich the data model by applying coherent names and data types.
• Create calculations and prepare the core metrics that you want to
use in your analyses and presentations.
Dr Akhter Raza 4
3. Creating Reports and Dashboards
• Tables
• Matrices
• Charts
• Maps
• Gauges
• Text and Images
• KPIs
Users can “slice and dice” the data “on the fly” in real
time using • Slicers and • Filters 5
Dr Akhter Raza
Power BI Desktop Files
A Power BI Desktop file contains all the dashboards and all the
data that is needed by each element (called a visualization) on
each page. So, a Power BI Desktop file is completely self-
contained.
Dr Akhter Raza 6
The Power BI Universe
• PowerBI.Com: An Azure-based service where you can create
and share data and dashboards.
Dr Akhter Raza 9
Installing Power BI Desktop
https://www.microsoft.com/en-us/download/details.aspx?id=45331
Dr Akhter Raza 10
Power BI Desktop
Dr Akhter Raza 11
First PBI Desktop Dashboard
Dr Akhter Raza 12
First PBI Desktop Dashboard
Dr Akhter Raza 13
First Power BI Desktop Dashboard
Dr Akhter Raza 14
First Power BI Desktop Dashboard
Dr Akhter Raza 15
First Power BI Desktop Dashboard
Dr Akhter Raza 16
First Dashboard
Dr Akhter Raza 17
Adding a Column Chart of DeliveryCharge
Dr Akhter Raza 18
Adding a Column Chart of DeliveryCharge
Dr Akhter Raza 19
Adding a Column Chart of DeliveryCharge
Dr Akhter Raza 20
Adding a Map of LaborCost by Country
Dr Akhter Raza 21
Adding a Map of LaborCost by Country
7. Hover the mouse over a country you will see the labor cost for
that country
Dr Akhter Raza 22
Adding Card Showing TotalCost of SpareParts
Dr Akhter Raza 23
Adding a Slicer by Make
1. Drag the Make field to a blank area on the dashboard canvas.
Power BI Desktop will create a list of vehicle models.
2. Click the slicer icon in the Visualizations pane2. Click the card
icon in the Visualizations pane
3. test the slicer by selecting—or deselecting—any car model that
is listed in the slicer. The other visualizations on the dashboard
will instantly be updated to reflect the choice of models.
4. This slicer can be used to filter data
Dr Akhter Raza
24
Final look of dashboard
Dr Akhter Raza
25
Final look of dashboard
Dr Akhter Raza
26
Formatting Reports
Dr Akhter Raza
28
Creating and Modifying Reports
29 Dr Akhter Raza
Creating and Modifying Reports
30 Dr Akhter Raza
End of Ch. 1
Extracting data from files
Ch. 2
Dr Akhter Raza
Data Sources
Fetching data from different variety of sources
Dr Akhter Raza 2
Data Sources
• Azure: This option lets you see an immense range of data types that is
hosted in the Microsoft Cloud. This covers data formats from
SQL Server through to big data sources.
Dr Akhter Raza 4
A CSV File
Dr Akhter Raza 5
Extracting from CSV Files
Dr Akhter Raza 6
Extracting from CSV Files
• Click the Edit button. The Power BI Desktop Query window appears
• First 200 rows
• Entire data set
• Do not detect data type
Dr Akhter Raza 7
Text Files
• Can have something other than a comma to separate the
elements in a list. Delimiter can be specified at loading
8
Dr Akhter Raza
Text Files
• Must not contain anything other than the dataset if you want a
flawless data load
9
Dr Akhter Raza
Opening Text Files in Power BI
• Click Get Data ➤ Text/CSV. The Open dialog will be displayed
• Navigate to the folder containing the file CountryList.txt
• Click Open double-click the file name rather than click Open.
• Click the Cancel button because we do not really need it
10
Dr Akhter Raza
File Delimiters Data Type Detection
• Colon Read the first 200 rows
• Comma Read the entire file
• Equals sign No data type detection
• Semicolon
• Space
• Tab character
11
Dr Akhter Raza
XML Files
• Click the check box to the left of the Colors dataset on the left.
The Load and Edit buttons will be enabled.
• Click the Edit button. The Power BI Desktop Data window will
display the contents of the XML file.
• Click the Close and Apply button in the Power BI Desktop Data
window. You will see that the Colors dataset appears in the
Fields list on the right of the screen
Dr Akhter Raza 13
Importing Excel file
Dr Akhter Raza 15
Importing Excel file
Dr Akhter Raza 16
Microsoft Access Databases
Dr Akhter Raza 17
Microsoft Access Databases
Dr Akhter Raza 18
Error to connect 32 or 64 bit version
Dr Akhter Raza 19
Connecting to JSON file
22
Dr Akhter Raza
Loading the Contents of a Folder
Dr Akhter Raza 24
End of Ch. 2
Extracting Data from Databases &
Data Warehouses
Ch. 3
Dr Akhter Raza
Relational Database vendors
SQL Server Access database
SQL SSAS database Oracle database
IBM DB2 database IBM Informix database
IBM Netezza MySQL database
Sybase database Teradata database
SAP HANA database
Dr Akhter Raza 2
Connecting with SQL Server
1. Open a new PBI application
2. Click Get Data button SQL Server
3. Enter Server name
4. Enter atabase name BikeStores
5. Click the Import button
6. Click check boxes for selecting
tables to load
7. Press load button
Dr Akhter Raza 3
Select the database tables
Dr Akhter Raza
4
Database Connection Options
Dr Akhter Raza 5
Connect to SQL server
using a SQL Statement
1. Get Data SQL Server
2. Server name DESKTOP-T94NDVF
& database name BikeStores
3. Enter the SQL command that you
want to enter in this case
SELECT * FROM sales.orders
4. Click OK
Dr Akhter Raza 6
Connect to SQL server
using a SQL Statement
Dr Akhter Raza
7
Extracting from CSV Files
• Click the Edit button. The Power BI Desktop Query window appears
• First 200 rows
• Entire data set
• Do not detect data type
Dr Akhter Raza 8
End of Ch. 3
Using Data by
Direct Query and Connect Live
Ch. 4
Dr Akhter Raza
What is DirectQuery or ConnectDirect
Connect directly to the data source and avoid having to download the
data. This technique is called DirectQuery
Dr Akhter Raza 2
How DirectQuery different from data load
• Don't load data into PBI. Instead, use it directly from database server
• As we don't load a copy of the data therefore we can‘t work offline
• Connection to source database is usually extremely fast
• Data is fetched specifically when required on new visual
• It do not need to refresh data source if ever the data is updated in source
database or data warehouse
• All the data is available from source database or DW
• Data is refreshed every time you apply a slicer or a filter
• At a time only one DirectQuery can be used to connect to database or DW
Dr Akhter Raza 3
Microsoft SQL Server Data
1. Open a new PBI Desktop application
2. Get Data SQL Server click the small triangle at the bottom of dialog
3. Enter server name used by your organization DESKTOP-T94NDVF
4. Enter the database name BikeStores
5. Select the DirectQuery button
6. If you keep Sql Statement box blank then all tables are linked otherwise the
tables specified in the query are associated
SELECT * FROM sales.orders
7. Click load or Transform
Dr Akhter Raza 4
DirectConnect with
Microsoft SQL Server Data
Dr Akhter Raza
5
DirectConnect with
Microsoft SQL Server Data
Dr Akhter Raza
6
End of Ch. 4
Loading Data from Cloud
Ch. 5
Dr Akhter Raza
Creating an account on AZURE for free
1. Click on the link below
https://www.google.com/aclk?sa=l&ai=DChcSEwjEg-
TJrK_lAhVFh9UKHbQ9D4AYABAAGgJ3cw&sig=AOD64_0EaAvQtVinab4Rb
Mf8nQ0iURMzWA&q=&ved=2ahUKEwioltzJrK_lAhUGUhoKHb9lC4IQ0Qx
6BAgQEAE&adurl=
Dr Akhter Raza 2
Creating an account on AZURE for free
Dr Akhter Raza 3
AZURE free Services
Dr Akhter Raza 4
Connect to AZURE
database (DirectQuery)
1. Open a new Power BI Desktop application.
2. Click on Get Data button
3. Click Azure Azure SQL Database
4. Click Connect (an Azure SQL database is a SQL
Server database—but in the cloud)
5. Click Direct Query
6. Enter Azure SQL Database server name. The
SQL Server Database dialog will look like as
shown on next slide
7. Select desired tables and press Load
Dr Akhter Raza 5
Connect to AZURE
database (DirectQuery)
Dr Akhter Raza 6
End of Ch. 5