0% found this document useful (0 votes)
40 views44 pages

Pivot Table

Class note

Uploaded by

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

Pivot Table

Class note

Uploaded by

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

Pivot Table

A pivot table is a data processing tool commonly used in spreadsheet applications like Microsoft
Excel and Google Sheets. It allows users to summarize, analyze, and reorganize large datasets
efficiently.

With a pivot table, you can:

 Group and summarize data: Aggregate data based on categories (e.g., totals, averages).
 Filter and sort: Focus on specific subsets of data.
 Create dynamic reports: Rearrange rows and columns to see different perspectives of
the data.
 Visualize trends: Easily spot patterns and insights.

Pivot tables are especially useful for tasks like sales reporting, budgeting, and any scenario
where you need to analyze large amounts of data quickly.

Or

A Pivot table is a summary of your data package. The word ‘Pivot‘in the Pivot
table means to rotate the data in Excel to view it from a different
perspective. Creating a Pivot table doesn’t mean adding, subtracting,
or changing the data, it simply means reorganizing it so you can easily work with
useful information.

For example, a store owner might list monthly sales totals for a large number of
merchandise items in an Excel spreadsheet. If they wanted to know which items
sold better in a particular financial quarter, they could use a pivot table.

Purpose of pivot table: A Pivot Table is used to summarize, sort, reorganize,


group, count, total or average data stored in a table. It allows us to transform
columns into rows and rows into columns. It allows grouping by any field
(column), and using advanced calculations on them.

When to use pivot tables?


Sometimes data can be difficult to find among the many rows and columns. Pivot
tables allow you to summarize the data in an easily digestible snapshot. Users can
arrange rows and columns of the data according to their needs and label and sort it
to suit their needs.
What is the use of pivot function?
PIVOT rotates a table-valued expression by turning the unique values from one
column in the expression into multiple columns in the output. PIVOT also runs
aggregations where they're required on any remaining column values that are
wanted in the final.

Shortcut key for pivot table?


Create pivot table on a new worksheet: F11 or Fn+F11. Create pivot table on an existing
worksheet: Alt+F1.
Why Use a Pivot Table in Excel
Pivot tables enable efficient data analysis, allowing users to visualize numerical
data, summarize details, and identify trends quickly. With Excel and pivot tables,
you can:
 Compare product sales totals
 Combine and remove duplicates
 Filter out irrelevant data
 Calculate totals or percentages

What are pivot tables used for?

The purpose of pivot tables is to offer user-friendly ways to quickly summarize


large amounts of data. They can be used to better understand, display, and analyze
numerical data in detail.

1. Comparing Sales Totals of Different Products

Let’s say we have a worksheet that contains monthly sales data for three different
products — product 1, product 2, and product 3. You want to figure out which of
the three has been generating the most revenue.

One way would be to look through the worksheet and manually add the
corresponding sales figure to a running total every time product 1 appears.

The same process can then be done for product 2 and product 3 until you have
totals for all of them. Piece of cake, right?

Imagine, now, that your monthly sales worksheet has thousands upon thousands of
rows. Manually sorting through each necessary piece of data could literally take a
lifetime.
With pivot tables, you can automatically aggregate all of the sales figures for
product 1, product 2, and product 3 and calculate their respective sums in less than
a minute.

2. Showing Product Sales as Percentages of Total Sales:

Pivot tables inherently show the totals of each row or column when created. That’s
not the only figure you can automatically produce, however.

Let’s say you entered quarterly sales numbers for three separate products into an
Excel sheet and turned this data into a pivot table.

The pivot table automatically gives you three totals at the bottom of each column
having added up each product’s quarterly sales.

But what if you wanted to find the percentage these product sales contributed to all
company sales, rather than just those products’ sales totals?

With a pivot table, instead of just the column total, you can configure each column
to give you the column’s percentage of all three column totals.

Let’s say three products totaled $200,000 in sales, and the first product made
$45,000. You can edit a pivot table to say this product contributed 22.5% of all
company sales.
To show product sales as percentages of total sales in a pivot table, simply right-
click the cell carrying a sales total and select Show Values As > % of Grand
Total.

3. Combining Duplicate Data

In this scenario, you’ve just completed a blog redesign and had to update many
URLs. Unfortunately, your blog reporting software didn’t handle the change well
and split the “view” metrics for single posts between two different URLs.

