0% found this document useful (0 votes)
29 views21 pages

Dta102 - Bid102 - Day 2

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

Dta102 - Bid102 - Day 2

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

IDEAS Emerging Technology

Skills Scholarship Program


POWERBI FOR VISUALISATIONS
Presented by: Amina Fadila Shehu
Agenda
PowerQuery Editor
Creating Models
Creating and Managing Relationships
Data Analysis Expressions (DAX)
POWER QUERY AND INTEGRAL
ROLE WITHIN POWER BI.
•Power Query is a powerful data connection tool that simplifies the
process of connecting, combining, and refining data sources,
making them ready for analysis. Power Query is crucial for the
initial stages of data analysis as it helps import and transform raw
data into a structured format, enabling easier and more effective
data analysis within Power BI.
DEFINITION OF DATA
CLEANING:
Data cleaning involves the process of detecting and correcting (or removing) corrupt,
incorrect, or inaccurate records from a dataset. It ensures that only high-quality data
is used in data analysis.
Significance in Data Analysis:
•Accuracy: Clean data leads to more accurate analysis and decision-making.
•Efficiency: Reduces processing time and improves performance by eliminating
irrelevant data.
•Reliability: Increases confidence in the outcome of the analysis.
INTRODUCTION TO POWER
QUERY AS A CLEANING
TOOL:
•Power Query in Power BI offers a robust platform for accessing, cleaning, and
transforming data from various sources.
•Features like removing duplicates, filtering rows, changing data types, and
correcting misspellings help in refining datasets.
•It supports a range of data sources including files, databases, and web APIs, making
it a versatile tool for data professionals.
 Ribbon - the top ribbon
contains almost all of the
data transformation
options you need to
shape your data.
 Queries - this lists all the
queries you have set up
for this report.
 Data view - this is the
main table containing the
data for the selected
query as well as a
formula bar..
 Transformation steps -
the right-hand pane
contains each of the
transformation steps that
have been applied to the
selected query.
INITIAL ASSESSMENT OF
DATA
In Power BI's Power Query, you can use 'Column Quality', 'Column Distribution', and
'Column Profile' to evaluate and understand the state of your data:
1.Column Quality: This feature asseses the percentage of valid, error, and empty values in
each column. For example, if a "Customer ID" column shows a high percentage of errors,
you might need to investigate data entry issues or mismatches in data types.
2.Column Distribution: It provides a visual and numeric breakdown of the distribution of
unique values within a column. This is useful for spotting skewed data or outliers. For
instance, if a "Salary" column unexpectedly shows a large number of maximum or minimum
values, it could indicate data entry errors.
3.Column Profile: This tool offers a detailed summary of each column, including top values
and the presence of empty cells. This is particularly helpful for identifying frequently
occurring values and assessing the completeness of data.
HANDLING MISSING DATA: DELETION
VS. IMPUTATION

Deletion Technique: Removing rows or columns that contain missing values.


Ideal when the dataset is large enough that losing some data does not impact
the integrity of analyses.
•Steps in Power Query:
• Select the column to inspect.
• Go to the 'Home' tab, choose 'Reduce Rows', then select 'Remove Rows',
and choose 'Remove Blank Rows'.
IMPUTATION TECHNIQUE:
Filling in missing values with substitutes, such as the mean, median, or a
constant value. Preferred if data is scarce or when removing rows drastically
reduces sample size.
•Steps in Power Query:
• Select the column to impute.
• Right-click the column header, choose 'Replace Values', then select
'Replace Errors' or use the 'Fill Down'/'Fill Up' options to impute using
adjacent values.
ADVANCED DATA OPERATIONS:
MERGE, APPEND, AND GROUP BY

Merging Queries: Combine two datasets based on a common key.


