0% found this document useful (0 votes)
212 views12 pages

Data Cleaning and Formatting in Power BI (Slides)

Uploaded by

jejeybob
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
212 views12 pages

Data Cleaning and Formatting in Power BI (Slides)

Uploaded by

jejeybob
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Data transformations in Power BI

Data cleaning and formatting in Power BI


Please do not copy without permission. © ExploreAI 2023.
Data transformations in Power BI

Data cleaning and formatting


Data cleaning and formatting are critical steps in
creating visualisations and making data-driven
decisions.

Clean data ensures the accuracy and reliability of


insights derived from visualisations, preventing
misinformed conclusions due to errors or
inconsistencies.

Clean data enhances the interpretability of


visualisations, making it easier for stakeholders to
grasp and act upon the information presented,
ultimately facilitating better decision-making.

2
Data transformations in Power BI

Naming conventions

|
User-friendly naming conventions enhance the readability of a data model. There are
several ways to rename columns and queries in the Power Query Editor. Using the
"Transform" tab is one method.

01. 02. 03.

Click on the Navigate to the “Any column” section which contains Select “Rename”.
“Transform” tab. transformations at the column level for any data type
column.

01.

02.

03.

3
Data transformations in Power BI

Resolve data quality issues

| Power Query Editor enables us to address various data quality issues, such as inconsistencies,
unexpected values, and null values by either replacing or deleting them.

Replace values

● Right-click on the column name.


● Select “Replace Values”.
● Enter the “Value To Find” and the value to “Replace
With”.

Reduce rows

● Select the column name.


● Navigate to the “Home” tab.
● Select “Remove Rows” under the “Reduce Rows” section.
● Select “Remove Errors” in the dropdown menu.

4
Data transformations in Power BI

Resolve data quality issues

| The "View" tab in Power Query Editor also allows us to see the column quality of each column in
the dataset and resolve any data quality issues.

Column quality view

● Right-click on the column name.


● Navigate to the “View” tab.

● Select the “Column quality” check box in the “Data


Preview” section.
● Select the appropriate data quality solution.

5
Data transformations in Power BI

Evaluate and transform data types

| We can evaluate and change data types to ensure data consistency. In the Power Query Editor,
there are multiple ways to transform data types.

Right-click method

● Right-click on the column name.


● Select “Change Type”.
● Select the appropriate data type from the dropdown
menu.

Transform section method

● Click on the “Home” tab.


● Navigate to the “Transform” section, which contains
general transformations at the column level.
● Select the appropriate data type from the dropdown
menu.
6
Data transformations in Power BI

Evaluate and transform data types

| We can also use the Power Query Editor to identify data types automatically based on the values
in the column.

Detect the data type

● Select the relevant column.


● Navigate to the “Transform” tab.
● Select the “Detect Data Type” option in the “Any Column”
section.

7
Data transformations in Power BI

Data profiling

|
Profiling data helps us understand its characteristics. We can use profiling to identify outliers,
missing values, and data distributions. Power Query Editor provides summary statistics and
histograms to help us achieve this.

Navigate to the “View” tab. Under the “Data Preview” section,


select “Column quality”, “Column distribution”, and “Column
profile”.

01. _Column distribution:_ Displays a simple distribution of the 01.


data within the column, the number of distinct column values,
and how many of those are unique. Running our mouse over this
graphic will provide us with some options for eliminating duplicate
values.

02. _Column profile:_ Based on the selected column, we may


zoom into a single column and examine some column summary
statistics such as minimum, maximum, average, standard
deviation, etc. We can also see how the values in that column are
distributed. 02.
8
Data transformations in Power BI

Apply data shape transformations

| Transforming data shapes involves grouping, pivoting, unpivoting, or transposing data.


The Power Query Editor allows us to achieve this under the “Transform” tab.

01. 02. 03.

Navigate to the The "Any Column" feature allows us to pivot or The "Table" section
“Transform” tab. unpivot columns to change the shape of our dataset allows us to group data,
as well as move columns around. transpose and rearrange
rows.

01.

02.

03.

9
Data transformations in Power BI

Group by
To group data by a specific column, we use the group by option
which is either available in the “Table” section under the
“Transform” tab or in the “Home” tab under the “Transform”
section.

Basic:

Under the basic settings, we can select the column to group by,
as well as the operation to use to group the column and the
name of the grouped column.

Advanced:

Under the advanced settings, we can select multiple columns to


group by. Selecting the “Add grouping” button will allow us to
choose a new grouping column. We can also use multiple
aggregations for our groupings by selecting the “Add
aggregations” button.

10
An introduction to dashboards and reports

Transposing, pivoting, and unpivoting data

|
In the Power Query Editor, there are two distinct data shape transformation operations, namely
transposing and pivoting data. Each operation serves a different purpose and can be used to
restructure data in various ways.

Transpose

Convert columns to rows and rows to columns for


the entire table.

Allows us to switch from a wide format (many


columns, few rows) to a tall format (few columns,
many rows) or vice versa.

Select the table to transpose and click on


“Transpose” under the “Table” section.

11
An introduction to dashboards and reports

Transposing, pivoting, and unpivoting data


Pivot

Convert rows into columns for a specific column.

Used to aggregate data and create summary tables.


It converts unique values in a column into new
columns, allowing us to summarise data by specific
attributes.

Navigate to the "Transform" tab and select "Pivot


Column" under the “Any Column” section.

01. Select where the cell values for the new columns
will come from.

02. We can also specify an aggregation function, like


sum or average, for the pivoted values.

12

You might also like