0% found this document useful (0 votes)
37 views9 pages

Notes BAE

Business analytics note

Uploaded by

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

Notes BAE

Business analytics note

Uploaded by

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

What is Business Analytics?

Business Analytics refers to the practice of using data analysis, statistical methods, and
predictive modelling to gain insights and make informed business decisions. It involves
collecting, processing, and analyzing data to identify trends, patterns, and relationships that
can help organizations optimize their operations, improve performance, and achieve their
strategic goals.

Importance of Business Analytics

1. Data-Driven Decision Making: Business Analytics enables organizations to make


informed decisions based on data rather than intuition, reducing risks and improving
outcomes.
2. Improves Efficiency and Productivity: By analyzing operational data, businesses
can identify bottlenecks and optimize processes, leading to increased efficiency and
reduced costs.
3. Enhances Customer Experience: Analytics helps in understanding customer
behaviour, preferences, and needs, allowing companies to personalize their products
and services.
4. Identifies Opportunities and Threats: Analytics helps in spotting market trends,
opportunities for growth, and potential risks, enabling proactive actions.
5. Supports Strategic Planning: It provides valuable insights that aid in long-term
planning, forecasting, and setting realistic business goals.

Tools Used in Business Analytics

1. Microsoft Excel: Widely used for basic data analysis, visualization, and reporting.
2. Tableau: A powerful tool for data visualization and creating interactive dashboards.
3. Power BI: A Microsoft tool for business intelligence and data visualization.
4. R and Python: Programming languages used for statistical analysis, predictive
modelling, and data manipulation.
5. SAS: A software suite used for advanced analytics, business intelligence, and data
management.
6. Google Analytics: Used primarily for analyzing web traffic and digital marketing
performance.
7. SQL: A language used for querying and managing data in databases.
8. QlikView: A business intelligence tool that provides self-service data visualization.
9. IBM SPSS: Used for statistical analysis and predictive analytics.
10. SAP BusinessObjects: A suite of front-end applications for reporting, data
visualization, and analytics.

These tools enable businesses to analyze data efficiently, generate insights, and support
strategic decision-making processes.
Power Query

Power Query, a data connection technology available in tools like Excel and Power BI,
allows users to perform a variety of data transformations to clean, shape, and analyze data.
Here is an enumeration and description of some common data transformations available in
Power Query:

1. Remove Columns/Rows

 Description: Allows you to delete unwanted columns or rows from your data set,
making your data cleaner and more manageable.
 Use Case: Removing irrelevant or sensitive information to focus on the data that
matters.

2. Filter Rows

 Description: Filters data based on specified conditions, such as removing nulls,


selecting values greater than a certain threshold, or filtering by date range.
 Use Case: Filtering sales data to include only transactions from the current year.

3. Split Columns

 Description: Splits a single column into multiple columns based on a delimiter (e.g.,
space, comma) or by fixed number of characters.
 Use Case: Dividing a full name into separate first and last name columns.

Split Column Options:

 Go to the Home or Transform tab on the ribbon and click on Split Column. You
will see several options to choose from:
 By Delimiter: Split the column based on a specific character or delimiter, such as
commas, spaces, or custom symbols.
 By Number of Characters: Split the column into smaller columns based on a
specified number of characters.
 By Positions: Split the column at specified positions (e.g., after the 3rd, 7th, and 10th
characters).
 By Lowercase to Uppercase: Split when transitioning from a lowercase letter to an
uppercase letter.
 By Uppercase to Lowercase: Split when transitioning from an uppercase letter to a
lowercase letter.
 By Digit to Non-Digit: Split when transitioning from a number to a letter or other
character, and vice versa.

4. Merge Columns

 Description: Combines two or more columns into a single column, separated by a


specified delimiter.
 Use Case: Merging city, state, and postal code columns into a single address column.
5. Group By

 Description: Aggregates data by grouping rows based on one or more columns,


applying functions like sum, average, count, etc.
 Use Case: Summarizing total sales by region or calculating the average score of
students by class.

6. Pivot Columns

 Description: Converts unique values from a column into new columns, creating a
wider table format.
 Use Case: Turning monthly sales data into a format where each month becomes a
column.

7. Unpivot Columns

 Description: Converts columns into rows, effectively reshaping data from a wide
format to a long format.
 Use Case: Converting a table with separate columns for each month into a two-
column format with Month and Value.

8. Replace Values

 Description: Replaces specific values in a column with new values, useful for
correcting errors or standardizing data.
 Use Case: Replacing “n/a” or “N/A” with nulls, or updating outdated product codes.

9. Change Data Types

 Description: Changes the data type of columns (e.g., text, number, date) to ensure
that data is interpreted correctly.
 Use Case: Converting a column of dates stored as text into a proper date format for
calculations.

10. Add Custom Column

 Description: Creates new columns using custom calculations with Power Query’s
formula language (M language).
 Use Case: Adding a column that calculates the profit margin based on sales and cost
columns.

11. Remove Duplicates

 Description: Removes duplicate rows based on one or more selected columns,


ensuring unique records in your data set.
 Use Case: Cleaning up a customer list by removing duplicate entries.
12. Transpose Table

 Description: Flips rows into columns and columns into rows, effectively rotating the
table.
 Use Case: Transposing a data table to change its orientation for analysis or
presentation.

13. Extract Data

 Description: Extracts specific parts of data within a column, such as text before or
after a delimiter.
 Use Case: Extracting domain names from email addresses.

14. Sort Rows

 Description: Sorts rows based on one or more columns in ascending or descending


order.
 Use Case: Sorting a sales report by highest revenue.

15. Fill Down/Fill Up

 Description: Fills blank cells with the value from the cell above or below, useful for
carrying values down or up.
 Use Case: Filling missing values in a column based on the last known entry.

16. Append Queries

 Description: Combines two or more tables into a single table by appending rows.
 Use Case: Merging monthly sales data into a single annual report.

17. Merge Queries

 Description: Joins two or more tables based on a common column, similar to SQL
joins (e.g., Inner Join, Outer Join).
 Use Case: Merging customer data with order data based on customer ID.

18. Conditional Columns

 Description: Creates new columns based on conditional logic (IF statements).


 Use Case: Creating a column that assigns a status based on sales targets (e.g.,
"Achieved" or "Not Achieved").

These transformations make Power Query a powerful tool for preparing data, enhancing the
quality of your analysis, and ensuring that your data is in the right shape for reporting and
decision-making.
Concept of Append in Power Query

Append in Power Query is like stacking tables on top of each other. It combines two or more
tables (queries) by adding the rows from each table into one single table. Imagine you have
multiple sheets of data, like sales reports from different months. By appending them, you
merge all the rows into one long table, creating a continuous dataset.

Rules Associated with Append in Power Query

1. Matching Columns:
o Power Query tries to match columns based on their names. If the columns
have the same name in each table, they will align correctly.
o If the column names do not match, Power Query will still append them, but
any unmatched columns will appear with blank values in rows where they
don’t exist.
2. Column Order Doesn’t Matter:
o The order of columns in each table doesn’t need to be the same; only the
names matter. Power Query will align them correctly based on column names.
3. Additional Columns:
o If one table has extra columns not present in the other tables, Power Query
will add those columns to the final table. For rows from tables without those
columns, the new columns will have blank values.
4. Data Types:
o Power Query will use the data type of the first table’s column when
appending. If there are mismatches in data types between tables, Power Query
may convert or adjust data, potentially leading to errors or null values.
5. No Change to Original Tables:
o Append doesn’t alter the original tables; it creates a new combined table. Your
original data remains untouched.

Simple Example

Imagine you have two tables:

 Table 1: Sales data for January (Columns: Date, Product, Sales Amount)
 Table 2: Sales data for February (Columns: Date, Product, Sales Amount)

Appending these tables will result in one table with all rows from both January and February
combined into a single, continuous list.

The Append feature is useful for consolidating similar data from multiple sources, making it
easier to analyze and report on combined datasets.
Merging Queries in Power Query

Merging queries in Power Query is similar to performing joins in SQL. It allows you to
combine data from two tables based on a common column. Here’s how you can merge
queries, using the example of emp (employee) and dept (department) tables:

1. Open Power Query Editor

 In Excel, go to the “Data” tab and click “Get Data” or “From Table/Range” to open
the Power Query Editor.