In your spreadsheet, you now have two separate instances of each individual blog
post. To get accurate data, you need to combine the view totals for each of these
duplicates.
"Instead of having to manually search for and combine all the metrics from the
duplicates, you can summarize your data (via pivot table) by blog post title.

4. Getting an Employee Headcount for Separate Departments:

Pivot tables are helpful for automatically calculating things that you can’t easily
find in a basic Excel table. One of those things is counting rows that all have
something in common.

For instance, let’s say you have a list of employees in an Excel sheet. Next to the
employees’ names are the respective departments they belong to.

You can create a pivot table from this data that shows you each department’s name
and the number of employees that belong to those departments.

The pivot table’s automated functions effectively eliminate your task of sorting the
Excel sheet by department name and counting each row manually.

5. Adding Default Values to Empty Cells: Not every dataset you enter into Excel
will populate every cell. If you’re waiting for new data to come in, you might have
lots of empty cells that look confusing or need further explanation. That’s where
pivot tables come in.
"You can easily customize a pivot table to fill empty cells with a default value,
such as $0 or TBD (for “to be determined”).For large data tables, being able to tag
these cells quickly is a valuable feature when many people are reviewing the same
sheet. To automatically format the empty cells of your pivot table, right-click your
table and click PivotTable Options. In the window that appears, check the box
labeled “For Empty Cells Show” and enter what you’d like displayed when a cell
has no other value.
How to Create a Pivot Table in Excel
Creating a pivot table in Excel is easy and provides immense value. Here’s a
simple guide:
Step 1: Open MS Excel and Select the Data
Open your worksheet, then select the data range you wish to analyze. Ensure the
data is organized with columns and headers.
Step 2: Go to the Insert tab
Go to the “Insert” tab and click on “PivotTable.” Excel will prompt you to choose
where the pivot table will appear.
Step 3: In the Tables group, click on the Pivot table tool
Step 5: Set Up Your Pivot Table
Excel will create an empty pivot sheet in Excel. Use the right-side panel to drag
fields (column headers) into rows, columns, and values.
How to Use Pivot Table Field Settings and Value Field
Setting:

Pivot table is one of the most powerful tools of Excel. It allows you to quickly
summarize a large chunk of organized data. But sometimes the values and fields
pivot table created by default is not really required. By default, Excel Pivot table
shows sum of numbers if you drag a number column to the value field. You may
not want the sum but average, or min, or max, etc… In that case you would need to
access pivot value field settings.

To view the Field Settings, we can do the following:

Step 1:

Under PivotTable Fields > Rows > Field Settings

You can also right click on a Row Label and select Field Settings.
Or while having a row label selected, you can go to PivotTable Tools > Analyze >
Active Field > Field Settings
And now you have your Field Settings open.

Step 2: Now let us see how to access the Value Field Settings.

Go to PivotTable Fields > Values> Value Field Settings.


You can also right click on a Value and select Value Field Settings.
Or while having a value selected, you can go to PivotTable Tools > Analyze >
Active Field > Field Settings.

You now have your Value Field Settings.


How to Group Dates in Pivot Tables in Excel:
Suppose you have a dataset as shown below:

It has sales data by Date, Stores, and Regions (East, West, North, and South).

Here is a simple pivot table summary created using this data:


This pivot table summarizes sales data by date, but it isn’t quite helpful as it shows
all the 300+ dates. In such as case, it would be better to have the dates grouped by
years, quarters, and/or months.

Grouping by Years in a Pivot Table

The dataset shown above have dates for two years (2014 and 2015).

Here are the steps to group these dates by years:

Select any cell in the Date column in the Pivot Table.

Go to Pivot Table Tools –> Analyze –> Group –> Group Selection.

In the Grouping dialogue box, select Years.

 While grouping dates, you can select more than one options. By default,
Months option is already selected. You can select additional option along with
Month. To deselect Month, simply click on it.

 It picks the ‘Starting at’ date and ‘Ending at’ date based on the source data. If
you want, you can change these.
 Click OK

 This would summarize the pivot table by years.

This summarization by years may be useful when you have more number of
years. In this case, it would be better to have the quarterly or monthly data.

Grouping by Quarters in a Pivot Table

In the above dataset, it makes more sense to drill down to quarters or months to
have a better understanding of the sales.

Here is how you can group these by quarters:

Select any cell in the Date column in the Pivot Table.

Go to Pivot Table Tools –> Analyze –> Group –> Group Selection.

