Module 3 PPT
Module 3 PPT
Optimizing Models
07 Power BI Data Model 08 for Reports
What are
09 Hierarchies? 10 Creating Hierarchies
Shaping data is the process of transforming data, in which Power Query Editor
loads and presents the data in the best way
Here, we only deal with View in Power BI Desktop, so the original data
remains unchanged
Removing
Sorting Columns &
Rows
Date &
Data
Time
Types
Functions
Removing Rows
& columns If we have a large dataset, we need to remove redundant and
unnecessary data to make it as small as possible, which
improves the performance of data handling in Power BI
Data
Types
Power Query Editor predicts the data type of each column when
loaded with the data, but it is always advisable to check the
given column data types and then format if necessary
Sorting
We can also apply the sorting technique based on a particular
column. The Home tab of Power Query Editor includes a Sort
group with which we can sort A-Z or Z-A
Data Formatting
In Power Query Editor, we apply formatting functions to our text and number columns to create consistency
and ensuring that the data is well presented
General Formatting
General formatting includes:
Text Formatting
Number Formatting
General Formatting
Text formatting includes:
Text Formatting
Number Formatting
Number Formatting
While Power BI is flexible with a variety of data sources that we can import data from, visualizations work
best with the data that is in a columnar format
For example, data imported from Excel may be easy for the
human eye to visualize but might not be structurally
appropriate for Power BI to translate the values into visuals
Move Group By
Pivot Column &
Unpivot Columns
12 01 Use First Row
as Headers
11 02
10 03
Fill Transpose
Transformin
g
Replace Values &
Replace Errors
09 Data 04 Reverse Rows
08 05
Rename
07 06 Count Rows
3 Reverse Rows
4
Copyright Intellipaat. All rights
Transforming Data
5 Data Type
6
Copyright Intellipaat. All rights
Transforming Data
7 Rename
8
Copyright Intellipaat. All rights
Transforming Data
9 Fill
10
Copyright Intellipaat. All rights
Transforming Data
11 Move
By using Power BI, we can gather data from different sources and different types into a single dataset to
build reports
Combining Data
Data
Model Merging Data Appending Data
To merge columns of two tables, the two tables must have a joining column, where the values match in
order so that they can be combined
All rows from both Full Outer Inner Matching rows from
tables both tables
Rows only from the Left Anti Right Anti Rows only from the
first table second table
When we append rows, we take rows from one or more tables and add them to the first table
In most situations, the columns and the data types will match. However, we can
also append rows between two tables that have all different columns, but the
result will be unclean. There will be no values when the number of columns of
these tables does not match
A data model is typically associated with a relational database, such as Microsoft SQL Server. In Power BI
Desktop, we connect to multiple data sources and bring data together in the data model by creating
relationships between them
When we combine data from different data sources into the Power
BI model, there is a high chance that the data will have different
formats and data types
A hierarchy is a set of related fields grouped together to drill down from one level to the next
Each level of the hierarchy is contained within the next level, and it
cannot exist independently
Examples of hierarchies that we can create in Power BI to drill down from top to bottom:
Country Yea
r
State Quarter
City Month
Street Day
Right-click to specify
3 the new name