You are on page 1of 25

Introduction

Microsoft Power BI is an interactive data visualization software product developed by


Microsoft with a primary focus on business intelligence and is part of the Microsoft
Power Platform. It is designed to be user-friendly, allowing both business analysts and
non-technical users to create interactive and customizable reports and dashboards.

Common Uses of Power BI:

1. Data visualization: It allows users to create interactive visualizations that are


easy to understand. Reports and visualizations can be used to uncover insights
based on an organization's data.
2. Data collaboration and sharing: It allows users to easily share their
dashboards and reports with others within or outside the organization. Users
can control who gets access to the reports and give permission to edit, make a
copy, or share with coworkers.
3. Report Generation: It helps in generating customizable and shareable reports
that can be scheduled and automatically delivered to stakeholders.
4. Real-time Analytics: It connects to real-time data sources to monitor and
analyze data as it is generated and also implement streaming datasets to
visualize and analyze data in real-time.

Steps Involved in Power BI:


Power BI works in the following way:
i. Connect to data, including multiple data sources.
ii. Shape the data with queries that build insightful, compelling data models.
iii. Use the data models to create visualizations and reports.
iv. Share the report files for others to leverage, build upon, and share which can
be shared via Power BI Desktop .pbix files like any other files.
Here, the options like Get data, Recent sources, Open recent reports, and Open other
reports are available. Select the close icon to close the pop-up.

Three view are available for the Power BI Desktop and they are Report View, Table
View, and Model View, from top to bottom. The current view is indicated by the
green bar along the left, and one can change views by selecting any of the icons.
Report view is the default view.
Import data from Excel
Once the Power BI has been installed, there are many possible ways of loading the
available data.
i. One can load data either by selecting Get Data in the Power BI Home tab.
ii. Also by selecting Excel workbook.
iii. Or by clicking on import data from Excel which is default visible in Report
View.
iv. The dialog box is opened and preferred Excel file is selected.
v. Select Load to load the table or Transform data to make changes in the table
before loading it.
The table view gets changed after loading the data.

Build report
In Power BI Desktop Report view, you can build visualization and reports. The
Report view has seven main areas:
i. The ribbon at the top, displays common tasks associated with reports and
visualizations.
ii. The canvas area in the middle, where you create and arrange visualizations.
iii. The pages tab area at the bottom, lets you select or add report pages.
iv. The Filters pane, where you can filter data visualizations.
v. The Visualizations pane, where you can add, change, or customize
visualizations, and apply drill through.
vi. The Format pane, where you design the report and visualizations.
vii. The Fields pane, which shows the available fields in your queries. You can
drag these fields onto the canvas, the Filters pane, or the Visualizations pane
to create or modify visualizations.
Visual in Power BI
To create an interactive dashboard, we use different visuals. Suppose we have
a sample Excel sheet of the Global store. Now use Card to display the Total
Number of Sales.
1. Card: A Card enhances the data through the visual of an actual card.
Aggregate metrics like count, the maximum number of leads, the first, the last,
and so forth can be displayed using it.
i. On the Visualization pane, click on Build Visual and select Card.
ii. Click on the Data card and check the Sales.
iii. Click on the Visualizations card and click on Build visual, Go to Field,
and change to Count (Distinct).
iv. Click on the Visualizations card, click on Visual of Format visual, and
uncheck the Category label.
v. Click on the Visualizations card, click on General of Format visual,
check Title, and Write Total No. of Sales on Text and set the font,
color as per the need.
2. Bar Chart: A bar chart is a common visualization type used in Power BI to
represent data in a graphical format. It's effective for comparing values across
different categories or displaying trends over time.
i. On the Visualization pane, click on Build Visual and select Bar
chart. Add X-Bar and Y-Bar.
ii. Add filter, click the Filter pane, Change Filter type to Top N or
Bottom N, and select Show items by Top or Bottom and value.
Here, Sum of quantity ordered by a country is shown at the descending order
using Bottom N with the relationship with ordered months or Ship Date
(month).
3. Pie chart: A pie chart in Power BI is a built-in visualization chart that
displays each category data set in a pie shape.
i. On the Visualization pane, click on Build Visual and select Pie
chart. Add Legend and Values
ii. Add filter, click the Filter pane, Change Filter type to Top N, and
select Show items by Top or Bottom and value.
Here the Sales column is selected and the respective Cities filtered with
Top 10 cities in accordance with the Sum of Sales.