In the Grouping dialogue box, select Quarters and deselect any other selected
option(s).
 Click OK.

This would summarize the pivot table by quarters.

The issue with this pivot table is that it combines the Quarterly sales value for 2014
as well as 2015. Hence, for each quarter, the sales value is the sum of sales values
in Quarter 1 in 2014 and 2015.

In a real life scenario, you are most likely to analyze these quarters for each year
separately. To do this:

 Select any cell in the Date column in the Pivot Table.


 Go to Pivot Table Tools –> Analyze –> Group –> Group Selection.

 In the Grouping dialogue box, select Quarters as well as Years. You can
select more than one option by simply clicking on it.

 Click OK.

 This would summarize the data by Years and then within years by Quarters.
Something as shown below:
This would summarize the data by Years and then within years by Quarters.
Something as shown below:

When you group dates by more than one time-frame group, something interesting
happens. If you look at the field list, you will notice a new field has automatically
been added. In this case, it is Years.

Note that this new field that has appeared is not a part of the data source. This field
has been created in the Pivot Cache to quickly group and summarizes data. When
you ungroup the data, this field will vanish.

The benefit of having this new field is that now you can analyze the data with
quarters in rows and years in columns, as shown below:

All you need to do is drop the Year field from Row area to Columns area.
Grouping by Months in a Pivot Table:

Similar to the way we grouped the data by quarters, we can also do this by months.

Again, it is advisable to use both Year and Month to group the data instead of only
using months (unless you only have data for one or less than a year).

Here are the steps to do this:

 Select any cell in the Date column in the Pivot Table.

 Go to Pivot Table Tools –> Analyze –> Group –> Group Selection.

 In the Grouping dialogue box, select Months as well as Years. You can
select more than one option by simply clicking on it.
 Click OK.

This would group the date field and summarize the data as shown below:
Again, this would lead to a new field of Years getting added to the PivotTable
fields. You can simply drag the years’ field to the columns area to get the years in
columns and months is rows. You will get something as shown below:

Grouping by Weeks in a Pivot Table:

While analyzing data such as store sales or website traffic, it makes sense
to analyze it on a weekly basis.

When working with dates in Pivot Tables, grouping dates by week is a bit different
than grouping by months, quarters, or years.

Here is how you can group dates by weeks:

 Select any cell in the Date column in the Pivot Table.

 Go to Pivot Table Tools –> Analyze –> Group –> Group Selection.
 In the Grouping dialogue box, select Days and deselect any other selected
option(s). As soon as you do this, you would notice that the Number of Days
option (at the bottom right) becomes available.

 There is no inbuilt option to group by weeks. You need to group by


days and specify the number of days to be used while grouping.

 Note that for this to work, you need to select Days option only.

 In Number of days, enter 7 (or use the spin button to make the change).

 If you click OK at this point, your data would be grouped by weeks starting
with January 4, 2014 – which is a Saturday. So the grouping would be from
Saturday to Friday every week. To change this grouping and to begin the
week from Monday, you need to change the start date (by default it picks the
start date from the source data).

 In such a case, you can either start the date on December 30, 2013, or
January 6, 2014 (both Mondays).

 Click OK.
This will group the dates by weeks as shown below:

Similarly, you can group dates by specifying any other number of days. For
example, instead of weekly, you can group dates in a biweekly interval.

Note:
 When you group dates by using this method, you can not group it using any
other option (such as months, quarters or years).
 Calculated field/item would not work when you group using Days

Grouping by Seconds/Hours/Minutes in a Pivot Table:


If you working with high volumes of data (such as call center data), you may want
to group it by seconds or minutes or hours.

If you working with high volumes of data (such as call center data), you may want
to group it by seconds or minutes or hours.

Suppose you have the call center data as shown below:


Calculated field and calculated items:

Calculated Fields and Calculated Items in Excel Pivot Tables allow you to add
custom calculations to your Pivot Table without modifying the original data
source. Here's a breakdown of what each is, how to use them, and some example
scenarios.

1. Calculated Field in a Pivot Table

A Calculated Field is a new field added to the Pivot Table that uses a formula to
calculate values based on other fields in the data source.

When to Use Calculated Fields

Use a Calculated Field when you want to create a new metric that’s derived from
existing fields. For example:

Calculating Profit as Sales - Cost

Calculating Discounted Price as Price * Discount Rate

How to Add a Calculated Field

