Bi Practical

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 40

Shradha Bane 303

Index

Sr.no Title Date Sign


1 Import the legacy data from different
sources and load in the target system.

2 Perform the Extraction Transformation and


Loading (ETL) process to construct the
database in the Power BI.
3 Implementation of Classification algorithm
in R Programming.

4 Practical Implementation of Decision Tree


using R Tool.
5 k-means clustering using R.
6 Prediction Using Linear Regression.
7 Data Analysis using Time Series Analysis.
8 Data Modelling and Analytics with Pivot
Table in Excel
9 Apply the what-if Analysis for data
visualization. Design and generate necessary
reports based on the data warehouse data.

1
Business Intelligence
Shradha Bane 303

Practical No.1

Aim : Import the legacy data from different sources such as ( Excel, SqlServer,
Oracle etc.) and load in the target system. (You can download sample database
such as Northwind, Adventureworks, foodmart, etc).

Step 1 : Open Power BI

Step 2 : Click on get data following list will be displayed , select Excel.

2
Business Intelligence
Shradha Bane 303

Step 3 : Select required file and click on Open, Navigator screen appears

Step 4 : select file and click on edit

3
Business Intelligence
Shradha Bane 303

Step 5: Power query editor appears

Step 6: Again, go to get data and select OData feed

Step 7: Paste url as http://services.odata.org/V3/Northwind/Northwind.svc/ Click


on OK

4
Business Intelligence
Shradha Bane 303

Step 8 : Select order and click on edit

5
Business Intelligence
Shradha Bane 303

Practical No.2

Aim: Perform the Extraction Transformation and Loading (ETL) process to


construct the database in the Power BI.

Step 1: Open Power BI, Click on Get Data , OData Feed


Paste Url : http://services.odata.org/V3/Northwind/Northwind.svc/
And click Ok

6
Business Intelligence
Shradha Bane 303

Step 2: Click on Check Box of Products table and then click on Edit

1) Remove other columns to only display columns of interest


 In Query Editor, select the ProductID, ProductName, QuantityPerUnit, and
UnitsInStock columns (use Ctrl+Click to select more than one column, or
Shift+Click to select columns that are beside each other).
 Select Remove Columns > Remove Other Columns from the ribbon, or right-
click on a column header and click Remove Other Columns
 After selecting Remove Other Columns only selected four columns are
displayed other columns are discarded.

7
Business Intelligence
Shradha Bane 303

2. Change the data type of the UnitsInStock column


a) Select the UnitsInStock column.
b) Select the Data Type drop-down button in the Home ribbon.
c) If not already a Whole Number, select Whole Number for data type from
the drop down (the Data Type: button also displays the data type for the current
selection).After clicking on Whole number, you can see the changed Datatype in
column header of UnitsInStock.After above step, close query editor and click on
Yes to save change. Now you can view fields of Products table on right side, check
all the fields of table to get representation in charts form.

8
Business Intelligence
Shradha Bane 303

3. Expand the Orders table


Once You have loaded a data source, you can click on Recent Sources to select
desired table (Orders).After selecting the URL, Navigator window will appear from
which you can select Orders table.
Click on Edit. Query Editor Window will appear
1. In the Query View, scroll to the Order_Details column.
2. In the Order_Details column, select the expand icon .
3. In the Expand drop-down:
a. Select (Select All Columns) to clear all columns.
9
Business Intelligence
Shradha Bane 303

b. Select ProductID, UnitPrice, and Quantity.


c. Click OK.
After clicking on OK following screen appears with combined columns

4. Calculate the line total for each Order_Details row

10
Business Intelligence
Shradha Bane 303