4. Slicer: Slicers are visual filters that allow users to sort and filter reports to
view only the information they want. Users "slice" the data by choosing a
value or values from a list.
i. On the Visualization pane, click on Build Visual and select Slicer.
ii. Click on the Data card and check the City.
iii. Click on the Visualizations card, click on Visual of Format visual, and
click on Slicer Setting > Option (i.e., Vertical list, Tile, Dropdown),
and choose one of them.
iv. You can apply a filter by clicking on the Filter pane, you have already
chosen data so click on that data field, change the filter type (i.e.,
Advance filtering, Basic filtering, Top N), and choose one of them.
Here the Slicer is used in order to filter out the country-wise reports or in
this case Country-wise Sales, Quantity Ordered by month.
The slicer helps to visualize the data for the requirements. Only selected
country’s reports are shown in the entire page.
Here, Australia is selected and total no. of sales, sum of quantity ordered
as per the month and sum of sales according to the cities of Australia are
shown. Also Date Slicer has been used to show the total number of sales in
respective month.

5. Map: Power BI's map visualization tool helps users analyze spatial data. It
integrates with Bing Maps to provide a variety of map styles and geographic
data.
i. On the Visualization pane, click on Build Visual and select Map chart.
Add Location and Legend.
ii. Add filter, click the Filter pane, Change Filter type to Top N, add value
to data fields Country, and select Show items by Top or Bottom and
value.
Here, Map helps to visualize the geographic data and show records
globally. Top 50 profiting countries with the sum of sales and profit are
shown in the map.

6. Creating hierarchy and visualizing drill-up and drill down


Drill down in Power BI is a feature that allows users to navigate from a high-
level summary of data to more detailed information.
We can visualize the data either in Donut Chart or Pie Chart. Here donut chart
is used to represent the pictorial representation.
i. Firstly, hierarchy is created of Country simply by right clicking on it
and selecting the Create Hierarchy Option available.
ii. Now, other related columns are added to the hierarchy. The related
columns can be State and City to add up to the hierarchy. So for both,
by right clicking on it, Add to Hierarchy option is chosen and Country
Hierarchy is selected.
iii. Now all of the columns in Country Hierarchy is selected and filter of
Top 50 is applied by the value Sum of Sales.
Then the donut chart shows the result by countries and we can drill-down to
visualize the data through states and cities.
By selecting the drill mode, we can either drill-up or drill-down. The drill-down
option from Country shows the result by the States.
The drill-down option from State shows the result by the Cities.

Table View
A table view presents data in a tabular format, making it easy for end-users to
interpret and analyze. Let's take a closer look at some of the elements found in Table
View.
i. Table view icon. Select this icon to enter the Table view.

ii. Data Grid. This area shows the selected table and all columns and rows in it.
Columns hidden from the Report view are greyed out. You can right-click on a
column for options.

iii. Formula bar. Enter Data Analysis Expression (DAX) formulas for Measures
and Calculated columns.

iv. Search. Search for a table or column in your model.

v. Fields list. Select a table or column to view in the data grid.


Add a New Column in the Table View
On the left side of the Power BI, there are 3 views Click on Table view. You can see
the New Column in the Table Tools tab.
i. Click on New Column, and then the column will be created.
ii. To change the name of a Column, we can change from the Column tools bars
and there is the name on the left side of the screen replace the “column” with
“Column name”.
iii. You can write formula like an Excel in Formula Bar.
Example: In order to find the total shipping cost by quantity ordered, we can
simply divide shipping cost by quantity to get shipping cost per Quantity.
Creating relationship between table
In Power BI, relationships between two tables are established to link the data in those
tables. This relationship is crucial for creating meaningful visualizations and
performing accurate analyses.
Here are the steps to create a relationship between two tables in Power BI:
i. After loading data, visit model view to create relationship between
table.
ii. Go to “Manage Relationships”. Click on “New” and select tables and
columns that are related.
iii. Select one cardinality and click “ok” to create relation.
SQL Server Management Studio
SQL Server Management Studio (SSMS) is a graphical user interface tool provided
by Microsoft for managing and administering SQL Server databases. It allows
database administrators and developers to interact with SQL Server and perform
various tasks, such as designing databases, writing and executing T-SQL queries,
managing security, configuring server settings, and more.