Click anywhere in your Pivot Table to activate the PivotTable Analyze (or
Options) tab.
Go to PivotTable Analyze > Fields, Items & Sets > Calculated Field.

In the Insert Calculated Field dialog box:

Enter a name for the calculated field (e.g., "Profit").

In the Formula box, enter your formula. You can select fields to add by double-
clicking them in the Fields box.

For example, to calculate Profit as = Sales - Cost, type that formula in the Formula
box.

Click Add and then OK.

Result: The calculated field now appears in the Values area of your Pivot Table,
showing results based on the formula.

Example of a Calculated Field

Let’s say your dataset has Sales and Cost fields, and you want to calculate Profit:

Create a calculated field with the formula = Sales - Cost.

Your Pivot Table now shows Profit alongside other values, with values calculated
for each row.

2. Calculated Item in a Pivot Table

A Calculated Item allows you to perform calculations on individual items within


a field (e.g., specific rows or columns within the Pivot Table).

When to Use Calculated Items

Use a Calculated Item if you need to:

Add a custom calculation to specific items within a field.

Compare data within the same field, such as calculating a Total or Difference for
specific items.

How to Add a Calculated Item


Click any cell in the field where you want to add a calculated item (e.g., a specific
row or column label).

Go to PivotTable Analyze > Fields, Items & Sets > Calculated Item.

In the Insert Calculated Item dialog box:

Enter a name for the calculated item (e.g., "Total Q1 and Q2").

In the Formula box, create your formula by referencing other items within the
same field. You can add items by double-clicking them in the Items box.

For example, to sum Q1 and Q2 sales, the formula would be = Q1 + Q2.

Click Add and then OK.

Result: The new Calculated Item appears as a row or column in the Pivot Table,
showing the result based on your formula.

Example of a Calculated Item

Suppose you have Quarter as a field and you want to create a column for the total
of Q1 and Q2:

Add a Calculated Item with the formula = Q1 + Q2.

The Pivot Table now displays a "Total Q1 and Q2" item in the Quarter field,
showing the combined values for each row.

Differences Between Calculated Fields and Calculated Items

Feature Calculated Field Calculated Item

Works on Entire fields in the data source Individual items within a field

Formula
Other fields in the Pivot Table Items within the same field
references

When creating a new metric When calculating values within a


When to use
based on existing fields single field (e.g., item totals)
Feature Calculated Field Calculated Item

Calculating Profit using Sales Summing Q1 + Q2 within the


Example
- Cost Quarter field

Tips

Calculated Fields apply across the entire Pivot Table, affecting all rows or
columns in the table.

Calculated Items only impact the specific field items and can make your Pivot
Table more complex if used extensively.

Be cautious with Calculated Items in large datasets, as they may slow down
performance due to the additional calculations.

Array function in pivot table:

Excel Pivot Tables themselves don’t directly support array functions within their
fields. However, array functions can still be used outside the Pivot Table to
perform advanced calculations or dynamic aggregations based on Pivot Table data.
Starting with Excel 365 and Excel 2019, dynamic array functions (like FILTER,
UNIQUE, SORT, etc.) offer more powerful ways to work alongside Pivot Tables.
Here’s how to integrate array functions effectively with Pivot Table data.

Example Scenarios of Using Array Functions with Pivot Table Data

Filtering Data Based on Pivot Table Results

Extracting Unique Values from Pivot Table

Calculating Totals Based on Criteria Outside the Pivot Table

1. Filtering Data Based on Pivot Table Results

Suppose you have a Pivot Table that summarizes sales data by product and region,
and you want to extract rows from the original data that meet certain criteria based
on the Pivot Table.

Steps:
Use the FILTER function to extract rows that match criteria from the Pivot Table.

Example formula:

 =FILTER(SalesData, SalesData[Region]="North", "No Data")


This will return all rows from your SalesData range where the Region is "North."

Result: You can use this extracted data for further analysis or for creating charts
based on the filtered Pivot Table data.

2. Extracting Unique Values from Pivot Table

If your Pivot Table lists products, you might want to extract a list of unique
products without duplications.

Steps:

Select a cell outside the Pivot Table where you want the unique list to appear.

Use the UNIQUE function to generate unique values based on a column in the
Pivot Table:
1. =UNIQUE(PivotTableRange[Product])
2.

Result: This will create a dynamic list of unique products, which updates automatically when the
Pivot Table changes.

3. Calculating Totals Based on Criteria Outside the Pivot Table

