Power BI Tutorial - Power BI Desktop Tutorial
Posted by Superadmin on August 19 2020 16:03:47

Power BI Tutorial

 

This MS Power BI Tutorial helps you to learn this tool from basic to advanced. Below set of Power BI links will show you the step by step approach to connecting with multiple data sources, data transformations, and creating reports like charts, tables, matrix, maps, etc with screenshots. Use them to learn Power BI step by step.

  

Power BI is one of the most popular Data Visualization tool, and a Business Intelligence Tool. This ms Power BI tool is a collection of data connectors, apps, and software services, which are used to get data from a different source, transforms data, and produce beautiful reports.

Power BI also allows you to publish them for your organisation. So that you can access them using mobiles, tablets etc. This MS Power BI tutorial explains this steps as well. So, read this completely to learn Power BI

Power BI Desktop Tutorial

We can install the Power BI desktop on our local computer to create our reports. By using this Power BI desktop, we can connect to different data sources such as text files, databases, excel files, etc. Next, we use this data to build Power BI reports by dragging the required charts. Finally, we can share those reports across the organization.

This section of Power BI tutorial covers the establishing connections, preparing data etc

  

 

  1. Download and Install BI Desktop
  2. Add, Rename, Duplicate, and Delete Pages
  3. Connect to SQL Server
  4. Connect to Multiple Excel Sheets
  5. Get Data from Excel Files
  6. Get Data from Text Files
  7. Load Data from Multiple Data Sources
  8. Remove Unwanted Columns from Tables

Download and Install Power BI Desktop

In this section, we show you how to Download and Install Power BI Desktop with screenshots. Installing the Power BI Desktop includes the following steps. So, please follow the steps as we mentioned below.

  

Steps to Download and Install Power BI Desktop

The following are the steps involved in download and install Power BI Desktop.

Download Power BI Desktop

Power BI Desktop is a Free windows based application. You can use this Desktop to Shape the data in a proper format, and to design reports as per the requirements.

In order to download Power BI Desktop, first Go to the official tableau website by clicking this link Download Link.

TIP: You need Power BI Pro access to publish the report, and sharing them.

  

The below screenshot shows you the Downloads page. Either you can click the Download button, or you can click the hyperlink of Advanced Download Options.

Download and Install Power BI Desktop 1

Clicking the Advanced Download Options takes you to the Microsoft website. Here, you can read the Installation steps, software, and hardware requirements.

Click the Download button to download the Microsoft Power BI desktop from this location

Download and Install Power BI Desktop 2

Install Power BI Desktop

To install the Power BI desktop, Please navigate your file system to the Power BI Software that we downloaded previously. Next, click on the application.

Once you click on the application, the below-shown window will open. It is a Security warning, and it may appear if you have any security measures; otherwise, skip to the next step.

Download and Install Power BI Desktop 3

The first page of the Power BI install is a Welcome page. Please click the Next button

Download and Install Power BI Desktop 4

Please, checkmark the I accept the terms of the Licence Agreement option and click the Next button.

Download and Install Power BI Desktop 5

Select the location where you want to install this application. Here, either you can leave the default C location or use the Change button to alter the installation directory.

Download and Install Power BI Desktop 6

Next, Click the Install button

Download and Install Power BI Desktop 7

Wait until the installation completed. 

 

Download and Install Power BI Desktop 8

Click the Finish button to complete the installation process

Download and Install Power BI Desktop 9

Wait till the Power BI Desktop initializes the desktop features.

Download and Install Power BI Desktop 10

Now you can see the installed Power BI Desktop. Let me close the start page

Download and Install Power BI Desktop 11

It is the Power BI Desktop, where we load data from different sources, design reports, and publish them.

Download and Install Power BI Desktop 12

 

Add Rename and Duplicate Pages in Power BI

In this article, we show how to add New Pages, Rename the Pages, Hide Pages, Duplicate Pages, and Delete Pages in Power BI with an example.

 

For the Add Rename and Duplicate Pages in Power BI demo purpose, we are going to use the Pie Chart that we created earlier. Please refer Pie Chart in Power BI article to understand the steps involved in creating Power BI Pie Chart.