•Steps in Power Query:
• Select 'Home' > 'Merge Queries'.
• Choose the primary table, then select the table to merge with
it.
• Select the matching columns in both tables.
• Choose the type of join (e.g., Inner, Outer).
APPENDING QUERIES:
•Concatenate rows from one dataset to another.
•Steps in Power Query:
• Select 'Home' > 'Append Queries'.
• Choose the datasets to append.
• Confirm the append operation.
USING 'GROUP BY':
Aggregate data based on specific criteria.
•Steps in Power Query:
• Select 'Home' > 'Group By'.
• Choose the column to group by.
• Specify the aggregation function (e.g., Sum, Average).
UNDERSTANDING DATA
MODELS
•A data model organizes data elements and defines their
relationships. It acts as the blueprint for organizing data from
various sources so that it can be used efficiently in reports and
analysis. A well-structured data model is crucial as it impacts the
speed, efficiency, and accuracy of the data retrieval and analysis
processes in Power BI. It serves as the foundation that supports all
subsequent analytics and visualizations.
CREATING RELATIONSHIPS BETWEEN
TABLES

•Access the relationship view by clicking on the "Manage Relationships" button or


using the relationship diagram view.
Steps to Create Relationships:
1.Open 'Model' view in Power BI.
2.Drag a field from one table to a related field in another table to create a relationship.
3.Choose the type of relationship based on the data structure (One-to-One, One-to-
Many, Many-to-One).
CARDINALITIES AND CROSS-FILTER
DIRECTIONS

•One-to-One: Each record in one table matches one record in another table. Rare in
large datasets.
•One-to-Many: A record in one table can relate to many records in another. Most
common scenario in business databases.
•Many-to-One: Many records in one table match a single record in another.
Essentially the reverse of One-to-Many.
•Many-to-Many: Records in one table can relate to multiple records in another and
vice versa. Use cautiously as it can complicate the model.
CROSS FILTER DIRECTION
•Single Direction: Filters in one table affect the other table but not
vice versa.
•Both Directions: Filters in either table can affect the other, useful
in certain analytical scenarios but can lead to ambiguity and
performance issues.
BEST PRACTICES FOR
CREATING RELATIONSHIPS
•Ensure data types match between tables to establish accurate
relationships.
•Use primary keys whenever possible to ensure uniqueness and
reliability in relationships.
•Avoid creating unnecessary relationships that can complicate the
model and degrade performance.
INTRODUCTION TO DAX
DAX is a powerful formula language used in Power BI to create custom
calculations on data models. It includes functions, operators, and constants
that can be used in formulas. Some practical uses include:
 Creating Calculated Columns: Use DAX to add new data based on existing
data in your model. Example is Total Sales = SUM(Sales[Amount])
 Measures: Construct dynamic calculations that aggregate data based on
the filter context of the report. Average Transaction Size =
AVERAGE(Sales[TransactionSize])
 Time Intelligence: Write formulas that help analyze data across time
periods easily. Year-to-Date Sales = TOTALYTD(SUM(Sales[Amount]),
'Date'[Date])
KEY DAX FUNCTIONS
CALCULATE: Changes the context in which data is evaluated, very powerful for
conditional sums and dynamic aggregations.
CALCULATE(expression, filter1, filter2,...): Example: Calculate total sales only for a
specific region.
SUM and AVERAGE:Adds up all the numbers in a column.
SUM(column_name): Example: Sum of sales in a fiscal quarter.
AVERAGE: Calculates the average of a column.
AVERAGE(column_name): Example: Average sales per transaction.
SOLVING BUSINESS
QUESTIONS WITH DAX:
Business Scenario: Determine the total sales made only on weekends.
Weekend Sales = CALCULATE(SUM(Sales[Total Sales]), Sales[Day] IN
{"Saturday", "Sunday"})
•Step-by-Step Calculation:
• Identify the total sales column.
• Apply a filter to include only sales from Saturday and Sunday.
• Sum the sales values filtered by these days.
THANK YOU FOR
LISTENING

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy