Professional Documents
Culture Documents
6415 BI Journal
6415 BI Journal
Affiliated to
UNIVERSITY OF MUMBAI
Affiliated to
UNIVERSITY OF MUMBAI
R.J.College
2
Shivam Vishwakarma 6415 BI
Index
Business Intelligence
2023-24
3 Creating Pivot Table and Pivot Chart using Excel and Power 04/01/2024
BI
R.J.College
3
Shivam Vishwakarma 6415 BI
Dec 7, 2023
Demonstrate the use of various features of Excel that are required to do the data analysis.
Example: Result Analysis
Result Analysis
Marks
1 Vikas Yadav 25 35 60 56
2 Amit Mishra 45 60 55 78
3 Sunita Yadav 56 42 40 84
4 Priyanka Gupta 45 35 20 38
5 Anita Shetty 37 40 35 90
6 Ranjan Yadav 56 56 35 60
7 Ankita Mishra 34 30 60 61
8 Vaibhav Yadav 89 78 90 89
9 Soniya Gupta 24 78 35 45
10 Sunil Shetty 45 56 40 89
Operation 1
We wanted to have the total marks of the students
R.J.College
1
Shivam Vishwakarma 6415 BI
Or
2) =(cell1 + cell2 + cell3 + ….)
You can see the sum of marks from sub 1 to sub 4 is present in the total mark column
Now for all the others, you don't need to write the formula again and again.
Just select the cell where you have applied the formula and drag the cursor to the column to
which you want to apply the same formula.
R.J.College
2
Shivam Vishwakarma 6415 BI
After the release of the cursor, you can see the total marks of all student in their respective total
column
Operation 2
Now, let's derive Percentage of the Students
As percentage is calculated as
(mark obtained in all subjects/total marks of all subjects) * 100
R.J.College
3
Shivam Vishwakarma 6415 BI
Operation 3
As the percentage is showing in decimal points what if I want the percentage to be a whole
number only
Apply formula
=ROUNDUP(Cell no, digits to round up)
Operation 4
Suppose, you want to mark the students who are failing in the individual subjects,
The criteria for a student to be filed in a student if he is marks less than 40
R.J.College
4
Shivam Vishwakarma 6415 BI
Step 2: go to the ‘Data’ tab and in the Data, tab select the ‘filter’ option
After clicking on the filter option, you can see the table heading a down arrow symbol in the
column that is filtering options
Step 3: click the arrow of the ‘sub 1’ column uncheck the select all option select only the marks
that match the fail criteria and click on OK
R.J.College
5
Shivam Vishwakarma 6415 BI
You will be only able to see the students who have less than 40 marks in sub 1
Select the marks of sub1 and mark them in red color this student fails in sub 1 because they got
less than 40 marks
Now, again click on the sub 1 column arrow select all, and click on ok, and all the records will
be visible this is important if you forget then you will operate only on the selected data not on
entire data.
R.J.College
6
Shivam Vishwakarma 6415 BI
After doing this do the same form sub 2, sub 3, and sub 4 columns of marks
R.J.College
7
Shivam Vishwakarma 6415 BI
Suppose, you want to remove that data filtering option again select the data table go to the Data
tab menu, and unselect the filter option and you will see the filtering option is now removed from
columns headings
Operation 5
Let Highlight the percentage marks which are greater than 80%
R.J.College
8
Shivam Vishwakarma 6415 BI
After clicking on OK
Operation 6
Let Highlight the percentage marks which are lesser than 45%
Again select the cells
Go to Home tab → Conditional Formatting → Highlight cell rules → Less than
R.J.College
9
Shivam Vishwakarma 6415 BI
Less than 45% with custom formatting font-color red and style bold
Result
R.J.College
10
Shivam Vishwakarma 6415 BI
Operation 7
Now,
Let look for the Highest and Lowest scorer from the total mark obtained by the students
We will mark the cell as Yellow for the highest scorer and red as the lowest scorer
The below following dialog bax will open give the no. of time you want and with which
formatting style
I gave top 1 with Yellow fill and Dark Yellow text click on OK
R.J.College
11
Shivam Vishwakarma 6415 BI
R.J.College
12
Shivam Vishwakarma 6415 BI
Operation 8
Let find the top 10% scorer from each subject from above lessons
But now we will use custom formatting
R.J.College
13
Shivam Vishwakarma 6415 BI
R.J.College
14
Shivam Vishwakarma 6415 BI
R.J.College
15
Shivam Vishwakarma 6415 BI
Operation 9
Let go through the this three option this options used for formatting the cells
1) Data Bar
R.J.College
16
Shivam Vishwakarma 6415 BI
2) Color Scales
3) Icon sets
R.J.College
17
Shivam Vishwakarma 6415 BI
From clear rules Options you can clear the conditional formatting rules from the cells
Operation 10
Data Visualization
Now,
Select total Marks column
Go to Insert → Charts ans select bar graph
R.J.College
18
Shivam Vishwakarma 6415 BI
R.J.College
19
Shivam Vishwakarma 6415 BI
Link to Spreadsheets
https://docs.google.com/spreadsheets/d/1P-j0sW05YQ_-
scZfc0OyWJEIkTMXljc4/edit?usp=drive_link&ouid=106011563062589671609&rtpof=true&sd
=true
https://docs.google.com/spreadsheets/d/1GtJMYp1Kb6Vww85lPQPAa8AUg-
3M593h/edit?usp=drive_link&ouid=106011563062589671609&rtpof=true&sd=true
R.J.College
20
Shivam Vishwakarma 6415 BI
Problem Statement - Suppose you are in semester 6 and after completion of your degree to
wanted to achieve the aggregate CGPA of 9.5. you want to know how much you have to score in
SEM 6 to get the the aggregate CGPA of 9.5
R.J.College
21
Shivam Vishwakarma 6415 BI
Click on OK
Conclusion
If you want to achieve an Aggregate og 9.5 CGPA then you need to score 9.20 SGPA in SEM 6
You have given the profit of a Company ABC for respective Academic Year
You want to know how much you have to make profit in year 2024 - 25 to make profit of
Rs 25,00,000
R.J.College
22
Shivam Vishwakarma 6415 BI
Conclusion
It means you have to make a profit of Rs 5,98,000 to make an aggregate profit of Rs 25,00,00 by
the year 2024 - 25
R.J.College
23
Shivam Vishwakarma 6415 BI
Go to
Data → What-If Analysis → Scenario
Click on Add
R.J.College
24
Shivam Vishwakarma 6415 BI
Name your scenario and changing cell in my case the no of customer will be changing cell
Click on Ok
R.J.College
25
Shivam Vishwakarma 6415 BI
R.J.College
26
Shivam Vishwakarma 6415 BI
R.J.College
27
Shivam Vishwakarma 6415 BI
R.J.College
28
Shivam Vishwakarma 6415 BI
Scenario 1 Result
Scenario 2 -Result
R.J.College
29
Shivam Vishwakarma 6415 BI
Balance
Interest
R.J.College
30
Shivam Vishwakarma 6415 BI
Go to
Data → What-If Analysis → Data Table
The below dialog box appear select the original initial Investment i.e 2000 click on Ok
R.J.College
31
Shivam Vishwakarma 6415 BI
Go to
Data → What-If Analysis → Data Table
Select Column input cells as the original annual rate of Investment i.e 5%
R.J.College
32
Shivam Vishwakarma 6415 BI
Go to
Data → What-If Analysis → Data Table
R.J.College
33
Shivam Vishwakarma 6415 BI
Go to
Data → What-If Analysis → Data Table
The below dialog box appear select the original initial Investment i.e 2000 click on Ok
R.J.College
34
Shivam Vishwakarma 6415 BI
Go to
Data → What-If Analysis → Data Table
The below dialog box appear select the cel l of % unit sold at Highest price i.e 60%
R.J.College
35
Shivam Vishwakarma 6415 BI
Activity
Go to
Data → What-If Analysis → Data Table
R.J.College
36
Shivam Vishwakarma 6415 BI
Link to Spreadsheet
https://docs.google.com/spreadsheets/d/1ITi_MkKjpcGj8WzbrNvjEEiuPHwOmnAZ/edit?usp=d
rive_link
R.J.College
37
Shivam Vishwakarma 6415 BI
Practical 3 - Creating Pivot Table and Pivot Chart using Excel and Power BI
Jan 4, 2024
Demonstrate the creation of one dimensional and two-dimensional pivot table and pivot chart to
perform analysis using Microsoft Excel and PowerBI for any sample data like fruits sale data.
Pivot Table
R.J.College
38
Shivam Vishwakarma 6415 BI
R.J.College
39
Shivam Vishwakarma 6415 BI
R.J.College
40
Shivam Vishwakarma 6415 BI
Import the legacy data from different data sources such as (Flat file, Excel, Web, XML, JSON,
OData, etc. Perform the extraction transformation and Loading (ETL) process to load in
PowerBi)
Note: Use your data for Flat File, Excel, Web, XML, JSON, OData
1) Excel
Data in Excel
Open power BI
Get Data → All → Excel
R.J.College
41
Shivam Vishwakarma 6415 BI
Click on Connect
Click on Load
2) XML
R.J.College
42
Shivam Vishwakarma 6415 BI
Open Power BI
Get Data → All → XML
Click on Connect
R.J.College
43
Shivam Vishwakarma 6415 BI
Click on Load
3) JSON
R.J.College
44
Shivam Vishwakarma 6415 BI
Open Power BI
Get Data → All → JSON
Click o Connect
R.J.College
45
Shivam Vishwakarma 6415 BI
R.J.College
46
Shivam Vishwakarma 6415 BI
Create a data model for the student database in Power BI and import data from an Excel
worksheet. Also, perform ETL and prepare data for result analysis.
R.J.College
47
Shivam Vishwakarma 6415 BI
R.J.College
48
Shivam Vishwakarma 6415 BI
3. Transform the ‘Units Sold’ columns data by changing its data type to the whole number.
Select Unit Solds column
R.J.College
49
Shivam Vishwakarma 6415 BI
R.J.College
50
Shivam Vishwakarma 6415 BI
6. The product montana is not continued last month. So exclude the data of the Montana
product from the table by deselecting the product from the column filter.
R.J.College
51
Shivam Vishwakarma 6415 BI
7. You see that each transformation has been added to the list under query Settings in
Applied Steps.
And you will get the Final table after Data transformation
R.J.College
53
Shivam Vishwakarma 6415 BI
Report Creation
1. Add report title as “Executive Summary - Finance Report”
● On the Insert Ribbon, select TextBox to add title to the report and type “Executive
Summary - Finance Report”.
● Select the text you typed. Set the font size to 20 and bold
R.J.College
54
Shivam Vishwakarma 6415 BI
2. To Check Profit by Date , add a line chart to see which month and year had the highest
profit.
● From the fields pane, drag the profit field to the blank area on the report canvas. By
default, power bi display a column chart with one column, profit.
After dragging profit colum to canvas
R.J.College
55
Shivam Vishwakarma 6415 BI
● Drag the Date Field to the same Visual. If you created a Calender Table in Extra credit :
Create a table in DAX earlier in this article , drag the Date field from your Calender table
instead.
Power BI updates the column chart to show profit by the two years.
3. Change the visualization type to Line chart. (In the Visualizations pane change the chart
type)
R.J.College
57
Shivam Vishwakarma 6415 BI
5. Create a bar chart to check sales by product and segment and determine which companies
and segments to invest in.
● Drag the two charts you've created to be side by side in the top half of the canvas.
Save some room on the left side of the canvas.
● Select a blank area in the lower half of your report canvas.
● In the Fields pane, select the Sales, Product, and Segment fields.
R.J.College
58
Shivam Vishwakarma 6415 BI
● Drag the chart so it's wide enough to fill the space under the two upper charts.
6. Add date slicer to the report to check or filter the year wise or month wise data.
● In the Fields pane, select the Date field in the Financials table. Drag it to the blank
area on the left of the canvas.
● In the Visualizations pane, choose Slicer. Power BI automatically creates a
numeric range slicer.
● You can drag the ends to filter, or select the arrow in the upper-right corner and
change it to a different type of slicer.
R.J.College
59
Shivam Vishwakarma 6415 BI
R.J.College
60
Shivam Vishwakarma 6415 BI
And edit the chart and report properties from Format visuals
R.J.College
61
Shivam Vishwakarma 6415 BI
Final Dashboard
R.J.College
62
Shivam Vishwakarma 6415 BI
R.J.College
63
Shivam Vishwakarma 6415 BI
R.J.College
64
Shivam Vishwakarma 6415 BI
R.J.College
65
Shivam Vishwakarma 6415 BI
11. Transform the ‘Units Sold’ columns data by changing its data type to the whole number.
Select Unit Solds column
R.J.College
66
Shivam Vishwakarma 6415 BI
R.J.College
67
Shivam Vishwakarma 6415 BI
13. Shorten the column name from month Name to just Month
14. The product montana is not continued last month. So exclude the data of the Montana
product from the table by deselecting the product from the column filter.
R.J.College
68
Shivam Vishwakarma 6415 BI
15. You see that each transformation has been added to the list under query Settings in
Applied Steps.
And you will get the Final table after Data transformation
1. Create a new measure name Total Units Sold to add all the numbers in the Units Sold
Column.
● On the Home ribbon , select New Measure.
● Type the Following Expressions.
Total Units Sold = SUM(financials[Units Sold])
● Select the check mark besides the expression box to commit the expression
R.J.College
70
Shivam Vishwakarma 6415 BI
R.J.College
71
Shivam Vishwakarma 6415 BI
Report Creation
7. Add report title as “Executive Summary - Finance Report”
R.J.College
72
Shivam Vishwakarma 6415 BI
● On the Insert Ribbon, select TextBox to add title to the report and type “Executive
Summary - Finance Report”.
● Select the text you typed. Set the font size to 20 and bold
8. To Check Profit by Date , add a line chart to see which month and year had the highest
profit.
R.J.College
73
Shivam Vishwakarma 6415 BI
● From the fields pane, drag the profit field to the blank area on the report canvas. By
default, power bi display a column chart with one column, profit.
After dragging profit colum to canvas
● Drag the Date Field to the same Visual. If you created a Calender Table in Extra credit :
Create a table in DAX earlier in this article , drag the Date field from your Calender table
instead.
Power BI updates the column chart to show profit by the two years.
R.J.College
74
Shivam Vishwakarma 6415 BI
9. Change the visualization type to Line chart. (In the Visualizations pane change the chart
type)
R.J.College
75
Shivam Vishwakarma 6415 BI
10. Create a map visual to check the hight profit Country or Region.
● From the Fields pane, drag the Country field to a blank area on your report canvas
to create a map.
● Drag the Profit field to the map.
● Power BI creates a map visual with bubbles representing the relative profit of
each location. Compare the bubble size to identify the highest profit country.
R.J.College
76
Shivam Vishwakarma 6415 BI
11. Create a bar chart to check sales by product and segment and determine which companies
and segments to invest in.
● Drag the two charts you've created to be side by side in the top half of the canvas.
Save some room on the left side of the canvas.
● Select a blank area in the lower half of your report canvas.
● In the Fields pane, select the Sales, Product, and Segment fields.
● Drag the chart so it's wide enough to fill the space under the two upper charts.
R.J.College
77
Shivam Vishwakarma 6415 BI
12. Add date slicer to the report to check or filter the year wise or month wise data.
● In the Fields pane, select the Date field in the Financials table. Drag it to the blank
area on the left of the canvas.
● In the Visualizations pane, choose Slicer. Power BI automatically creates a
numeric range slicer.
● You can drag the ends to filter, or select the arrow in the upper-right corner and
change it to a different type of slicer.
R.J.College
78
Shivam Vishwakarma 6415 BI
R.J.College
79
Shivam Vishwakarma 6415 BI
R.J.College
80
Shivam Vishwakarma 6415 BI
R.J.College
81
Shivam Vishwakarma 6415 BI
Basics
Working Directory
R.J.College
82
Shivam Vishwakarma 6415 BI
Variables
List
Functions
R.J.College
83
Shivam Vishwakarma 6415 BI
NUMPY - Library
R.J.College
84
Shivam Vishwakarma 6415 BI
R.J.College
85
Shivam Vishwakarma 6415 BI
R.J.College
86
Shivam Vishwakarma 6415 BI
R.J.College
87
Shivam Vishwakarma 6415 BI
R.J.College
88
Shivam Vishwakarma 6415 BI
MATPLOTLIB - Library
R.J.College
89
Shivam Vishwakarma 6415 BI
R.J.College
90
Shivam Vishwakarma 6415 BI
R.J.College
91
Shivam Vishwakarma 6415 BI
Given the dataset Salary_Data.csv that has two variables: salary (dependent variable) and
experience (Independent variable) solve the following queries
1) Find out if there is any correlation between two variables: salary and experience.
2) Find the best fit line for the dataset.
3) Demonstrate how the dependent variable is changing by changing the independent
variable.
R.J.College
92
Shivam Vishwakarma 6415 BI
R.J.College
93
Shivam Vishwakarma 6415 BI
R.J.College
94
Shivam Vishwakarma 6415 BI
R.J.College
95
Shivam Vishwakarma 6415 BI
Combine Code
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from sklearn.linear_model import LinearRegression
R.J.College
96
Shivam Vishwakarma 6415 BI
# Predictions
y_predict = model.predict(x)
R.J.College
97
Shivam Vishwakarma 6415 BI
Given a dataset complist.csv of 50 start-up companies with five main attributes: R&D Spend,
Administration Spend, Marketing Spend, State, and Profit for a financial year, create a model
that can easily determine which company has a maximum profit, and which is the most affecting
factor for the profit of a company.
R.J.College
98
Shivam Vishwakarma 6415 BI
R.J.College
99
Shivam Vishwakarma 6415 BI
R.J.College
100
Shivam Vishwakarma 6415 BI
Feb 8, 2024
Problem Statement: Classify the iris species by using the following algorithms.
(Given Dataset: iris.csv)
a. Logistic Regression
b. K-Nearest Neighbors (KNN)
c. Naive Bayes
d. Decision Tree
e. Support Vector Machine
Colab Filelink
https://colab.research.google.com/drive/163Tos5ap05SpnBa-5MzC5bC_aY8-
QZ9q#scrollTo=GZKGK6_j-NL3
R.J.College
101
Shivam Vishwakarma 6415 BI
R.J.College
102
Shivam Vishwakarma 6415 BI
R.J.College
103
Shivam Vishwakarma 6415 BI
R.J.College
104
Shivam Vishwakarma 6415 BI
R.J.College
105
Shivam Vishwakarma 6415 BI
b. Agglomerative Clustering
Implement an agglomerative hierarchical clustering algorithm using Python for Mall_customer
dataset. The dataset contains the information of customers that have visited a mall for shopping.
So, the mall owner wants to find some patterns or some particular behavior of his customers
using the dataset information. (Dataset: Mall_Customers.csv)
R.J.College
106
Shivam Vishwakarma 6415 BI
R.J.College
107
Shivam Vishwakarma 6415 BI
R.J.College
108
Shivam Vishwakarma 6415 BI
R.J.College
109
Shivam Vishwakarma 6415 BI
R.J.College
110
Shivam Vishwakarma 6415 BI
R.J.College
111
Shivam Vishwakarma 6415 BI
R.J.College
112
Shivam Vishwakarma 6415 BI
R.J.College
113