You can use SUMIF or SUMPRODUCT with arrays to perform advanced


calculations on Pivot Table data. For example, calculating a conditional total based
on values in the Pivot Table.

Example:

If your Pivot Table has sales by region and product, you can calculate the total
sales for a specific product across all regions using SUMIF.

=SUMIF(PivotTableRange[Product], "Product A", PivotTableRange[Sales])


Or, for multiple criteria, use SUMPRODUCT:

=SUMPRODUCT((PivotTableRange[Product]="ProductA") *
(PivotTableRange[Region]="North") * PivotTableRange[Sales])

Benefits of Using Array Functions with Pivot Tables

Dynamic Updates: When the Pivot Table data changes, array function results also
update automatically.

Flexible Filtering and Calculation: Array functions allow you to perform


complex calculations that Pivot Tables alone may not support.

Enhanced Reporting: You can create customized summaries or extractions based


on Pivot Table data without altering the Pivot Table itself.

Using array formulas:

Excel Pivot Tables themselves don't support array formulas within their fields
directly. However, you can leverage array formulas alongside Pivot Tables to
create powerful, dynamic calculations that enhance your data analysis. This
approach is particularly useful in Excel 365 and Excel 2019 with dynamic array
functions like FILTER, UNIQUE, SORT, SEQUENCE, and others.Here’s how
you can use array formulas in conjunction with Pivot Tables:

1. Use Array Formulas Outside the Pivot Table for Advanced Analysis:

Although you can’t enter array formulas directly within the Pivot Table’s Values
area, you can use them outside the Pivot Table to reference its data and perform
advanced calculations. Here are a few scenarios where this is beneficial.

Scenario 1: Filtering Data Based on Pivot Table Results with FILTER

Suppose you have a Pivot Table showing sales by product and region, and you
want to extract rows from the original data that meet certain criteria based on the
Pivot Table summary. For instance, you might want all rows where the sales
exceed a specific amount.
Steps:

Select a cell outside the Pivot Table where you want the filtered data to appear.

Use the FILTER function to extract rows that match your criteria. For example:
=FILTER(SalesData, SalesData[Sales] > 1000, "No Data")

This formula will display only rows from the SalesData range where the sales exceed 1,000.

Result: A dynamic list of rows that updates automatically based on changes in the Pivot Table
and the specified criteria.

Scenario 2: Extracting Unique Values from Pivot Table with UNIQUE

If your Pivot Table lists product names, you may want a list of unique products.
The UNIQUE function allows you to extract distinct values directly from the Pivot
Table data.

Steps:

Identify the range of the field (column) you want unique values for in the Pivot
Table (e.g., "Product").

Use the UNIQUE function outside the Pivot Table to generate a unique list based
on that field:

=UNIQUE(PivotTableRange[Product])

Result: A dynamic list of unique product names that updates when new products
are added to the Pivot Table data.

Scenario 3: Summing with Multiple Criteria Using SUMIFS or SUMPRODUCT

Suppose your Pivot Table has sales data by product and region, and you want to
calculate the total sales for a specific product and region combination, such as
Product A in the North region.

Steps:

Use SUMIFS or SUMPRODUCT to apply criteria to the Pivot Table range:


=SUMIFS(PivotTableRange[Sales], PivotTableRange[Product], "Product A",
PivotTableRange[Region], "North")

Or with SUMPRODUCT for more complex conditions:

=SUMPRODUCT((PivotTableRange[Product] = "Product A") *


(PivotTableRange[Region] = "North") * PivotTableRange[Sales])

Result: You’ll get a total that meets your criteria, updating automatically when the
Pivot Table or source data changes.

2. Using Dynamic Arrays to Create Supplementary Reports or Charts

Dynamic arrays allow you to create dynamic reports or charts based on Pivot
Table data without manually refreshing ranges or restructuring data. You can build
out reports that adjust as Pivot Table results change, making reporting and
visualization more seamless.

For instance, you could create a dynamic chart showing the top 5 products by sales
using a SORT and INDEX combination:

=INDEX(SORT(PivotTableRange[Product], PivotTableRange[Sales], -1),


SEQUENCE(5))

This formula will return the top 5 products, sorted by sales in descending order,
ready for charting.

Benefits of Using Array Formulas with Pivot Tables

Dynamic Analysis: Array formulas are responsive to changes in Pivot Table data,
which is helpful when working with frequently updated data.