Add Rename and Duplicate Pages in Power BI 1

Add Rename and Duplicate Pages in Power BI

The following are the ways to change page names, add new pages, duplicate existing pages, and delete pages in Power BI.

Rename a Page in Power BI

Right-click on the existing page name at the bottom open the context menu. Please select the rename option, as shown below. Or double-click on the Power BI page title allows you to rename it.

Add Rename and Duplicate Pages in Power BI 2

We are renaming the Page to Pie Chart

 Add Rename and Duplicate Pages in Power BI 3

And you can see that the page name has changed

Add Rename and Duplicate Pages in Power BI 4

Duplicate a Page in Power BI

Right-click on the existing page that you want to duplicate open the context menu. Please select the Duplicate Page option, as shown below.

Add Rename and Duplicate Pages in Power BI 5

It duplicates the Page for you

Add Rename and Duplicate Pages in Power BI 6

Create a New page in Power BI

Please click on the Plus + button to create a new page in Power BI

Add Rename and Duplicate Pages in Power BI 7

And you can see the New page.

Add Rename and Duplicate Pages in Power BI 8

Delete Pages in Power BI

Please click on the X button on top of the existing page

Add Rename and Duplicate Pages in Power BI 9

A pop-up message box displayed. Please click on the Delete button to delete the Page.

Add Rename and Duplicate Pages in Power BI 10

Or, right-click on the existing page that you want to delete open the context menu. Please select the Delete Page option.

Add Rename and Duplicate Pages in Power BI 11

It opens the Message box. This time, I will click the Cancel button.

Add Rename and Duplicate Pages in Power BI 12

Hide Pages in Power BI Desktop

Right-click on the page that you want to hide and select the Hide Page option from the context menu. 

 

Add Rename and Duplicate Pages in Power BI 13

And you can see the page is hidden

Add Rename and Duplicate Pages in Power BI 14

Unchecked the Hide Page option to remove the Hide option

Add Rename and Duplicate Pages in Power BI 15

 

 

Connect Power BI to SQL Server

Let us see the step by step approach to connect Power BI to SQL Server Database. In addition to this Connect Power BI to SQL Server, how to use SQL Queries against the data present in SQL Tables with an example.

 

Step by Step approach to Connect Power BI to SQL Server

If you haven’t started the Power BI Desktop yet, Double click on the Power BI desktop to open. Once it is open, it looks like the below screenshot. Please click on the Get Data hyperlink

Connect Power BI to SQL Server 1

If you are in the Power BI visualization page, under the Home tab, click the Get Data option and select the SQL Server, as we showed below. Or select More options.  

 

Connect Power BI to SQL Server 2

We are selecting More options to show you the following window. Use this window to select your desired Data source. Here, we are discussing hot to Connect Power BI to SQL Server. So, let me select the SQL Server Database Option.

Connect Power BI to SQL Server 3

Connect Power BI to SQL Server

The following are the list of available fields to fill to connect Power BI to SQL Server Database

  Connect Power BI to SQL Server 4

Clicking the Advanced option show you the advanced properties.

Connect Power BI to SQL Server 5

You can write your own SQL query to extract data from the specified Database. To do this, write your query inside the SQL Statement box

Connect Power BI to SQL Server 15

Custom Query that we used in the above Connect Power BI to SQL Server screenshot is:

-- Connecting Power BI to SQL Server
SELECT Geo.EnglishCountryRegionName AS Country, 
       Geo.StateProvinceName AS State, 
       SUM(Fact.SalesAmount) AS Sales, 
       SUM(Fact.TaxAmt) AS Tax, 
       COUNT(Fact.OrderQuantity) AS Orders
FROM FactResellerSales AS Fact
  INNER JOIN
     DimSalesTerritory ON 
        Fact.SalesTerritoryKey = DimSalesTerritory.SalesTerritoryKey 
  INNER JOIN
     DimGeography AS Geo ON 
        DimSalesTerritory.SalesTerritoryKey = Geo.SalesTerritoryKey
