0% found this document useful (0 votes)
69 views

DWFile

The document provides instructions for creating tables in Microsoft Excel and Microsoft Access. It discusses: 1) Creating a simple table in Excel by entering data into cells, formatting fonts, and using functions like SUM to calculate totals. 2) Creating a sales table in Excel to calculate and compare total sales quarterly and yearly. 3) The steps to create a table in Microsoft Access, which include opening a new blank database, clicking "Create" to add field names, and selecting primary keys and data types for each field. 4) Implementing common Excel functions like SUM, AVERAGE, MAX, MIN, COUNT, IF, AND and OR to analyze and manipulate data in tables. 5)

Uploaded by

828Nitish Kumar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
69 views

DWFile

The document provides instructions for creating tables in Microsoft Excel and Microsoft Access. It discusses: 1) Creating a simple table in Excel by entering data into cells, formatting fonts, and using functions like SUM to calculate totals. 2) Creating a sales table in Excel to calculate and compare total sales quarterly and yearly. 3) The steps to create a table in Microsoft Access, which include opening a new blank database, clicking "Create" to add field names, and selecting primary keys and data types for each field. 4) Implementing common Excel functions like SUM, AVERAGE, MAX, MIN, COUNT, IF, AND and OR to analyze and manipulate data in tables. 5)

Uploaded by

828Nitish Kumar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

DATA WAREHOUSE

&
DATA MINING
PRACTICAL FILE
INDEX

Create a simple table in MS Excel Worksheet.

Create a sales table for any company and perform these


operations: Calculate total sales, compare the sales
quarterly and yearly.

Implementing various excel functions:

To make olap cube in MS Excel

To create a table in MS Access

To create a form in Ms Access

To create various type of queries in MS Access


database.

To Create a MS Access Report of Access Database.


Experiment 1:
Create a simple table in MS Excel Worksheet.
Microsoft Excel is a computer application program written by Microsoft. It mainly comprises
tabs, groups of commands and worksheet. It is mainly used to store tabular data. Microsoft
Excel is one of the most suitable spreadsheet functions that help us manage data, create
optically logical charts, and thought-provoking graphs. Microsoft Excel is supported by both
Mac and PC platforms. Microsoft Excel can also be used to balance a check book, create an
expense document, build formulas, and edit them.
Features of MS Excel:
• Auto sum
• List Autofill
• Autofill
• Auto shapes
• Wizard
• Charts
• PivotTable
• Shortcut Menus
Steps to create a spreadsheet:
• Open Microsoft Excel, and click blank workbook.
• Enter data by selecting the cells and entering the required data.
• By default, when you create table in an Excel, all cells will be formatted with a black
font. You can change the colour of the font within any cell.
• To change the font colour in a cell, select the text that you wish to change the colour of
and go to Home Tab and then change colour from selecting colour from colortab.
Experiment-2:
Create a sales table for any company and perform these operations: Calculate total sales,
compare the sales quarterly and yearly.
Functions used:
SUM: Use the SUM function in Excel to sum a range of cells, an entire column or non-
contiguous cells. To create awesome SUM formulas, combine the SUM function with
other Excel functions.
The SUM function adds values. You can add individual values, cell references or ranges or a
mix of all three.
For example:
• =SUM (A2:A10) Adds the values in cells A2:10.
• =SUM (A2:A10, C2:C10) Adds the values in cells A2:10, as well as cells C2:C10.

MAX: MAX (number1, [number2], ...)


The MAX function syntax has the following arguments:
Number1, number2, ... Number1 is required, subsequent numbers are optional. 1 to 255
numbers for which you want to find the maximum value.
OUTPUT:
Experiment-3:
Implementing various excel functions:
Excel provides us various excel functions in different categories like (“Financial, Date & Time,
Math, Stats, Logical, etc.)
Some of the most used are:
SUM

The first Excel function you should be familiar with is the one that performs the basic arithmetic
operation of addition:

SUM (number1, [number2], …)

In the syntax of all Excel functions, an argument enclosed in [square brackets] is optional, other
arguments are required. Meaning, your Sum formula should include at least 1 number,
reference to a cell or a range of cells. For example:

=SUM (B2:B6) - adds up values in cells B2 through B6.

=SUM (B2, B6) - adds up values in cells B2 and B6.

If necessary, you can perform other calculations within a single formula, for example, add up
values in cells B2 through B6, and then divide the sum by 5:

=SUM (B2:B6)/5

To sum with conditions, use the SUMIF function: in the 1st argument, you enter the range of
cells to be tested against the criteria (A2:A6), in the 2nd argument - the criteria itself (D2), and
in the last argument - the cells to sum (B2:B6):

=SUMIF (A2:A6, D2, B2:B6)

AVERAGE:

The Excel AVERAGE function does exactly what its name suggests, i.e. finds an average, or
arithmetic mean, of numbers. Its syntax is similar to SUM's:

AVERAGE (number1, [number2], …)