Flexible Calculations: Array functions enable complex calculations that aren’t


natively possible within Pivot Table fields.

Enhanced Reporting and Filtering: Array formulas let you build customized
reports, create filtered views, and sort data dynamically based on Pivot Table
results.

Limitations: While array formulas provide flexibility, remember that:


Array functions can increase workbook size and slow down performance if applied
to very large datasets.

Complex array formulas can be challenging to troubleshoot when working with


intricate criteria or nested functions.

Chart: Bar chart, pie chart:

Creating charts (like Bar Charts and Pie Charts) from a Pivot Table in Excel
provides a dynamic way to visualize and analyze your data. These charts
automatically update whenever the Pivot Table data changes, making them highly
useful for reports and dashboards.

Here’s how to create Bar Charts and Pie Charts from a Pivot Table:

1. Creating a Bar Chart from a Pivot Table

A Bar Chart is useful for comparing categories side-by-side, such as sales by


product or region.

Steps to Create a Bar Chart from a Pivot Table

Set Up the Pivot Table:

Suppose you have a dataset with Product, Region, and Sales columns.

Drag Product into the Rows area and Sales into the Values area of the Pivot
Table.

Insert a Bar Chart:

Select any cell in your Pivot Table.

Go to the PivotTable Analyze (or Options) tab, and click PivotChart.

In the Insert Chart dialog box, choose Bar Chart (either Clustered Bar or
Stacked Bar, depending on your preference) and click OK.

Format the Bar Chart (Optional):

Use the Chart Design and Format tabs to customize colors, labels, and layout.
Right-click elements like axes or data labels to further refine the appearance.

Result: You’ll get a dynamic Bar Chart that updates automatically as you change
or filter your Pivot Table.

Example Scenario

If your Pivot Table summarizes total sales by product, a bar chart will display each
product as a separate bar, with the length of the bar indicating the sales amount.
This provides an immediate visual comparison of sales across products.

2. Creating a Pie Chart from a Pivot Table

A Pie Chart is useful for displaying data as a percentage of a whole, making it


ideal for cases where you want to show parts of a total (e.g., each product’s
contribution to total sales).

Steps to Create a Pie Chart from a Pivot Table

Set Up the Pivot Table:

Set up your Pivot Table so it summarizes data in a way suitable for a pie chart,
such as Sales by Product or Sales by Region (only single-value field).

Drag Product (or your chosen category) into the Rows area and Sales into the
Values area.

Insert a Pie Chart:

Select any cell in your Pivot Table.

Go to PivotTable Analyze > PivotChart.

In the Insert Chart dialog box, select Pie Chart and click OK.

Format the Pie Chart (Optional):

Use the Chart Design tab to customize the chart’s look.

Right-click on the Pie Chart to add Data Labels, showing percentages or values
for each slice.
Result: The Pie Chart will show each category (e.g., Product) as a slice,
representing its proportion relative to the total sales.

Example Scenario

If your Pivot Table shows sales by region, the Pie Chart will display each region as
a slice, showing its percentage share of total sales. This is especially useful for
presenting distribution or share of total values.

Tips for Using Charts with Pivot Tables

Dynamic Filtering: Filters applied to the Pivot Table also apply to the Pivot Chart.
You can filter directly in the Pivot Table or use the Chart Filters button to adjust
the data shown.

Data Refresh: Both the Pivot Table and Pivot Chart update automatically when
you refresh the data source or make changes in the underlying dataset.

Customize the Legend and Labels: Use the Chart Elements options to add or
modify legends, axis labels, and data labels for better clarity.

Limitations of Pie Charts

One Data Series Only: Pie charts work best with one data series, so avoid using
them when comparing multiple categories or fields.

Limited Categories: Pie charts become harder to read with more than five or six
slices; bar charts or other visualizations are preferable for complex data.

Adding tables & and charts to the dashboard:

Creating a dashboard with Pivot Tables and Pivot Charts in Excel allows you to
present data in a clear, interactive, and visually appealing format. By combining
Pivot Tables, Pivot Charts, and additional slicers, you can create a dynamic
dashboard that updates automatically as your data changes. Here’s how to set up a
dashboard in Excel with tables and charts from Pivot Tables.

Step 1: Set Up the Data Source

Organize Your Data: Ensure your data is in a clean, tabular format with column
headers, as Pivot Tables rely on a structured dataset.
Create a Data Table: Select your data and go to Insert > Table. This makes it
easier to add new data while keeping your Pivot Tables and charts updated.