2. Load the Tables

 Load both tables (emp and dept) into Power Query. You can do this by selecting “Get
Data” and choosing your data source.

3. Select the Table to Merge

 Choose the first table (emp) from the Queries pane on the left.

4. Start the Merge Process

 Click on the “Home” tab, then click on “Merge Queries” in the ribbon. You can select
“Merge Queries” or “Merge Queries as New” to create a new query from the merge.

5. Choose the Second Table

 In the Merge dialog box, select the second table (dept) from the dropdown list.

6. Select Matching Columns

 For both tables, select the columns that you want to match on. For example, if both
tables have a column named DeptID, select DeptID in both tables.

7. Choose the Join Type

 Select the type of join you want to perform (described below).

8. Complete the Merge

 Click “OK” to complete the merge. Power Query will combine the tables based on the
selected join type.

9. Expand the New Columns

 After merging, you will see a new column with a table icon in your original table.
Click on the expand icon (an arrow) next to this column to choose which columns
from the second table (dept) you want to include in the merged result.
10. Apply and Close

 Once you’re satisfied with the merge, click “Close & Load” to load the combined data
back into Excel.

Types of Merges (Joins) in Power Query

Here are the different types of merges or joins available in Power Query:

1. Inner Join
o Description: Combines rows where there is a match in both tables.
o Example: You get a list of employees and their departments where both emp
and dept tables have matching DeptID.
o Result: Only employees who have a corresponding department are included.
2. Left Outer Join
o Description: Includes all rows from the first table and matched rows from the
second table. Unmatched rows from the second table will have null values.
o Example: You get a list of all employees and their departments. Employees
without a department will still appear, but the department information will be
null.
o Result: All employees are included, whether or not they have a corresponding
department.
3. Right Outer Join
o Description: Includes all rows from the second table and matched rows from
the first table. Unmatched rows from the first table will have null values.
o Example: You get a list of all departments and their employees. Departments
without employees will still appear, but the employee information will be null.
o Result: All departments are included, whether or not they have employees.
4. Full Outer Join
o Description: Includes all rows from both tables, with matched rows from each
table. Unmatched rows will have null values for missing matches.
o Example: You get a list of all employees and all departments, with nulls
where there is no match in either table.
o Result: Every employee and every department appear in the combined result,
with nulls where there is no match.
5. Anti Join (Left Anti Join)
o Description: Includes rows from the first table where there is no match in the
second table.
o Example: You get a list of employees who do not have a corresponding
department.
o Result: Only employees without a matching department are included.
6. Anti Join (Right Anti Join)
o Description: Includes rows from the second table where there is no match in
the first table.
o Example: You get a list of departments that do not have any employees.
o Result: Only departments without matching employees are included.
Example Summary

For example, if you have:

 emp Table:

EmpID | EmpName | DeptID


-----------------------
1 | John | 10
2 | Alice | 20
3 | Bob | 30

 dept Table:

DeptID | DeptName
-----------------
10 | Sales
20 | Marketing
40 | IT

Inner Join on DeptID will result in:

EmpID | EmpName | DeptID | DeptName


-----------------------------------
1 | John | 10 | Sales
2 | Alice | 20 | Marketing

Left Outer Join on DeptID will result in:

EmpID | EmpName | DeptID | DeptName


-----------------------------------
1 | John | 10 | Sales
2 | Alice | 20 | Marketing
3 | Bob | 30 | null

Right Outer Join on DeptID will result in:

EmpID | EmpName | DeptID | DeptName


-----------------------------------
1 | John | 10 | Sales
2 | Alice | 20 | Marketing
null | null | 40 | IT

Full Outer Join on DeptID will result in:


EmpID | EmpName | DeptID | DeptName
-----------------------------------
1 | John | 10 | Sales
2 | Alice | 20 | Marketing
3 | Bob | 30 | null
null | null | 40 | IT

Left Anti Join on DeptID will result in:

EmpID | EmpName | DeptID | DeptName


-----------------------------------
3 | Bob | 30 | null

Right Anti Join on DeptID will result in:

EmpID | EmpName | DeptID | DeptName


-----------------------------------
null | null | 40 | IT

By following these steps and understanding the types of joins, you can effectively combine
data from multiple sources in Power Query.

You might also like