Dulha Rahul
Dulha Rahul
Dulha Rahul
For the partial fulfilment of the requirement for the award of the degree of
Batch (2022-2024)
MASTER OF BUSINESS ADMINISTRATION
Before you create a pivot table, organize your data into rows and columns,
and create an Excel Table. There are instructions here.
In this example the source data contains information about food sales, in
two regions -- East and West.
First, follow these steps, to see which pivot table layouts are suggested by
Excel.
6. Click on the layout that you want to use, then click OK.
In this example, we'll add the TotalPrice field to the pivot table.
In the PivotTable Field List, add a check mark to the TotalPrice field.
The TotalPrice field is automatically added to the pivot table, in the
Values area, as Sum of TotalPrice.
Excel added the TotalPrice field to the Values area because it is a number
field.
Change a Value Field Function
When you added the TotalPrice field, Excel automatically added it to the
Values area, and used the Sum function to summarize the prices.
However, when the pivot table was created, the Quantity field was added to
the Values area, because it's a number field too. But the Quantity field
shows a count, instead of a sum.
Although most of the values are numbers, there is at least one text
value in the Quantity column, as you can see in row 12, in the screen
shot below.
If any values in a field are non-numeric, Excel uses the Count
function for the Value field, instead of the Sum function.
Try This Pivot Table
Before you build your own pivot table in an Excel workbook, you can see
how a pivot table works, by trying the interactive Microsoft Excel example
shown below.
Below the interactive pivot table, there are a few things you can try, to see
different results in the pivot.
Note: You can download a copy of the file, to test the pivot table features
on your own computer.
Make the following changes to the pivot table filter fields, to change what
the pivot table is showing:
In cell B1, click the drop down arrow, to see a drop-down list of State
codes
o Uncheck one or more of the state code, to remove that data
from the pivot table display
o At the bottom of the drop down list, click the OK button
o The value in cell B1 changes from (All) to (Multiple Items)
o The pivot table shows the total amounts for the selected states
only, instead of all the states
In cell B3, click the drop down arrow, to see a drop-down list with Y
and N, for Flood
o Select Y (yes), then click the OK button
o The value in cell B3 changes from (All) to Y
o The pivot table shows the total amounts for only the insurance
policies that have flood insurance coverage
Sort the Pivot Table Values
Currently, the pivot table is sorted alphabetically by the values in the Rows
area -- the Construction type, and the Region.
To see the data in a different way, you can follow these steps to sort by the
policy count
In column A, select one of the cells with a region name, such as cell
A8 (East)
In cell A6, with the Row Labels header, click the drop down arrow
Point to Region, then click Sort by Value
In the Sort by Value (Region) dialog box, click the arrow at the right
side of the "Select Value" box
Click on Count of Policy
For Sort Options, click the radio button for Largest to Smallest
Click the OK button
After you click OK, in the pivot table, under each construction type, the
regions are listed from largest to smallest, based on the policy count field.
Understand the validating and auditing techniques in excel
We can see that A2 is written with blue in the formula cell, and with
the same color, the A2 cell is bordered.
We can see that precedent cells are highlighted with blue dots.
#2 – Remove Arrows
We can use the “Remove Arrows” command in the “Formula
Auditing” group under the “Formulas” tab to remove these
arrows.
#3 – Trace Dependents
This command traces the cell, dependent on the selected cell.
In the above image, we can see that we have applied a formula for
calculating interest with Amount 1 and specified interest percentage
and duration in the year.
We will copy the formula and paste it into the adjacent cells for
Amount 2, Amount 3, and Amount 4. One can notice that we have
used an absolute cell reference for G2 and I2 cells as we do not
want to change these references while copying and pasting.
In the above image, we can see the arrow lines where arrows
indicate which cells are dependent on the cells.
#4 – Show Formulas
We can use this command to display formulas written in the excel
sheet. The shortcut key for this command is ‘Ctrl+~.’
See the below image, where we can see the formulas in the cell.
We can see that we can see the formula instead of the formula
results. For amounts, the currency format is not visible.
#5 – Error Checking
This command is used to check the specified formula or function
error.
See the below image where we have an error in the function applied
for the result.
In the above dialog box, it can be seen that there is some invalid
name error. Therefore, the formula contains the unrecognized text.
Suppose we use the function or construct the formula for the first
time. In that case, we can click on the“Help on this Error” button,
which will open the help page for the function in the browser,
where we can see all the related information online, understand the
cause, and find all the possible solutions.
1. The formula refers to a name that has not been defined. For
example, the function name or named range has not been
described earlier.
2. The formula has a typo in the defined name. It means that
there is some typing error.
If we have used the function earlier and know about the function,
then we can click on the “Show Calculation Steps” button to check
how the evaluation of the function results in an error.
Does the above image show that the “IIF” expression is evaluated as
an error; #NAME? The following expression or reference, i.e., B2, was
underlined. If we click the “Step In” button, we can check the
internal details and come out by pressing the “Step Out” button.
Now, we will click on the “Evaluate” button to check the result of
the underlined expression. After clicking, we get the following
result.
After clicking on “OK,“ we get the result in the cell. Next, we will
copy down the function for all the students.
Things to Remember
1. The dates are also shown in the number format if we activate
the ‘Show Formulas’ command.
2. While evaluating the formula, we can also use “F9” as
a shortcut in Excel.
Different charting techniques in excel
Milestone Chart
A milestone chart allows you to plot milestones on a
timeline. This chart type can be useful when you’re planning
a new project and want to visually show the planned
milestones during a certain period (or chart the milestones
that have been achieved in the past).
Gantt Chart
Gantt chart is quite popular with project managers.
Bell Curve
A bell curve (also known as normal distribution curve) is a
way to plot and analyze data that looks like a bell curve.
If you think about the numbers, you would realize that this
forms a sales funnel.
Many opportunities are ‘identified’, but only a part of it is in
the ‘Validated’ category, and even lesser ends up as a
potential lead.
In the end, there are only a handful of deals that are won.
But for versions prior to Excel 2016, you’ll have to use some
charting trickery.
Pareto Chart
Pareto Chart is based on the Pareto principle (also known as
the 80/20 rule), which is a well-known concept in project
management.
If you’re using Excel 2016, you can insert the Pareto chart
from the Insert tab, but if you’re using Excel 2013 or prior
versions, then you need to take a few additional steps.
Below is a video where I show how to create a Pareto chart
in Excel 2013 and prior versions:
Bullet Chart
Bullet chart is well suited for dashboards as it can punch a
lot of information and takes very little space.
Step Chart
A step chart can be useful when you want to show the
changes that occur at irregular intervals. For example, price
rise in milk products, petrol, tax rate, interest rates, etc.
Both of these charts look similar, but the line chart is a bit
misleading. It gives you the impression that the petrol prices
have gone up consistently during May 2015 and June 2015
(see image below). But if you look at the step chart, you’ll
notice that the price increase took place only on two
occasions.
Waffle Chart
A waffle chart is a pie chart alternative that is quite
commonly used in dashboards. It’s also called the squared
pie chart.
You can try and use more than one data point per
waffle chart as shown below, but as soon as you
go beyond a couple of data points, it gets
confusing.
Thermometer Chart
A thermometer chart is another example where you can
show the performance against a target value (similar to
Actual vs Target chart or bullet chart).
We will use a similar format for the 'Total' row, which is the last row of the table,
with the help of the 'Format Painter' command, present in the 'Clipboard' group on
the 'Home' tab.
Because the amount gathered is in a currency so, we have to format the same as
currency, using the command available in the 'Number' group which is placed on
the 'Home' tab.
After selecting the cells, that need to be formatted as currency, click the arrow above
to open the 'Format cells' dialogue box.
Now our next task is to generate a label for the report. With the help of
the Shapes, we will make the report's label. If we want to create the shape above
from the table, we'll need to add two new rows. To do so, we have to select the row
by 'Shift+Spacebar' and then press 'Ctrl+'+" twice to insert two rows.
Now we can insert the shape, to insert shape, go to the 'Shapes' command in
the 'Illustration' group of the 'Insert' tab and select an appropriate shape.
Create the shape that meets the requirement and add text to it by right-clicking on
the shape and selecting 'Edit Text.'
We may also utilize the 'Format' contextual tab to format the shape with commands
like 'Text Outline', 'Text Fill', 'Shape Fill', Shape Outline.' etc. We can also use the
excel formatting on text using the commands available in the 'Front' group, which is
placed on the 'Home' tab.
Conditional Formatting can also be used to draw the visitor's attention to the 'Top
3' and 'Bottom 3' salespeople. To perform this, we have to select the
option Top/Bottom rules in the conditional formatting and then we have to select
the option named Top 10 Items.
After that, the dialog box will open, and in this dialog box, we have to fill the number
for top ranks and the color we want.
Similarly, we can do this for Bottom 3.
We can also use other options of conditional formatting, such as Data Bars.
We can also generate the chart to display the data, which is also part of "Excel Data
Formatting.'
o Ctrl+2 or Ctrl+B, we can use this shortcut to make the text bold.
o Ctrl+3 or Ctrl+l if we want to make the text italic, then we can use this
shortcut.
o Ctrl+4 or Ctrl+U if we want to underline the text, then this shortcut is helpful.
o Alt+H, FA shortcut is used to open the 'Alignment' Dialog box.
o Alt+H, FN shortcut is used to open the 'Front' Dialog box.
o Alt+H, FK is used to make the font size of the text smaller.
o Alt+H, FG is used to make the font size of the text larger.
o Alt+H, B is used to add border.
o Alt+H, A then C is used to center align cell content.
o Ctrl+1 is used to open the 'Format Cell' Dialog box.
o Ctrl+Shift+Ampersand (&) is used to apply an outline border to the
selected cells.
o Ctrl+Shift+Percent (%) is used to apply the percentage format with no
decimal places.
o Shift+F8 is used to add a non-adjacent cell or range to a selection of cells.
o Ctrl+5 is used to apply or remove strikethrough Data Formatting Excel.
Cíeation of table , view and íepots in excel
Fiíst,
select the whole woíksheet that contains youí
souíce data table. ľhen, go to Insert > PivotTable. A
dialog box will pop up.
In the Table/Range box, put the location of the souíce
dataset ( In this example, B4:E10 undeí Sheet1). ľhen
select the taíget location wheíe you wish to keep youí
pivot table. Afteí that, click on OK. Now, heíe aíe 2
cases,
Choosing New Worksheet will set a table in a new sheet.
Choosing an Existing Worksheet will set the table at a
paíticulaí location in the existing sheet. In the Location box,
put the location of the fiíst cell wheíe you wish to place youí
table.
A blank pivot table in the taíget location will be cíeated.
Similar Readings
Make Daily Sales Report in Excel (with Quick Steps)
How to Make Monthly Report in Excel (with Quick Steps)
Create a Report That Displays Quarterly Sales in Excel (with
Easy Steps)
How to Make MIS Report in Excel for Sales (with Easy Steps)
Make Inventory Aging Report in Excel (Step by Step
Guidelines)
Drag and Drop fields among the fouí aíeas undeí the
Layout section. You can also alteí the oídeí of the fields
by díagging and díopping.
Undeíthe Field section, íight-click on the field name, and
then click on the aíea wheíe you need to add it.
Note: For more information about installing the AdventureWorks database, refer to the
following article – Install and configure the AdventureWorks2016 sample database
Let’s start with the SELECT sentence, the select sentence will allow us to get data from a table.
The following query will show all the columns from a table:
1SELECT *
2FROM [HumanResources].[Employee]
Try to use the SELECT statement in one line and the FROM statement in a different line. It is
easier to read that way. Select * means to show all the columns from a table. Another way to do
the same is the following example:
1SELECT [Employee].*
2FROM [HumanResources].[Employee]
The square brackets are optional. They could help if the column names have spaces (which is not
recommended). You can also select specific column names like this:
1SELECT [LoginID],[Gender]
2FROM [HumanResources].[Employee]
The previous example shows the loginid and gender column. As you can see, the data is
separated by commas. You can also use aliases to have a shorter name like this:
1SELECT e.Gender
2FROM [HumanResources].[Employee] e
The previous example uses the alias e for the table Employee. We can also use an alias for the
column names like this:
1SELECT e.Gender g
2FROM [HumanResources].[Employee] e
The column alias for Gender is now g. The next example will show the 2 different possible values
in the gender column (Male or Female):
2FROM [HumanResources].[Employee] e
Note that DISTINCT is a slow command and if the table has several millions of rows, it could take
time to execute and could bog down performance.
Another example is the TOP clause. This clause is used in SQL Server and not used in other
databases like Oracle or MySQL. The following example will show the first 10 rows of the table:
2FROM [HumanResources].[Employee] e
If we want to order data by a column, the order by is very useful. The following example will show
how to show the BusinessEntityID sorted in descending order.
1SELECT [BusinessEntityID]
2FROM [HumanResources].[Employee] e
The where command is one of the most common clauses used inside the SELECT command. This
clause allows filtering data. The following example shows how to check the BusinessEntityID of
the employees whose job title is Design Engineer.
2from [HumanResources].[Employee] e
In the example, we used the equal operator. For a complete list of T-SQL operators, refer to
this link: Logical Operators (Transact-SQL)
Another powerful operator is the LIKE. Like, can help us in a search. The following example shows
the BusinessEntityID and the Job Title of the employees whose titles start with Design:
2FROM [HumanResources].[Employee] e
For more information about the LIKE operator, refer to this link:SQL Like logical operator
introduction and overview
The IN operator is a very common operator also, the following example will show all the
employees whose JobTitle are equal to Engineering Manager or Senior Tool Designer:
1SELECT [BusinessEntityID],JobTitle
2FROM [HumanResources].[Employee] e
In the SQL queries, we need the SUM of the rows, the Average, and other aggregations functions.
These functions are often used with the group by and the having statements.
The first example will show the SUM and the average of the subtotal of the SalesOrderHeader
tables:
2FROM [Sales].[SalesOrderHeader]
The next example is showing how to get the sum of the orderQty column and the salesorderid
from the salesorderdetail table. We are grouping the information by salesorderid and ordering
the sum in descendant order:
2FROM [Sales].[SalesOrderDetail]
3GROUP BY [SalesOrderID]
We created a special article for these types of joins. For more information, refer to the
following link: SQL multiple joins for beginners with examples
Creation of table , view and reports in SQL
Creating Views
Database views are created using the CREATE VIEW statement. Views can be
created from a single table, multiple tables or another view.
To create a view, a user must have the appropriate system privilege according to
the specific implementation.
The basic CREATE VIEW syntax is as follows −
CREATE VIEW view_name AS
SELECT column1, column2.....
FROM table_name
WHERE [condition];
You can include multiple tables in your SELECT statement in a similar way as you
use them in a normal SQL SELECT query.
Example
Consider the CUSTOMERS table having the following records −
+----+----------+-----+-----------+----------+
| ID | NAME | AGE | ADDRESS | SALARY |
+----+----------+-----+-----------+----------+
| 1 | Ramesh | 32 | Ahmedabad | 2000.00 |
| 2 | Khilan | 25 | Delhi | 1500.00 |
| 3 | kaushik | 23 | Kota | 2000.00 |
| 4 | Chaitali | 25 | Mumbai | 6500.00 |
| 5 | Hardik | 27 | Bhopal | 8500.00 |
| 6 | Komal | 22 | MP | 4500.00 |
| 7 | Muffy | 24 | Indore | 10000.00 |
+----+----------+-----+-----------+----------+
Following is an example to create a view from the CUSTOMERS table. This view
would be used to have customer name and age from the CUSTOMERS table.
FROM CUSTOMERS;
Now, you can query CUSTOMERS_VIEW in a similar way as you query an actual
table. Following is an example for the same.
FROM CUSTOMERS
Updating a View
A view can be updated under certain conditions which are given below −
The SELECT clause may not contain the keyword DISTINCT.
The SELECT clause may not contain summary functions.
The SELECT clause may not contain set functions.
The SELECT clause may not contain set operators.
The SELECT clause may not contain an ORDER BY clause.
The FROM clause may not contain multiple tables.
The WHERE clause may not contain subqueries.
The query may not contain GROUP BY or HAVING.
Calculated columns may not be updated.
All NOT NULL columns from the base table must be included in the
view in order for the INSERT query to function.
So, if a view satisfies all the above-mentioned rules then you can update that view.
The following code block has an example to update the age of Ramesh.
SET AGE = 35