Step 2: Insert Pivot Tables

Insert Multiple Pivot Tables:

For each analysis you want on the dashboard (e.g., Sales by Region, Sales by
Product), create a separate Pivot Table.

Go to Insert > Pivot Table, select your data source, and place the Pivot Table on a
new or existing worksheet.

Arrange the Pivot Tables:

Place each Pivot Table in a logical layout on your dashboard sheet.

Adjust the Pivot Table format by showing only relevant fields for clarity. For
example, you might want to display Total Sales by Month in one table and Sales
by Product in another.

Step 3: Insert Pivot Charts

Create Pivot Charts from Each Pivot Table:

Click on any cell within a Pivot Table, go to PivotTable Analyze > PivotChart,
and choose a chart type (e.g., Column, Bar, Line, or Pie).

Position the chart near its corresponding Pivot Table on the dashboard sheet.

Repeat this for each Pivot Table to create separate charts for each data view.

Customize the Charts:

Use the Chart Design and Format tabs to adjust colors, styles, data labels, and
chart titles.

Keep your charts simple and consistent for a more professional look. For example,
you might use the same color scheme across all charts.

Step 4: Add Slicers and Timelines for Interactivity


Slicers and Timelines allow users to filter Pivot Tables and charts quickly, making
the dashboard more interactive.

Insert Slicers:

Select any Pivot Table, go to PivotTable Analyze > Insert Slicer.

Choose the fields you want users to filter by (e.g., Region, Product, or Sales Rep).

Position the slicers in a clear area on your dashboard (e.g., along the top or side).

Insert Timelines (Optional):

If you have a date field in your Pivot Table, go to PivotTable Analyze > Insert
Timeline.

Select the date field to add a Timeline, allowing users to filter data by date ranges
like months, quarters, or years.

Connect Slicers and Timelines to All Pivot Tables:

To apply a Slicer or Timeline to multiple Pivot Tables, right-click the


Slicer/Timeline, select Report Connections (or PivotTable Connections), and
check the Pivot Tables you want it to control.

This ensures all charts and tables update simultaneously based on the selected
filter.

Step 5: Design and Format the Dashboard

Arrange the Elements:

Organize your Pivot Tables, charts, and slicers/timelines in a clear, visually


appealing layout.

Use shapes, lines, or text boxes (found under Insert > Shapes/Text Box) to add
headings, labels, and section dividers to make your dashboard easier to read.

Hide Unnecessary Elements:

Turn off gridlines on the dashboard sheet (go to View > Gridlines) for a cleaner
look.
Adjust font sizes, styles, and colors for consistency across tables, charts, and
slicers.

Add a Dashboard Title:

Insert a text box or shape at the top of your dashboard with a title (e.g., “Sales
Dashboard”) to give it a polished, finished appearance.

Step 6: Test and Finalize

1. Test Filters and Interactions:


o Use the slicers and timelines to check that all Pivot Tables and charts
update correctly.
o Ensure all slicers and timelines are connected to the appropriate Pivot
Tables and Pivot Charts.
2. Protect the Dashboard Sheet (Optional):
o To prevent accidental changes, you can protect the sheet. Go to
Review > Protect Sheet, select the elements you want to restrict
access to, and set a password if needed.

Example Dashboard Layout

A basic layout could be structured as follows:

Top Row: Dashboard Title and Date/Time Label.

Left Panel: Slicers (e.g., Region, Product, Date).

Center Panel: Main Pivot Tables and Charts (e.g., Total Sales by Product, Sales
by Region).

Right Panel: Supplementary Metrics or Additional Pivot Charts (e.g., Sales Trends
Over Time).

This layout keeps filters accessible while displaying the most important charts and
tables centrally.

Updating the Dashboard

When you add new data to the source, simply refresh the Pivot Tables by clicking
any Pivot Table, going to PivotTable Analyze > Refresh, or right-clicking and
selecting Refresh. All Pivot Tables, charts, and filters on the dashboard will update
accordingly.

Tips for a Professional Dashboard

Keep it Simple: Avoid clutter by limiting the number of charts and tables. Focus
on the key insights.

Consistent Design: Use a uniform color scheme, font, and chart style for a
polished look.

Limit Pie Charts: Pie charts are best for showing simple parts of a whole; use bar
or column charts for more detailed comparisons.

You might also like