GROUP BY Geo.EnglishCountryRegionName, Geo.StateProvinceName
HAVING COUNT(Fact.OrderQuantity) > 60000

If you want to use this data, then click Load. For now, let me click the cancel button because I want to select multiple tables.

Connect Power BI to SQL Server 16

NOTE: Don’t worry above the Query, Just understand the procedure. However, If you want to learn, please refer to our SQL Server Tutorial

Let me use the local instance, and click OK

Connect Power BI to SQL Server 6

For now, we are using the current local windows credentials. If you don’t have the permission to access SQL Server, then use other person windows credential by selecting Use alternative credentials.

Connect Power BI to SQL Server 7

In real-time, we only use SQL Server Database credentials. For this, select the database and enter the username and password provided by the Admin person.

For now, I am using the current windows credentials

Connect Power BI to SQL Server 8

Under the Display options, it lists out the Databases that are available for that Instance. In this example, We are selecting the AdventureWorksDW2017 database. 

 

You can download this database from Microsoft official Download Center or GitHub for free.

Connect Power BI to SQL Server 9

Expanding the Database folder display the available Tables and Views. Selecting the table shows the Data Preview.

Connect Power BI to SQL Server 10

From the below screenshot, you can see that we are selecting the required tables. Remember, if you are confused to select tables, then select one Measure table (Orders, or Sales) and click Select Related Tables button.

Connect Power BI to SQL Server 11

Please wait until the load is complete

Connect Power BI to SQL Server 12

Now you can see the Tables that we selected from the SQL Server database under the Fields section.

Connect Power BI to SQL Server 13

Expand any table to see the columns (fields) inside that table.

Connect Power BI to SQL Server 14

TIP: This is the Dataset that we are going to use in most of the Power BI tutorial.

 

Connect Power BI to Multiple Excel Sheets

In this article, we show you how to connect Power BI to Multiple Excel Sheets, and how to use data present in those Excel sheets.

  

To demonstrate the Connect Power BI to Multiple Excel Sheets, we will load data from multiple tables or sheets in an excel file to Power BI, and generate a bar chart.

How to Connect Power BI to Multiple Excel Sheets

Before we start Connect Power BI to Multiple Excel Sheets, Let us see the data present in the Sample superstore Excel File. From the below screenshot, you can see, it has three sheets Orders, Returns, and Users

Connect Power BI to Multiple Excel Sheets 1

If you are in the Power BI visualization page. Under the Home tab, click the Get Data option and select the Excel, as we have shown below. Or, select More options and select Excel.

Connect Power BI to Multiple Excel Sheets 2

Once you click on the Excel tab, a new window will open to select the Excel File from our file system. For now, we are selecting the Sample – Superstore file, as shown below.

  Connect Power BI to Multiple Excel Sheets 3

Expanding the Superstore Excel folder will display the list of available sheets.

Connect Power BI to Multiple Excel Sheets 4

Selecting the sheet or table shows the Data Preview. From the screenshot below, you can see the preview of the sheet. If you are satisfied with the Data and the data types, then click the Load button; otherwise, click the Edit button to make changes.

Currently, we don’t want to make any changes to the data. So, let me click on the Load button

Connect Power BI to Multiple Excel Sheets 5

Please wait until the load is complete

Connect Power BI to Multiple Excel Sheets 6

Now you can see all the Columns imported from the excel file under the Fields section. As you can see, there is an issue with the Users table because Power BI hasn’t picked up the column names from the first row.

Connect Power BI to Multiple Excel Sheets 7

Please click on the Edit Queries tab

Connect Power BI to Multiple Excel Sheets 8

Click on the Use First Row as Headers

Connect Power BI to Multiple Excel Sheets 9

That’s it. We Connected Power BI to Multiple Excel Sheets and loaded data from multiple sheets.

Let me create a Column chart using this data. I suggest you refer, Column Chart in Power BI article to understand the steps involved in creating it.

Connect Power BI to Multiple Excel Sheets 10

Get Data from Excel to Power BI

In this section, we show you how to connect Power BI to Excel Files, and how to get data from Excel to Power BI. To demonstrate the Get Data from Excel to Power BI, we will load data from excel file to Power BI, and generate a Donut chart.

 

