SlideShare a Scribd company logo
SQL Tips
and Timesavers
How to Create Pivot Tables
in Excel
Pivot tables are an incredibly powerful tool in Microsoft Excel, providing a dynamic and intuitive
way to analyze, summarize, and manipulate large amounts of data.
By using a drag-and-drop interface, users can quickly and easily create summaries from complex
datasets and organize data into meaningful visual representations such as charts and graphs.
Pivot tables can also be used to quickly filter data or perform calculations such as sums,
averages, and counts. In addition, pivot tables can be used to identify and highlight trends in the
data and can even be used to create interactive dashboards for data exploration and reporting.
This quick guide shows you how to get started
Open an Excel
workbook which has a
data table you want to
analyse
Go to the Insert Tab
Select
Select the table or
range of cells you want
to analyse
Click OK
If your dataset is
defined as a table
If your dataset is
defined as a range
Select the fields
To start with, its good to
select categorical fields
into the rows
And Value based fields
into the values
Ignore filters and
columns for now
The data is then
aggregated for you using
the category you
selected
Apply Filters and
Sorting
We only want to see the
top 5 stores by number
of employees
Right click on the
category, sort, more sort
options
We want the sort order
to reflect the order of
the top 5 filter
Add more categories to the
report
We add speciality to the
rows, above the name
This gives us some useful sub
totals of the top stores by
Speciality
(You will notice that in some
cases there are more than 5,
this is because we have
identical values which are
‘tied’
Improve the appearance
Set the number formats to
have comma separators
Select anywhere on the pivot
table, then on the ribbon
select design
Then choose tabular form
Or experiment to find your
own preferred style
Once you learn that a column can be sorted by a different column
this is a very convenient way of sorting date related columns the
correct way
It can also be applied to types of data too, e.g. if you have an
‘Ordinal’ data type such as Gold, Silver, Bronze, you could add a
sort order column to that with values such as 1,2,3 which can be
sorted
Hope you find this useful
For more Tips, Tricks and
Timesavers, visit our website
Business Analytics Blog – Select Distinct
Credit: simon.harrison@selectdistinct.co.uk

More Related Content

How to create pivot tables in Excel

  • 1. SQL Tips and Timesavers How to Create Pivot Tables in Excel
  • 2. Pivot tables are an incredibly powerful tool in Microsoft Excel, providing a dynamic and intuitive way to analyze, summarize, and manipulate large amounts of data. By using a drag-and-drop interface, users can quickly and easily create summaries from complex datasets and organize data into meaningful visual representations such as charts and graphs. Pivot tables can also be used to quickly filter data or perform calculations such as sums, averages, and counts. In addition, pivot tables can be used to identify and highlight trends in the data and can even be used to create interactive dashboards for data exploration and reporting. This quick guide shows you how to get started
  • 3. Open an Excel workbook which has a data table you want to analyse Go to the Insert Tab Select Select the table or range of cells you want to analyse Click OK If your dataset is defined as a table If your dataset is defined as a range
  • 4. Select the fields To start with, its good to select categorical fields into the rows And Value based fields into the values Ignore filters and columns for now The data is then aggregated for you using the category you selected
  • 5. Apply Filters and Sorting We only want to see the top 5 stores by number of employees Right click on the category, sort, more sort options We want the sort order to reflect the order of the top 5 filter
  • 6. Add more categories to the report We add speciality to the rows, above the name This gives us some useful sub totals of the top stores by Speciality (You will notice that in some cases there are more than 5, this is because we have identical values which are ‘tied’
  • 7. Improve the appearance Set the number formats to have comma separators Select anywhere on the pivot table, then on the ribbon select design Then choose tabular form Or experiment to find your own preferred style
  • 8. Once you learn that a column can be sorted by a different column this is a very convenient way of sorting date related columns the correct way It can also be applied to types of data too, e.g. if you have an ‘Ordinal’ data type such as Gold, Silver, Bronze, you could add a sort order column to that with values such as 1,2,3 which can be sorted Hope you find this useful
  • 9. For more Tips, Tricks and Timesavers, visit our website Business Analytics Blog – Select Distinct Credit: simon.harrison@selectdistinct.co.uk