Having a closer look at the formula from the previous section (=SUM (B2:B6)/5), what does
it actually do? Sums values in cells B2 through B6, and then divides the result by 5. And what
do you call adding up a group of numbers and then dividing the sum by the count of those
numbers? Yep, an average!

The Excel AVERAGE function performs these calculations behind the scenes. So, instead of
dividing sum by count, you can simply put this formula in a cell:
=AVERAGE (B2:B6)

To average cells based on condition, use the following AVERAGEIF formula, where A2:A6
is the criteria range, D3 is he criteria, and B2:B6 are the cells to average:

=AVERAGEIF (A2:A6, D3, B2:B6)

MAX & MIN

The MAX and MIN formulas in Excel get the largest and smallest value in a set of numbers,
respectively. For our sample data set, the formulas will be as simple as:

=MAX (B2:B6)

=MIN (B2:B6)

COUNT & COUNTA

If you are curious to know how many cells in a given range contain numeric values (numbers
or dates), don't waste your time counting them by hand. The Excel COUNT function will bring
you the count in a heartbeat:

COUNT (value1, [value2], …)

While the COUNT function deals only with those cells that contain numbers, the COUNTA
function counts all cells that are not blank, whether they contain numbers, dates, times, text,
logical values of TRUE and FALSE, errors or empty text strings (""):

COUNTA (value1, [value2], …)

IF

Judging by the number of IF-related comments on our blog, it's the most popular function in
Excel. In simple terms, you use an IF formula to ask Excel to test a certain condition and return
one value or perform one calculation if the condition is met, and another value or calculation
if the condition is not met:

IF (logical test, [value_if_true], [value_if_false])

For example, the following IF statement checks if the order is completed (i.e. there is a value
in column C) or not. To test if a cell is not blank, you use the "not equal to" operator (<>) in
combination with an empty string (""). As the result, if cell C2 is not empty, the formula returns
"Yes", otherwise "No":

=IF(C2<>"", "Yes", "No")

AND & OR
These are the two most popular logical functions to check multiple criteria. The difference is
how they do this:

• AND returns TRUE if all conditions are met, FALSE otherwise.


• OR returns TRUE if any condition is met, FALSE otherwise.

While rarely used on their own, these functions come in very handy as part of bigger formulas.
For example, to check the test results in columns B and C and return "Pass" if both are greater
than 60, "Fail" otherwise, use the following IF formula with an embedded AND statement:
=IF(AND(B2>60, B2>60), "Pass", "Fail")
Experiment 4: To make olap cube in MS Excel

OLAP stands for On-Line Analytical Processing. OLAP is a classification of software


technology which authorizes analysts, managers, and executives to gain insight into
information through fast, consistent, interactive access in a wide variety of possible views of
data that has been transformed from raw information to reflect the real dimensionality of the
enterprise as understood by the clients.

OLAP implement the multidimensional analysis of business information and support the
capability for complex estimations, trend analysis, and sophisticated data modelling. It is
rapidly enhancing the essential foundation for Intelligent Solutions containing Business
Performance Management, Planning, Budgeting, Forecasting, Financial Documenting,
Analysis, Simulation-Models, Knowledge Discovery, and Data Warehouses Reporting. OLAP
enables end-clients to perform ad hoc analysis of record in multiple dimensions, providing the
insight and understanding they require for better decision making.

Steps to make the olap cube:


• Create a Raw data table

• Copy the data from the above table and copy into another worksheet.
• Now Select anywhere in the table and go to Insert tab and click Pivot table, you can
also check for the recommended pivot table.
• Now create three pivot tables according to your data.

• Select the fields and add the content in row, table or values column and add filter to it.
• The three pivot tables here are: Product Category by Year Quarters, Year quarters by
sections and by count of sections.
• Now close the grand total of all the three tables.

• Now to remove the drop down select any cell type (=cell number) and Enter.
• Drag and format the values, update all three pivot in the same way.
• Cut these new tables and paste into another worksheet, now change the borders and the
cell colour from cell formatting.

• Copy the tables and paste as picture in the same sheet and change their rotations.
• Arrange them in a way to form a cube as shown below.

OUTPUT:
Experiment 5: To create a table in MS Access
Microsoft Access is a Database Management System (DBMS) from Microsoft that
combines the relational Microsoft Jet Database Engine with a graphical user interface and
software development tools. It is a part of the Microsoft Office suite of applications,
included in the professional and higher editions. This is an introductory tutorial that covers
the basics of MS Access.
Steps to create a simple table:
• Open MS Access and you will see the following screen in which different Access
database templates are displayed.

• Select a blank database and Access will create a new blank database and will open
up the table which is also completely blank.

• Now click on create button & then a screen appears showing id and field name.

• Now click on design table then screen appears showing field name, data type &
description.
• Where data type is the form in which input taken & field name is column name.
• Make one entry as a private key, by selecting the primary key option.
• Choose the field name and their respective data type.
• Click ok and a blank database appears

• Enter the data