How to Get Data from Excel to Power BI

Before we get started, let us see the data present in the Sales By Country Excel File. From the screenshot below, you can see that the First row has the Column names.

Get Data from Excel to Power BI 1

If you haven’t started the Power BI Desktop yet, Double click on the Power BI desktop to open. Once it is open, it looks like the screenshot below. Please click on the Get Data hyperlink.  

 

Connect Power BI to Excel File 1

If you are in the Power BI visualization page, under the Home tab, click the Get Data option and select the Excel as we shown below. Or select More options.

Get Data from Excel to Power BI 2

Get Data from Excel to Power BI

When you select the More option, the following window will show. You can use this window to select your desired Data source. For now, let me select the File -> Excel Option and click Connect button

 Get Data from Excel to Power BI 3

Once you click on the Connect button, a new window opens to select the Excel File from our file system. For now, we are selecting the SalesByCountry.xls file, as shown below.

Get Data from Excel to Power BI 4

Expanding the Excel folder display the list of available sheets. If you select the sheet or table, it shows the Data Preview. From the screenshot below, you can see the preview of the sheet.

If you are satisfied with the Data and the data types, then click the Load button. Otherwise, click the Edit button to make changes.

Get Data from Excel to Power BI 5

Currently, we don’t want to make any changes to the data. So, let me click on the Load button

Get Data from Excel to Power BI 6

Please wait until the load is complete

Get Data from Excel to Power BI 7

Now you can see all the Columns that imported from the excel file under the Fields section.

Get Data from Excel to Power BI 8

Let me create a Donut chart using this data. I suggest you refer, Power BI Donut Chart article to understand the steps involved in creating it.

Get Data from Excel to Power BI 9

 

 

 

Get Data from Text File to Power BI

In this study, we show you how to connect Power BI to Text Files, and how to get data from text file to Power BI. To demonstrate the Get Data from Text File to Power BI, we will load data from a text file to Power BI, and generate a column chart.

 

How to Get Data from Text File to Power BI

Before we start getting Data from Text File to Power BI, Let us see the data present in the Employee Text File. From the below screenshot, you can see that it is just a normal text file. If you observe closely, the First row has the Column names

Get Data from Text File to Power BI 1

If you haven’t started the Power BI Desktop yet, Double click on the Power BI desktop to open. Once it is open, it looks like the screenshot below. Please click on the Get Data hyperlink  

 

Connect Power BI to Text FIle 1

If you are in the Power BI visualization page, under the Home tab, click the Get Data option and select the Text/CSV, as we shown below. Or select More options.

Get Data from Text File to Power BI 2

Get Data from Text File to Power BI

When you select the More option, the following window will show. You can use this window to select your desired Data source. For now, let me select the Text/CSV Option and click Connect button

 Get Data from Text File to Power BI 3

Once you click on the Connect button, a new window opened to select the Text File from our file system. For now, we are selecting the Employee.txt file, as shown below.

Get Data from Text File to Power BI 4

Please wait until the connection established

Get Data from Text File to Power BI 5

Now you can see the preview of the data present in the text file.

Get Data from Text File to Power BI 6

Most of the time, Power BI automatically picks the delimiter and separate the columns. If this is not the case, then use the Delimiter option to change as per your requirement.

If you are satisfied with the Data and the data types, then click the Load button; otherwise, click the Edit button to make changes.

Get Data from Text File to Power BI 7

When you click the Edit button, the following window opened. Use this window to change the data as per your requirement.

Get Data from Text File to Power BI 8

Currently, we don’t want to make any changes to the data. So, let me click on the Load button

Get Data from Text File to Power BI 9

Now you can see all the Columns imported from the text file under the Fields section.

Get Data from Text File to Power BI 10

Let me create a Column chart using this data. I suggest you refer, Column Chart in Power BI article to understand the steps involved in creating it.

Get Data from Text File to Power BI 11

Load Data from Multiple Data Sources in Power BI