Key features of SQL Server Management Studio

1. Object Explorer: It provides a hierarchical view of the server and its


components, such as databases, tables, views, stored procedures, and more. It
allows users to navigate and manage these objects.
2. Database Diagrams: It allows users to visually design and modify database
structures by creating and modifying tables, relationships, and other database
objects through a graphical interface.
3. Import and Export Data: It provides wizards for importing and exporting
data between SQL Server and various data sources, including flat files, Excel,
and other databases.
4. Security Management: It allows administrators to manage security settings,
including user accounts, roles, and permissions.

Connection to Database Engine


After installing SQL Server Management Studio, we need to connect to the
SQL Server.
i. For that we simply click on the Connect Option present in the left hand
side and then click on the Database Engine.
ii. The dialog box pops up and then select the server type as Database
Engine. The server name can be anything or even placed a dot (.).
When the user select the Windows Authentication, username cannot be
changed.
iii. Click on the “Connect” to connect to the database engine.
iv. Then after we select the database available and the tables are loaded.
v. With that, we can then perform queries relating to the tables available.

Here are some of the queries performed to show top 5 employees from the
HumanResources table, evaluating the table and finding commonalities to perform
JOIN.
Connect Power BI to SQL Server

Steps involved in connecting the SQL Server

i. Select the SQL Server option either by clicking on the Get Data or by simply
selecting the SQL Server present in the Data.
ii. The dialog box pops-up and type dot (.) as the server as personal device. Type
the database name same with the one in the SQL Server to operate or run the
queries.
iii. Next, we have two modes for connecting to and refreshing data in Power BI:
Import Mode and DirectQuery Mode. In Import Mode, data is imported from
the data source into Power BI dataset and the data resides within the Power Bi
file and any changes in the source data are not automatically reflected and
have to manually refresh the data. However, In DirectQuery Mode, Power BI
sends queries directly to the data source in real-time. This means that when
you interact with the report, the queries are sent to the underlying data source,
and the results are displayed without importing the data into Power BI. This
provides a more real-time experience as the data is always up-to-date. So we
select DirectQuery Mode.
iv. Expand the Advanced Options and copy the queries that has been executed in
the SQL Server to visually represent in Power BI.
v. Click on OK.
vi. Simply Load the data that gets presented in the next pop-up which are
generally the columns, rows, tables that got affected while running the query.
vii. The data gets loaded as Query1.
Once the data gets loaded, we are now able to visualize the SQL queries in Power BI.
Simply, select the columns that are relevant in the queries and the ones to visualize. It
shows the pictorial visualization to the analyst to understand and analyze the data and
its effect more effectively. Here, two of the queries have been loaded in Power BI and
the queries that have been successfully executed in SQL server is then ran on the SQL
statement of Advanced Options. First table shows the discount provided to the top 40
products and second shows the total quantity sold for top 25 products and their
respective safety stock level.

Dashboard
Conclusion
Microsoft Power BI has been the crucial tool to find insights from the organization’s
data. It helps to connect to data sources, create data models and design interactive
reports and visualization. This tool has been popular among professionals to visualize
and report the occurrence and trends in the business and analyze the business
performance and turning the data into different visuals like pie charts, maps, bar
charts, tables etc. which helps to create and yield data-driven results. Power BI now
has been the advantageous tool as it provides real-time dashboard updates, secure and
reliable connection to data sources and connecting to a large number of data sources
and faster processing than Excel. Power BI is used by varieties of industries and
organizations like healthcare, finance, retail and manufacturing.

You might also like