Power BI Desktop lets you to create calculations based on the columns you are
importing, so you can enrich the data that you connect to. In this step, you create
a Custom Column to calculate the line total for each Order_Details row.
Calculate the line total for each Order_Details row:
a) In the Add Column ribbon tab, click Add Custom Column.
b) In the Custom Column dialog box, in the Custom Column Formula textbox,
enter [Order_Details.UnitPrice] * [Order_Details.Quantity] by selecting from
available columns and click on insert for each column.
c) In the New column name textbox, enter LineTotal.
d) Click OK.

5. Rename and reorder columns in the query


In this step you finish making the model easy to work with when creating reports,
by renaming the final columns and changing their order.
a) In Query Editor, drag the LineTotal column to the left, after ShipCountry.
b) Remove the Order_Details. prefix from the Order_Details.ProductID,
Order_Details.UnitPrice and Order_Details.Quantity columns, by double-clicking
on each column header, and then deleting that text from the column name.

11
Business Intelligence
Shradha Bane 303

6. Combine the Products and Total Sales queries


Power BI Desktop does not require you to combine queries to report on them.
Instead, you can create relationships between datasets. These relationships can
be created on any column that is common to your datasets.
We have Orders and Products data that share a common 'ProductID' field, so we
need to ensure there's a relationship between them in the model we're using
with Power BI Desktop. Simply specify in Power BI Desktop that the columns from
each table are related (i.e. columns that have the same values). Power BI Desktop
works out the direction and cardinality of the relationship for you. In some cases,
it will even detect the relationships automatically.
In this task, you confirm that a relationship is established in Power BI Desktop
between the Products and Total Sales queries
Step 1: Confirm the relationship between Products and Total Sales 1. First, we
need to load the model that we created in Query Editor into Power BI Desktop.
From the Home ribbon of Query Editor, select Close & Apply.
Step 2: Power BI Desktop loads the data from the two queries.
Step 3: Once the data is loaded, select the Manage Relationships button Home
ribbon

12
Business Intelligence
Shradha Bane 303

Step 4. Select the New… button

Step 5: When we attempt to create the relationship, we see that one already
exists! As shown in the Create Relationship dialog (by the shaded columns), the
ProductsID fields in each query already have an established relationship.

13
Business Intelligence
Shradha Bane 303

Step 6: Select Cancel, and then select Relationship view in Power BI Desktop.
Step 7: We see the following, which visualizes the relationship between the
queries.

Step 8: When you double-click the arrow on the line that connects the to queries,
an Edit Relationship dialog appears.

Step 9: No need to make any changes, so we'll just select Cancel to close the Edit
Relationship dialog

Practical No: 3

Aim : Implementation of Classification algorithm in R Programming.


Consider the annual rainfall details at a place starting from January 2012. We
create an R time series object for a period of 12 months and plot it.
Solution :

14
Business Intelligence
Shradha Bane 303

Output:

Practical No: 4

Aim : Practical Implementation of Decision Tree using R Tool


Solution:

15
Business Intelligence
Shradha Bane 303

16
Business Intelligence
Shradha Bane 303

Output:

Practical No: 5

Aim : k-means clustering using R


Solution:

17
Business Intelligence
Shradha Bane 303

18
Business Intelligence
Shradha Bane 303

Output:

19
Business Intelligence
Shradha Bane 303

Practical No : 6

Aim : Prediction Using Linear Regression


Solution:

20
Business Intelligence
Shradha Bane 303

Output:

21
Business Intelligence
Shradha Bane 303

Practical No: 7

Aim : Data Analysis using Time Series Analysis.


Solution:

22
Business Intelligence
Shradha Bane 303

Output:

23
Business Intelligence
Shradha Bane 303

Practical No: 8

Aim : Data Modelling and Analytics with Pivot table in Excel.


Solution:
A. Opening Access database in excel using Pivot Table.
Step 1: Open a new blank Excel and click on “Data” Tab

Step 2: In “Get External Data” section Click on “From Access”. ”Select Data
Source” Dialog Box will be opened. Navigate to the folder where
“OlympicMedals.accdb” file is saved. Select the “Event.accdb” and Click Open.