OUTPUT:
Experiment 6: To create a form in Ms access
Forms in Access are like display cases in stores that make it easier to view or get the items
that you want. Since forms are objects through which you or other users can add, edit, or
display the data stored in your Access desktop database, the design of your form is an
important aspect. There's a lot you can do design-wise with forms in Microsoft Access. You
can create two basic types of forms −

• Bound forms: Bound forms are connected to some underlying data source such as a
table, query, or SQL statement.

• Unbound forms: These forms are not connected to an underlying record or data source.

Steps for Creating a Form:

• Open your database and go to Create tab and click on The Form Wizard option
• You can change the Form view to enter the records from Home tab from left upper
corner.
Designing the Form
• Go to create tab & click on Form wizard and then following screen appears.
• Now select the fields to show on the form by clicking on >> button.
• Otherwise if you don’t need any one of field from selected field click on < button.
• Now click on next

• Then the following screen appears where you can select which type of form you want
to make. We will select columnar and click on next.
• Now a screen appears through which you can change the name of the form and select
the Modify the form’s Design radio button to modify the form and click on finish

Design View:

• To change the background colour of boxes or text select the boxes and by right clicking
you will get various options for styling and colouring the boxes and text.
• To add buttons to your form, go to Design tab and click on Button tool & then you can
draw your button anywhere in the design area. Now following Common Button Wizard
Screen appears.
• From this screen you can select which type of buttons you want to add. Now we select
Record Operations and in right side we select Add New Record & then click on Next
button. Then following screen appears.
• This will ask for name of button or to put an image in place of button and click on
finish.
• Similarly, we can add different buttons like Save Record, Last Record, First Record,
Next Record & Previous record.
• Now you can add a chart also by clicking on chart button from design tab.
• Now you can finally view your form by clicking on Form View from Home Tab.
All Access Obje..
P project
Experiment-7: To create various type of queries in MS Access database.
Query: A query is a request for information from the database tables. Simple queries are those
that retrieve data from a single table.
Steps involved to use various type of queries:
• First we add up a Salary column in our EmpTable by using Design view of table. Now
the table used for applying queries is given below.

• To start querying go to Create tab and click on the Query Wizard. Now the following
screen appears

• Now select Simple Query Wizard and click OK. Then following screen appears. In this
step you can choose table in which you have to apply queries. And you can also choose
fields on which you have to apply queries using >> button. We will select all fields to
right side and click on Next. Then following screen appears.

• In this step you can change the name of the query & we will select Modify the Query
Design and click on Finish. Now the following screen appears
• So in above screen various columns appears. In row named Criteria we can write our
queries. E.g. if we want to get the names of the employees whose name starts with letter
M, we can write our query in First Name Col.
• MS Access engine automatically convert written query into its defined syntax. Like
“V*”
• To execute above query go to Design Tab & clickon Run Button.

• To make a query for Salary column, let us suppose we have to find out which employees
have pay greater than 20,000. Now go to pay column and we will write our query in
Criteria row.
• Query: >= 20000

• To execute above query go to Design Tab & click on Run Button.

• If you want to add extra column specifying an expression to find anything e.g. Bonus.
We will go to Design Tab and click on the Builder. Then following screen appears.
• In this screen we can write the name of the column and note that the name of the column
should be exceeded by: e.g. Bonus: and afterthatif you want to add any name of column
than it should be in [] e.g. [pay] Expression for Bonus: Bonus: ([Pay]*50) And then
click on OK. Now you can see a column is added to table column.
• To execute above query, go to Design Tab & click on Run Button.
Experiment-8: To Create a MS Access Report of Access Database.
Reports offer a way to view, format, and summarize the information in your Microsoft Access
database. For example, you can create a simple report of phone numbers for all your contacts,
or a summary report on the total sales across different regions and time periods
• A report consists of information that is pulled from tables or queries, as well as
information that is stored with the report design, such as labels, headings, and graphics.
• The tables or queries that provide the underlying data are also known as the report's
record source.
• If the fields that you want to include all exist in a single table, use that table as the
record source.
• If the fields are contained in more than one table, you need to use one or more queries
as the record source.
You can:
• Create a Simple Report
• Create A grouped or summary report
• Design Reports
• Use Sub reports
• Use query as the record source for a form report
• Modify edit or change report
• Set record source for report
• Summing
• Counting
Steps:
You can use a query to supply data to a form or report in Access. You can use a query when
you create the form or report, or you can change an existing form or report by setting its Record
Source property. When you set the Record Source property, you can either specify an existing
query, or you can create a new query to use.
Create a simple report, by going to create tab and clicking on Report:

In Design view, set the Record Source property to an existing query that you want to use.

1. Open the form or report in Design view. If the property sheet is not already open,
press F4 to open it.
2. In the property sheet, on the Data tab, click the Record Source property box.

3. Do one of the following:


1. Start typing the name of the query that you want to use. Access automatically
fills in the name of the object as you type.

OR

2. Click the arrow and then select the query that you want to use.

You might also like