Power BI
Power BI
Table of Content
• Introduction to Power BI
• Managing structured data with Power BI
• Managing unstructured data with Power BI
• Data transformation
• Data Visualisation
What is Power BI?
• a collection of software services, apps, and connectors that work
together to turn your unrelated sources of data into coherent, visually
immersive, and interactive insights
• lets you easily connect to your data sources, visualize and discover
what's important, and share that with anyone or everyone you want
Parts of Power BI
• Desktop
• Service
• Mobile apps
Power BI Main Interfaces
• There are two main windows in Power BI Desktop :
• Power BI Desktop
• Use mainly to input formulas/ calculations, manage relationships between tables
and create visuals / charts/ dashboards
• Power Query Editor
• Use mainly for data import, cleaning, transformation, preparing data for further
analysis
• Both interfaces serve different purpose in data analytics process and complement each
other
Power BI Desktop
What is Power BI Desktop?
• a free application you install on your local computer that lets you
connect to, transform, and visualize your data
• you can connect to multiple different sources of data, and combine
them (often called modeling) into a data model
Most common uses for Power BI Desktop
• Connect to data
• Transform and clean that data, to create a data model
• Create visuals, such as charts or graphs, that provide visual
representations of the data
• Create reports that are collections of visuals, on one or more report
pages
• Share reports with others by using the Power BI service
How Power BI Desktop works?
• Connect to data, including data sources
• Shape the data with queries that build insightful, compelling data
models
• Use the data models to create visualizations and reports
• Share your report files for others to leverage, build upon, and share
Being Familiar With Power BI
Desktop
Click the
icon to close
the welcome
page
This is the
default page of
Power BI
Desktop
This is the icon
for report page
(default). You
can create
reports/visuals/
dashboard
here.
Report page –> Home tab
By clicking the
“Get data”
icon, you can
choose which
data sources
that you
wanted to use
in this app
- Import data from a Microsoft Excel Workbook
- Embed a Power Apps app in your report. Both the app and the report will update
in real-time as changes (like cross-highlighting, selectors or data entry) are made
- Add a button to your report
- What-if parameters let you see how your data behaves under different
conditions. Add to reports as slicers or reference them in other DAX
expressions
Snap to grid:
Automatically align - Add a bookmark to save the filters, cross-highlighting
objects in your report and drilling you’ve applied
Lock objects: Lock all - Manage the visibility and layering order of objects in
objects in place so they your report
stay put while you’re
giving a presentation or
interacting with report - Assess your report’s performance and identify areas for
elements improvement
- Refresh previews
- Combine queries
Transform tab
- Invert this table’s rows such that the last rows are displayed first
- Invoke a custom function defined in this file for each row of this table
- Create a new column that conditionally adds values in the currently selected column
- Create a new column that duplicates the values in the currently selected column
View tab
- Select the column that you would like to go to in the Query Editor preview
- Open the advanced query editing dialog to view or modify the entire text for this query
Go to Add Column
tab and select
Custom Column
When you click
Custom Column, a
window will
popped up. You
can put a new
column name,
custom column
formula.
By right-click, this
will appear and
you can go to
Change Type ->
Whole Number
Another
alternative is go to
the Transform tab
and click on the
Data Type: Any.
Change it into
Whole Number
After changing it,
the column would
look like this
Combine Data
Home tab
Adding a New
Source from a
Web
Type in the URL
and click OK
Let it become as
anonymous access
and click Connect
The Navigator
window popped
up. Tick as shown
and click OK
After clicking OK,
it will appear like
this
There are irrelevant top
rows, so we are going to
remove it by Reduce
Rows -> Remove Rows ->
Remove Top Rows
Since there are 3
irrelevant top rows, so we
are going to put it as 3.
Then, click OK
As we are targeting on
only 50 states, we are
going to remove bottom
rows as well. Reduce
Rows -> Remove Rows ->
Remove Bottom Rows
Specify rows to be
removed as 26. Then,
click OK
We don’t need Federal
district states so we are
going to filter it by
clicking the drop down
menu and untick the
Federal district box. Then,
click OK
Now, we are going to remove
columns. Remove all columns
except for column2 and
column5. Go to Manage
Columns -> Remove Columns
This is the result
Now, we are going to put
United States of America and
US as a replacement for the
headers. Click Use First Row as
Headers
This is the result
Renaming the column is simple.
Click on the column that you
want to rename its name. Go to
the Transform tab and rename
it. Put it as State Name and
State Code
For renaming the table, right
click on the name of the table
and rename it as StateCodes
This is the result
Combine Queries
Home tab
For combining
queries, click on
We are going to Combine ->
combine the Merge Queries
Ranking of best
and worst states
for retirement to
the StateCodes
Merge window
popped up.
We are going to
merge the State
from Ranking of
best and worst
states for
retirement table
and State Name
from StateCodes
table together
If this popped up,
tick ignore and just
Save
After merging, it
shows like this
To fix it, click the
Expandable icon
and untick the State
Name. Then, click
OK
You can now Close
& Apply