24
Business Intelligence
Shradha Bane 303

Step 3: Select table window will appear. Check “Enable Selection of multiple
tables” and select all the tables in the window. Click on “OK”

Step 4: Import data window will appear on the screen. Select option
PivotTable Report Option. This option imports the tables into Excel and
prepares a PivotTable for analyzing the imported tables. Notice that the
checkbox at the bottom of the window- ‘Add this data to the data model’ is
selected and disabled. Click on “OK”.

Step 5: The data is imported, and a PivotTable is created using the imported
tables.

25
Business Intelligence
Shradha Bane 303

B. Explore Data Using PivotTable


Step 1: You know how to add fields to PivotTable and drag fields across areas.
Even if you are not sure of the final report that you want, you can play with the
data and choose the best-suited report. In PivotTables Fields, click on the arrow
beside the table- medals to expand it to show the fields in that table. Drag the
NOC_CountryRegion field in the medals table to the COLUMNS area.

Step 2: Drag Discipline from the Discipline table to the ROWS area.
Step 3: Filter Discipline to display only five sports: Archery, Driving, Fencing,
Figure Skating and Speed Skating. Drag the discipline field in the rows area.

26
Business Intelligence
Shradha Bane 303

Step 4: Click on the arrow next to “Rows Labels” & uncheck “Select All”. Select
Archery, Diving, Fencing, Figure Skating and Speed Skating.

Step 5: In PivotTable Fields, from the Medals table, drag Medal to the Values area.
Step 6: From the Medals table, select Medal again and drag it into FILTERS area.

27
Business Intelligence
Shradha Bane 303

Step 7: Click the dropdown list button to the right of the Columns labels. Select
value filters and then select greater than 80. Click OK.

28
Business Intelligence
Shradha Bane 303

Practical No: 9

Aim : Apply the what-if Analysis for data visualization. Design and generate
necessary reports based on the data warehouse data.
Solution:
What-If Analysis
 What-If Analysis is the process of changing the values in cells to see how those changes
will affect the outcome of formulas on the worksheet.
 What-If Analysis in Excel allows you to try out different values (scenarios) for formulas.
 Three kinds of What-If Analysis tools come with Excel:
 Scenarios, Goal Seek, and Data Tables.
 Scenarios and Data tables take sets of input values and determine possible results.
Goal Seek
 If you know the result that you want from a formula, but you are not sure what input value
the formula requires to get that result, you can use the Goal Seek feature.

Data Table
 If you have a formula that uses one or two variables, or multiple formulas that all use
one common variable, you can use a Data Table to see all the outcomes in one place.
Scenario Manager
 A Scenario Manager is a set of values that Excel saves and can substitute automatically in
cells on a worksheet. You can create and save different groups of values on a worksheet and
then switch to any of these new scenarios to view different results.

a) Understanding Goal Seek Option

29
Business Intelligence
Shradha Bane 303

To Change qyt to achieve 6000/-. How much qty will be

required. Go to What-If analysis and select Goal Seek

Option

To Change prize to achieve 6000/-. How much prize will be

required. Go to What-If analysis and select Goal Seek Option

30
Business Intelligence
Shradha Bane 303

b) Understanding Data Table Option


Generate Data table using qty.

31
Business Intelligence
Shradha Bane 303

For this, go to What-If analysis and select Data Table option.

32
Business Intelligence
Shradha Bane 303

Generate Data table using prize

33
Business Intelligence
Shradha Bane 303

34
Business Intelligence
Shradha Bane 303

Generate Data table using qty and prize both.

35
Business Intelligence
Shradha Bane 303

c) Understanding Scenario Manager Option

36
Business Intelligence
Shradha Bane 303

37
Business Intelligence
Shradha Bane 303

38
Business Intelligence
Shradha Bane 303

39
Business Intelligence
Shradha Bane 303

40
Business Intelligence

You might also like