Load Data from Multiple Data Sources in Power BI : In real-time, you might face a situation where data is present in different databases. However, you do not have to worry in these situations because Power BI support multiple data source in one chart. Let me show you the step by step approach to get or load data from multiple data sources in Power BI.

  

How to load data from Multiple Data Sources in Power BI

From the screenshot below, you can see that there are already a few tables inside the Power Bi desktop. We imported these tables in Connect to SQL article.

Load Data from Multiple Data Sources in Power BI 1

If you are in the Power BI visualization page, under the Home tab, click the Get Data option and select the SQL Server, as we showed below. Or, select More and select the SQL Server option.  

 

Load Data from Multiple Data Sources in Power BI 2

Here you have to provide the SQL Server Instance name. If you installed SQL with default instance, then the instance name is the computer name or localhost or .

Let me use the local instance, and click OK

 Load Data from Multiple Data Sources in Power BI 3

Under the Display options, it lists out the Databases that are available for that Instance. In this example, we are selecting three tables present in the Employees database.

Load Data from Multiple Data Sources in Power BI 4

Now you can see the Tables that we selected.

Load Data from Multiple Data Sources in Power BI 5

Let me create a table with Employee Database fields, and Adventure Works DW database fields.

As you can see from the below screenshot, we also formatted the Table as well.

NOTE: I suggest you refer to Create a Table, and Format a Table articles to understand the table creation and formatting options.

Load Data from Multiple Data Sources in Power BI 6

Remove Columns from Tables in Power BI

What are the steps required to Remove Columns from Tables in Power BI with an example? In general, the data that we load from the source might have some columns that may not require for the analysis purpose.

  

How to Remove Columns from Tables in Power BI

To remove unwanted columns from the existing tables, please click the Edit Queries option under the Home tab.

Remove Columns from Tables in Power BI 1

Clicking Edit Queries option opens a new window called Power Query Editor.  

 

  1. Queries: List of available tables.
  2. Display the Data (rows and columns) present in the selected table.
  3. Properties: Selected table Name. You can use this section to rename the Table to more meaningful.
  4. Applied Steps: It lists out the steps that we undertake on this Power BI table.
Remove Columns from Tables in Power BI 2

TIP: You can select the required column (or Ctrl + Select Columns for multiple columns) and hit the Delete button from your keyboard.

For the Remove Columns from Tables in Power BI demonstration purpose, we remove a few columns from the DimProductCategory table.

  Remove Columns from Tables in Power BI 3

Remove Columns from Tables in Power BI – Approach 1

Please select the column that you want to remove. Next, right-click on it and select the Remove option from the context menu.

Remove Columns from Tables in Power BI 4

Now, you can see that the Product Category Alternative Key column removed from the table. And you can see the same under the Applied Steps section.

Remove Columns from Tables in Power BI 5

Remove Other Columns: Use this option to remove all the columns from the table except the selected columns.

For the demonstration purpose, I am selecting the Product Category Key and Product category name. Next, right-click and select the Remove Other Columns option from the context menu.

Remove Columns from Tables in Power BI 6

As you can see, all the other columns removed from the category table.

Remove Columns from Tables in Power BI 7

If you want to undo the changed (or revert the changes), then go to the Applied Steps section, and remove the step as we have shown below.

Remove Columns from Tables in Power BI 8

It undoes the steps

Remove Columns from Tables in Power BI 9

Remove Columns from Tables in Power BI – Approach 2

First, select the Column that you want to delete, and then click Remove Columns option under the Home tab.

Remove Columns from Tables in Power BI 10

Reordering Columns of Power BI Tables

Drag the column and place it as per your requirement. For the demonstration purpose, we are dragging the English product category Name from the last position to the first position.

Remove Columns from Tables in Power BI 11

You can see the Category name in the First Position 

 

Remove Columns from Tables in Power BI 12

Whatever the changes you made will not effect until you hit Apply. Let me hit the Close & Apply option under the Home tab.

Remove Columns from Tables in Power BI 13

Please wait until the changes made.

Remove Columns from Tables in Power BI 14

And you can see that the product Category table has only two columns.

Remove Columns from Tables in Power BI 15